我正在使用文档中的示例代码,我正在尝试使用Prosys OPC UA Client连接到服务器。我已经尝试过opcua-commander和集成对象opc ua客户端,看起来服务器工作正常。
以下是发生的事情:
-- 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。那么示例代码中缺少什么?
打开调试器后,我注意到每次选择安全设置并点击OK,server_publish_engine报告:
server_publish_engine:179 Cencelling pending PublishRequest with statusCode BadSecureChannelClosed (0x80860000) length = 0
答案 0 :(得分:2)
这是由于node-opcua@0.2.2中引入的特定互操作性问题。这将在下一版本的node-opcua中修复。可以在此处跟踪分辨率https://github.com/node-opcua/node-opcua/issues/464
答案 1 :(得分:1)
问题已在Prosys OPC Forum处理:
发生错误是因为服务器发送的不同 GetEndpointsResponse和中的EndpointDescriptions CreateSessionResponse。
在GetEndpoints中,返回的EndpointDescriptions包含 TransportProfileUri = http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary。 在CreateSessionResponse中,相应的TransportProfileUri是 空。
原则上,服务器应用程序不能正常工作 规格。 OPC UA规范的第4部分指出“The 服务器应返回一组可用的EndpointDescriptions requestUri在请求中指定。 ......客户应验证这一点 如果它使用了一个列表,则列出DiscoveryEndpoint中的列表 DiscoveryEndpoint用于获取EndpointDescriptions。建议 Servers只包含server.applicationUri,endpointUrl, securityMode,securityPolicyUri,userIdentityTokens, transportProfileUri和securityLevel,其他所有参数都设置为 空值。只有推荐的参数才能通过验证 客户端“。