Login  •  Register


Activate Session error when connecting to OPC UA server

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

Activate Session error when connecting to OPC UA server

Postby dbirman » 12 Oct 2017, 19:24

Currently I have a OPC UA server listening on an endpoint like this opc.tcp://localhost:4980. And when I attempt to connect to it from a different host o n the same lan using the ANSI C SDK. In the connection callback i get an error with this data.

ServiceType: ActivateSession

Error: 0x80200000(BadIdentityTokenInvalid)

ClientSideError: false

The clients that connect to this server use the ip addressed assigned to it on the lan i.e (192.168.1.10). So the clients use an endpoing url that looks like this opc.tcp://192.168.1.10:4980

But when I connected using the win32 SDK on another host on the same lan. there is no issue connecting and it is successful. Must I change the endpoint url on the server to "opc.tcp://192.168.1.10:4980" ? Any insight would be greatly appreciated.

NOTE: the server has no certs and the clients are connecting using no certs and anonymous setting.
dbirman
Newbie
Newbie
 
Posts: 2
Joined: 12 Oct 2017, 19:16

Re: Activate Session error when connecting to OPC UA server

Postby Support Team » 13 Oct 2017, 12:42

Hello dbirman,

there should not be any difference in connecting to localhost or IP address regarding the user identity tokens. What kind of server are you trying to connect to?

Please ensure that the server supports the anonymous user token. Please also ensure that your client is set to use the anonymous user token. If this doesn't help, please enable the server trace if possible to check what exactly it considers wrong about the client's user token.
Best regards
Unified Automation Support Team
User avatar
Support Team
Hero Member
Hero Member
 
Posts: 2094
Joined: 18 Mar 2011, 15:09

Re: Activate Session error when connecting to OPC UA server

Postby dbirman » 13 Oct 2017, 15:10

In the Ua C SDK from what I see in wireshark is that i am connecting with a anon token with no cert policy. I shall get my hands on the server log and see what the issue may be, but it is the server rejecting the token?
dbirman
Newbie
Newbie
 
Posts: 2
Joined: 12 Oct 2017, 19:16

Re: Activate Session error when connecting to OPC UA server

Postby Support Team » 23 Nov 2017, 15:25

Hello dbirman,

the ClientSideError is set to false in the callback, this means that the error is being sent from the server. Please ensure that the server supports the anonymous user token.
Best regards
Unified Automation Support Team
User avatar
Support Team
Hero Member
Hero Member
 
Posts: 2094
Joined: 18 Mar 2011, 15:09


Return to ANSI C based OPC UA SDK

Who is online

Users browsing this forum: No registered users and 0 guests

cron