TwistedOwl
TwistedOwl

Reputation: 1324

Connection configuration loops - Prosys OPC UA Client

I'm using sample codes from documentation and I'm trying to connect to server using Prosys OPC UA Client. I have tried opcua-commander and integration objects opc ua client and it looks like server works just fine.

Here's what is happening:

  1. After entering endpointUrl, client adds to url -- urn:NodeOPCUA-Server-default.
  2. Client asks to specify security settings.
  3. Client asks to choose server - only 1 option and it's urn:NodeOPCUA-Server-default.

And it goes back to step 2 and 3 over and over.

If I just minimize prosys client without closing configuration after some time I get this info in terminal: Server: closing SESSION new ProsysOpcUaClient Session15 because of timeout = 300000 has expired without a keep alive \x1B[46mchannel = \x1B[49m ::ffff:10.10.13.2 port = 51824

I have tried this project and it works -> node-opcua-htmlpanel. What's missing in sample code then?

After opening debugger I have noticed that each Time I select security settings and hit OK, server_publish_engine reports:

server_publish_engine:179 Cencelling pending PublishRequest with statusCode BadSecureChannelClosed (0x80860000) length = 0

Upvotes: 2

Views: 796

Answers (2)

Etienne
Etienne

Reputation: 16867

This is due to a specific interoperability issue that was introduced in [email protected]. this will be fixed in next version of node-opcua. The resolution can be tracked here https://github.com/node-opcua/node-opcua/issues/464

Upvotes: 2

Jouni Aro
Jouni Aro

Reputation: 2139

The issue has been handled at the Prosys OPC Forum:

The error happens because the server sends different EndpointDescriptions in GetEndpointsResponse and CreateSessionResponse.

In GetEndpoints, the returned EndpointDescriptions contain TransportProfileUri=http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary. In CreateSessionResponse, the corresponding TransportProfileUri is empty.

In principle, the server application is not working according to specification. The part 4 of the OPC UA specification states that “The Server shall return a set of EndpointDescriptions available for the serverUri specified in the request. … The Client shall verify this list with the list from a DiscoveryEndpoint if it used a DiscoveryEndpoint to fetch the EndpointDescriptions. It is recommended that Servers only include the server.applicationUri, endpointUrl, securityMode, securityPolicyUri, userIdentityTokens, transportProfileUri and securityLevel with all other parameters set to null. Only the recommended parameters shall be verified by the client.”

Upvotes: 1

Related Questions