SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

Skyline API AQMP failing to connect to socket

Solved!
Go to solution

I installed Systemlink 17.5, connected my client and tried running the "Async Messaging.lvproj" example but all it does is say it "failed to connect to the socket" (see attachment). I have the client running, it says "Connected" and I see the socket by doing a netstat. There are 12 connections to the socket in TIME_WAIT and one in FIN_WAIT_2.

Skyline_Error.png

Any ideas why this server is not working?

0 Kudos
Message 1 of 23
(4,189 Views)

Hi rdecarre11, 

 

I assume this error gets thrown upon running the application. Can you confirm this?

 

What kind of network topology are you working with between the host and client?

 

If you're routing through a network when you see this error, can you run the client and host on the same PC? If so, can you try temporarily disabling firewalls on the client and host to rule that out as a culprit?

 

Regards,
0 Kudos
Message 2 of 23
(4,154 Views)

The client and host are on the same PC. The server is on a VM.

0 Kudos
Message 3 of 23
(4,152 Views)

Also, make sure you target and server have the same date and time.  Before a target tries to publish data it will check the SSL certificate, but if the data/time is drastically off it won't consider the cert valid.

0 Kudos
Message 4 of 23
(4,142 Views)

Also, does your client show up as connected in Systems Manager?

0 Kudos
Message 5 of 23
(4,136 Views)

The server and my laptop (on which I am running the aforementioned example) have the same time.

Connected is more interesting:
Last night I am quite sure the System Manager and the Client both said Connected. Right now though, I have had the client running all morning and it says Connected, but the System Manager says disconnected.

I restarted the Client and it went through the state machine of "Attempting to Connect" --> "Connected", but the server still says Disconnected.

I went through a Remove - (re)Approve cycle on the Server but it's still in the same state where the Server says Disconnected and the Client says connected.

Finally, I switched the client to "Do not connect to a SystemLink server", let it restart, then connected again. Now the server seems to agree the client is connected.

 

Sadly, even upon correcting this, the example still just says "Unable to open socket".

0 Kudos
Message 6 of 23
(4,127 Views)

On your client, can you check to see if there is a file at C:\ProgramData\National Instruments\Skyline\SkylineConfigurations\skyline_master.json and that the information in it seems to match your server.

0 Kudos
Message 7 of 23
(4,124 Views)

Also, I think the SystemLink Client quits polling for the status once it reaches the Connected state, so if you left it open I can see how that information could be stale.  It probably should have a refresh button or something, but closing and reopening the client will force it to check its status.

0 Kudos
Message 8 of 23
(4,122 Views)

The SkylineConfigurations folder just has a readme.txt in it, no JSON. That sounds important.

0 Kudos
Message 9 of 23
(4,116 Views)

Yep, that file should get auto generated on the server and sent to the client when it is initially approved and connected. In addition, everytime the target reconnects it should check if anything has changed like the servers hostname or SSL cert and update it if needed.

 

I would start by opening up with the Windows service manager on the client and double check that the NI Salt Minion service is running.  Sometimes if an exception occurs it will just stop.  Note if you leave Service Manager open you have to click refresh.  It will not auto update the state of the services if they crash for some reason.

 

In addition, you could try rebooting the server.  That may clean up something that is in an invalid state and when the client reconnects hopefully clean things up.

 

 

0 Kudos
Message 10 of 23
(4,106 Views)