Problems with establishing connection to UA Server

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
jonasthiel
Sr. Member
Sr. Member
Posts: 10
Joined: 27 Aug 2013, 09:35

Problems with establishing connection to UA Server

Post by jonasthiel »

Dear community,
based on "GettingStarted_VS2015" project I tried to create my own UA-Client in my application. Right now I have a problem with the initial connection to the UA-Server:
sometimes the "data.session.Connect(data.endpointUrl, data.security)" throws an error: "Error establishing a connection." (see attached Picture [Error message content]). If I put this funtion call into a while loop, the client connects after a few tries (see attached Picture [debug file content]). Because of the fact, the client connects sometimes, I do not have any clue where to locate the problem.
Is it possible to configure a bigger timeout?

May you help me? Thanks alot in advance!

Kind Regards,
Jonas

Edit: I'm not able to add any Attachement, because the "board attachment quota has been reached".

Error message content:
StatusException: {"Error establishing a connection."}
AdditionalInfo:[StatusException] Error establishing a connection.
bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)
bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)
bei UnifiedAutomation.UaBase.TcpTransportChannel.EndSendRequest(IAsyncResult result)
bei UnifiedAutomation.UaBase.SessionClient.EndCreateSession(IAsyncResult result, NodeId& sessionId, NodeId& authenticationToken, Double& revisedSessionTimeout, Byte[]& serverNonce, Byte[]& serverCertificate, EndpointDescriptionCollection& serverEndpoints, SignedSoftwareCertificateCollection& serverSoftwareCertificates, SignatureData& serverSignature, UInt32& maxRequestMessageSize)
bei UnifiedAutomation.UaClient.Session.OnCreateSessionComplete(IAsyncResult result)

Debug file content:
2018/01/11 09:16:37 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:38 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:38 ERROR: connection failed:
2018/01/11 09:16:38 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:39 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:39 ERROR: connection failed:
2018/01/11 09:16:39 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:39 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:39 ERROR: connection failed:
2018/01/11 09:16:39 ERROR: UnifiedAutomation.UaBase.StatusException: Error establishing a connection. ---> UnifiedAutomation.UaBase.StatusException: Error establishing a connection.\n bei UnifiedAutomation.UaBase.TcpAsyncOperation`1.End(Int32 timeout)\n bei UnifiedAutomation.UaBase.TcpClientChannel.EndSendRequest(IAsyncResult result)\n bei UnifiedAutomation.UaBase.TcpTransportChannel.End
2018/01/11 09:16:39 Try to connect to OPC UA-Server 'opc.tcp://172.22.48.67:48030'
2018/01/11 09:16:39 Connection successful.

Post Reply