Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Using computer name as

More
19 Oct 2016 07:21 #4479 by support
Replied by support on topic Using computer name as
Or, which also sometimes happens, it is returning an endpoint with an IP address or a host name that is not reachable by the client (e.g. a local network address while the client is on the public Internet). Or an address prevented by firewall.

Please Log in or Create an account to join the conversation.

More
19 Oct 2016 06:33 #4477 by andis59
Replied by andis59 on topic Using computer name as
OK, so it seems like the OPC server is returning an endpoint and then refusing to allow a connection.

Thanks for the answer!

Please Log in or Create an account to join the conversation.

More
18 Oct 2016 19:21 #4476 by support
Replied by support on topic Using computer name as
Yes, you can simply specify a numerical IP address in place of the <computer name>. I would say that you should, however, first try to resolve the actual underlying problem of a changing IP address which probably shouldn't be changing at all.

Be aware, however, that the OPC UA connection process actually works a bit differently from what the intuition tells you. The process actually has two phases:

1. The discovery: The client connects to a so-called discovery endpoint of the server. For this, the client will use the address you specify (either numerical, or a symbolic name with DNS lookup or other available lookup mechanism). The server responds with a list of endpoints (which may differ in transport used, security, etc.).

2. The client picks an endpoint from the list provided by the server, and opens a channel to the server. In this second step, the client can use the IP address or host name that is specified BY THE SERVER in the list of endpoints - not necessarily the same as the IP/host name you have originally specified.

The reason why opening the channel fails due to changing IP address may therefore actually be on the server side as well.

Also note that there are settings in QuickOPC that can be used to enforce the usage of the same IP/host you have specified originally (although, sadly, that brings problems in other scenarios...). This alternative setting should be considered if using the numerical IP does not resolve the issue and you would still see a different IP in the error message.

Best regards

Please Log in or Create an account to join the conversation.

More
18 Oct 2016 14:03 #4475 by andis59
In a project I have inherited the UAEndpointDescriptor is like this
"opc.tcp://<computer name>:port"
e.g.""opc.tcp://FORWIN1:4846

The computer has three network cards with IP-addresses in different 'families'
198.168.0.2
198.168.1.24
10.56.69.145

The OPC Server is on the 198.168.1.24
Sometimes when the client is starting it connects to 10.56.69.145 and then we get this error
OPCWorker - OPCClient_MonitoredItemChanged - Exception: OpcLabs.EasyOpc.UA.UAServiceException: OPC-UA service result - Error establishing a connection.
---- SERVICE RESULT ----
StatusCode: {BadTcpInternalError} = 0x80820000 (2156003328)
Description: Error establishing a connection.
-----
StatusCode: {BadTcpInternalError} = 0x80820000 (2156003328)
Description: An unexpected error occurred while connecting to the server.
AdditionalInfo: >>> An unexpected error occurred while connecting to the server.
---    at Opc.Ua.Bindings.TcpAsyncOperation`1.End(Int32 timeout)
---    at Opc.Ua.Bindings.TcpClientChannel.OnConnectOnDemandComplete(Object state)
-----
StatusCode: {Bad} = 0x80000000 (2147483648)
Description: Det gick inte att göra en anslutning eftersom måldatorn aktivt nekade det 10.56.69.145:4846
AdditionalInfo: >>> Det gick inte att göra en anslutning eftersom måldatorn aktivt nekade det 10.56.69.145:4846
---    at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
---    at Opc.Ua.Bindings.TcpMessageSocket.EndConnect(IAsyncResult result)
---    at Opc.Ua.Bindings.TcpClientChannel.OnConnectComplete(IAsyncResult result)
---- REMARKS ----
Some possible causes of this error are that the OPC-UA server is not running, or is not configured to listen on the specified port. Also, the network connection may be broken (cable unplugged?).

Would the best solution be to replace the computer name with the actual IP address that the OPC server is using?

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.062 seconds