连接配置循环 - Prosys OPC UA 客户端

Connection configuration loops - Prosys OPC UA Client

我正在使用文档中的示例代码,并且正在尝试使用 Prosys OPC UA 客户端连接到服务器。我已经尝试过 opcua-commander 和集成对象 opc ua 客户端,看起来服务器工作正常。

这是正在发生的事情:

  1. 客户端输入endpointUrl后,添加到url-- urn:NodeOPCUA-Server-default
  2. 客户要求指定安全设置。
  3. 客户要求选择服务器 - 只有 1 个选项,它是 urn:NodeOPCUA-Server-default。

它一遍又一遍地回到第 2 步和第 3 步。

如果一段时间后我只是最小化 prosys 客户端而不关闭配置,我会在终端中得到以下信息: 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

我已经尝试过这个项目并且它有效 -> node-opcua-htmlpanel。那么示例代码中缺少什么?

打开调试器后,我注意到每次我 select 安全设置并点击确定时,server_publish_engine 报告:

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

问题已在 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.”

这是由于 node-opcua@0.2.2 中引入的特定互操作性问题。这将在 node-opcua 的下一版本中修复。可以在此处跟踪分辨率 https://github.com/node-opcua/node-opcua/issues/464