Error 3 or Readiness Check Failed With SystemLink PostgreSQLDatabase

Updated Nov 7, 2024

Reported In

Software

  • SystemLink Server
  • SystemLink Test Module

Issue Details

  • My SystemLink PostgreSQLDatabase service won't start. In NI SystemLink Server Configuration, the PostgreSQLDatabase tab shows Method failed with unexpected error code 3.
  • On my SystemLink Server, the PostgreSQLDatabase service doesn't start properly. In the Skyline logs, I see many NationalInstruments.PostgresConfig: Fatal: Readiness check failed entries. How can I resolve this?
  • I recently upgraded SystemLink. In my SystemLink TDM Diagnostics files, PostgreSQLDatabse exits with error -2146233083. The service refuses to start and I see one of the below errors. What causes this?
PostgreSQLDatabase | ERROR - C:\Program Files\National Instruments\Shared\Skyline\PostgreSQLDatabase\NationalInstruments.PostgresConfig.exe - NationalInstruments.PostgresConfig: Fatal: Readiness check failed. 

PostgreSQLDatabase | ERROR - Process exited with exit code -2146233083.

PostgreSQL Method Failed With Unexpected Error 3.png

Solution

Error -2146233083 is a generic timeout, which can happen when another error repeatedly occurs and fails to be resolved.
The Fatal: Readiness check failed and method failed with unexpected error code 3 errors can be caused by the following factors:

  • The PostgreSQLDatabase configuration files contain incorrect information.
  • The PostgreSQLDatabase service is not initialized properly, so cannot start.


Follow the sections below to resolve this error.
 

Checking the PostgreSQLDatabase Configuration Files

  1. On the SystemLink Server PC, navigate to C:\ProgramData\National Instruments\Skyline\Config.
  2. Open the PostgreSQLDatabase.json file in any text editor.
  3. Verify that the following lines are correct:
    • The Postgres.Password and Postgres.ConnectionString lines contains a password. If not, refer to SystemLink PostgreSQL Database No Longer Starts.
    • The Postgres.DbPath does not contain any typos. The default value is "C:\\ProgramData\\National Instruments\\Skyline\\PostgreSQLDatabase".
    • The remaining lines should resemble the following picture.


PostgreSQLDatabase json.PNG

 

Initializing the PostgreSQL Database


After upgrading, repairing or reinstalling SystemLink, it is common for the PostgreSQLDatabase service to not be re-initialized properly.

  1. On the SystemLink Server PC, navigate to C:\ProgramData\National Instruments\Skyline\Config.
  2. Open the PostgreSQLDatabase.json file in any text editor.
  3. If a "Postgres.DatabaseStatus": "ready" line exists, remove it. Make sure to delete any commas at the end of the line so that the file conforms to the JSON structure.
  4. Save and close the file.
  5. Launch the NI SystemLink Server Configuration application.
  6. Select the PostgreSQLDatabase tab.
  7. Make a note of the option selected under Run service as.
    • If the PostgreSQLDatabase tab is not working, we can assume the default value of Network Service is selected.


PostgreSQLDatabase tab.PNG

 

  1. Close the NI SystemLink Server Configuration application.
  2. Open the Windows Services app.
  3. Scroll to find the NI SystemLink Service Manager service and stop it.


SL Service Manager.PNG

  1. Download and unzip [External] Microsoft PsExec.
  2. Move PsExec to C:\Windows\System32.
  3. In the Start Menu, search for "Command Prompt". Right-click it and select Run as Administrator.
  4. In Command Prompt, enter  psexec.exe -s -i "nt authority\<service type>" cmd.exe where <service type> refers to the value noted from step 7.
    • For Network Service, the <service type> value is network service.
    • For Local Service, the <service type> value is local service.


PsExec Command.PNG
 

  1. A new Command Prompt window will open as the <service type> user. Enter whoami to verify that it is running under the correct user.
  2. Enter cd "C:\Program Files\National Instruments\Shared\Skyline\PostgreSQLDatabase" to change the directory.
  3. Enter NationalInstruments.PostgresConfig.exe init --verbose to manually initialize the PostgreSQL Database and obtain an output.
  4. Restart NI SystemLink Service Manager from the Windows Services app.

 

Other Troubleshooting

If the issue persists after following the sections above:

  1. Work through the troubleshooting steps in SystemLink PostgreSQL Database No Longer Starts.
  2. Open Event Viewer and select Windows Logs >> Application.
  3. Review the Event Viewer log for any errors relating to PostgreSQL or SystemLink.
  4. Generate a SystemLink Technical Support Report and SystemLink TDM Diagnostics File. Contact NI Support and share the files.