cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Connection from Kepware to OPC Server don't reconnect after connection loss

SOLVED
Highlighted
Regular Member

Connection from Kepware to OPC Server don't reconnect after connection loss

Created a connection from Kepware to a 3rd party OPC server, and connection is normally running.

Every evening the connection goes down, and Kepware returns the error:

'Channel Failed to connect | Status Description='Could not establish a network connection to remote server' Status Code=0x80AC0000'

In the morning Kepware returns the error :

‘Socket error occurred connecting. | Error = 10061’ Details=’Impossibile stabilire la connessione. Rifiuto persistente del computer di destinazione’. --> Not possible to establish the connection, Destination computer deny

And then, for each Tag, the following error:

… Add item failed on device. | Tag address ….. Status description = ‘The node id refers to a node that does not exist in the server address space’ Status code = 0x80340000

In the Manufacturing Apps the device is in error and data are not good.

Restarting the KepServerEX 6.6 Runtime service the connection is running again. Which is the right way to manage this case? Are there specific properties to set in the channel, so that Kepware connection is automatically ‘restarted’ when the remote opc ua server accept again the connection?

Many Thanks Martina

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Connection from Kepware to OPC Server don't reconnect after connection loss

I am glad that your system is working, however I do not believe that the steps you took was the corrective action required to resolve the TCP socket issue.

 

The error that was returned is indeed a response from the target OS '10061', which when resolved through Microsoft's KB article referenced previously, that code is an indication that the target OS was refusing the connection attempt.

 

https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2

 

***************************

WSAECONNREFUSED 10061

Connection refused.

No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

***************************

 

By switching the polling method in the device properties, a result of that action causes the driver to release the existing connection attempts, then try to get a new connection.  This action of releasing the old request that was being refused by the target, and the subsequent request of a new TCP socket may have been successfully honored and accepted by the target and therefore allowing the connection to be reestablished.

 

Best regards,

Andy Servetas
Principal Technical Support Engineer | Kepware Technologies

5 REPLIES 5

Re: Connection from Kepware to OPC Server don't reconnect after connection loss

Hi Martina,

 

Unfortunately, no... there are no additional settings that can be adjusted to compensate for this.  That error code 10061 is coming from the OS indicating that the target is refusing the connection attempt.

 

Please take a look at this article here for additional information:

 

https://www.ptc.com/en/support/article?n=CS299048

 

Best regards,

Andy Servetas
Principal Technical Support Engineer | Kepware Technologies

 

Re: Connection from Kepware to OPC Server don't reconnect after connection loss

Hi @md'ambrosio.

 

If the previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Re: Connection from Kepware to OPC Server don't reconnect after connection loss

The solution was changing the properties:

Device properties > Subscription > Update Mode = Poll
Device properties > Subscription > Registered Read/Writes = Disabled

Thanks,. Martina

Re: Connection from Kepware to OPC Server don't reconnect after connection loss

Hi @md'ambrosio.

 

Please mark the Accepted Solution (even if it's yours) for the benefit of others encountering the same issue.

 

Regards.

 

--Sharon

Re: Connection from Kepware to OPC Server don't reconnect after connection loss

I am glad that your system is working, however I do not believe that the steps you took was the corrective action required to resolve the TCP socket issue.

 

The error that was returned is indeed a response from the target OS '10061', which when resolved through Microsoft's KB article referenced previously, that code is an indication that the target OS was refusing the connection attempt.

 

https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2

 

***************************

WSAECONNREFUSED 10061

Connection refused.

No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

***************************

 

By switching the polling method in the device properties, a result of that action causes the driver to release the existing connection attempts, then try to get a new connection.  This action of releasing the old request that was being refused by the target, and the subsequent request of a new TCP socket may have been successfully honored and accepted by the target and therefore allowing the connection to be reestablished.

 

Best regards,

Andy Servetas
Principal Technical Support Engineer | Kepware Technologies