简体   繁体   English

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

[英]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. 我正在使用文档中的示例代码,并尝试使用Prosys OPC UA客户端连接到服务器。 I have tried opcua-commander and integration objects opc ua client and it looks like server works just fine. 我尝试了opcua-commander和集成对象opc ua client,看起来服务器工作正常。

Here's what is happening: 这是正在发生的事情:

  1. After entering endpointUrl, client adds to url -- urn:NodeOPCUA-Server-default . 输入endpointUrl后,客户端将添加到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. 客户端要求选择服务器-只有1个选项,并且为urn:NodeOPCUA-Server-default。

And it goes back to step 2 and 3 over and over. 然后一遍又一遍地回到步骤2和3。

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 如果我只是在不关闭配置的情况下将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

I have tried this project and it works -> node-opcua-htmlpanel . 我已经尝试过这个项目,并且可以正常工作-> 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: 打开调试器后,我注意到每次我选择安全设置并单击OK时,server_publish_engine都会报告:

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

This is due to a specific interoperability issue that was introduced in node-opcua@0.2.2. 这是由于在node-opcua@0.2.2中引入了特定的互操作性问题。 this will be fixed in next version of node-opcua. 这将在下一版的node-opcua中修复。 The resolution can be tracked here https://github.com/node-opcua/node-opcua/issues/464 可以在这里跟踪分辨率https://github.com/node-opcua/node-opcua/issues/464

The issue has been handled at the Prosys OPC Forum : 该问题已在Prosys OPC论坛上进行了处理:

The error happens because the server sends different EndpointDescriptions in GetEndpointsResponse and CreateSessionResponse. 发生错误是因为服务器在GetEndpointsResponse和CreateSessionResponse中发送了不同的EndpointDescriptions。

In GetEndpoints, the returned EndpointDescriptions contain TransportProfileUri= http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary . 在GetEndpoints中,返回的EndpointDescriptions包含TransportProfileUri = http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary In CreateSessionResponse, the corresponding TransportProfileUri is empty. 在CreateSessionResponse中,相应的TransportProfileUri为空。

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. OPC UA规范的第4部分指出:“服务器应返回可用于请求中指定的serverUri的一组EndpointDescriptions。 … The Client shall verify this list with the list from a DiscoveryEndpoint if it used a DiscoveryEndpoint to fetch the EndpointDescriptions. …如果客户端使用DiscoveryEndpoint来获取EndpointDescriptions,则客户端应使用DiscoveryEndpoint的列表来验证此列表。 It is recommended that Servers only include the server.applicationUri, endpointUrl, securityMode, securityPolicyUri, userIdentityTokens, transportProfileUri and securityLevel with all other parameters set to null. 建议服务器仅包括server.applicationUri,endpointUrl,securityMode,securityPolicyUri,userIdentityTokens,transportProfileUri和securityLevel,并将所有其他参数设置为null。 Only the recommended parameters shall be verified by the client.” 客户只能验证推荐的参数。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM