Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UA_Client_findServers() Inconsistency #2466

Open
4 of 7 tasks
wenxinleong opened this issue Feb 19, 2019 · 0 comments
Open
4 of 7 tasks

UA_Client_findServers() Inconsistency #2466

wenxinleong opened this issue Feb 19, 2019 · 0 comments
Assignees
Labels
Component: Server Issues related to the server code Priority: Low Issue with low priority Type: Bug Bug in the code which needs to be fixed
Milestone

Comments

@wenxinleong
Copy link

wenxinleong commented Feb 19, 2019

Description

Run discovery example in different order, UA_Client_findServers() produce a different result.

Background Information / Reproduction Steps

All examples run on a same device in the following order:

  1. discovery_server_lds
  2. discovery_server_multicast
  3. discovery_server_register
  4. discovery_client_find_servers

Output as expected, 3 servers appeared for both queries UA_Client_findServers() and UA_Client_findServersOnNetwork(), these servers are lds, register, and multicast

Server[0]: LDS-raspberrypi
	RecordID: 0
	Discovery URL: opc.tcp:https://raspberrypi:4840/
	Capabilities: LDS,

Server[1]: Sample Multicast Server-raspberrypi
	RecordID: 1
	Discovery URL: opc.tcp:https://raspberrypi:16600/
	Capabilities: NA,

Server[2]: Sample Server-raspberrypi
	RecordID: 2
	Discovery URL: opc.tcp:https://raspberrypi:4841/
	Capabilities: NA,

Server[0]: urn:open62541.example.local_discovery_server
	Name: open62541-based OPC UA Application
	Application URI: urn:open62541.example.local_discovery_server
	Product URI: http:https://open62541.org
	Type: Server
	Discovery URLs:
		[0]: opc.tcp:https://raspberrypi:4840/

Server[1]: urn:open62541.example.server_register
	Name: open62541-based OPC UA Application
	Application URI: urn:open62541.example.server_register
	Product URI: http:https://open62541.org
	Type: Server
	Discovery URLs:
		[0]: opc.tcp:https://raspberrypi:4841/

Server[2]: urn:open62541.example.server_multicast
	Name: open62541-based OPC UA Application
	Application URI: urn:open62541.example.server_multicast
	Product URI: http:https://open62541.org
	Type: Discovery Server
	Discovery URLs:
		[0]: opc.tcp:https://raspberrypi:16600/

-------- Server Endpoints --------

Endpoints for Server[0]: urn:open62541.example.local_discovery_server

	Endpoint[0]:
		Endpoint URL: opc.tcp:https://raspberrypi:4840/
		Transport profile URI: http:https://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary
		Security Mode: None
		Security profile URI: http:https://opcfoundation.org/UA/SecurityPolicy#None
		Security Level: 0
Endpoints for Server[1]: urn:open62541.example.server_register

	Endpoint[0]:
		Endpoint URL: opc.tcp:https://raspberrypi:4841/
		Transport profile URI: http:https://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary
		Security Mode: None
		Security profile URI: http:https://opcfoundation.org/UA/SecurityPolicy#None
		Security Level: 0
Endpoints for Server[2]: urn:open62541.example.server_multicast

	Endpoint[0]:
		Endpoint URL: opc.tcp:https://raspberrypi:16600/
		Transport profile URI: http:https://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary
		Security Mode: None
		Security profile URI: http:https://opcfoundation.org/UA/SecurityPolicy#None
		Security Level: 0

However, in a different order:

  1. discovery_server_lds
  2. discovery_server_register
  3. discovery_server_multicast
  4. discovery_client_find_servers

Output of UA_Client_findServersOnNetwork() is still 3 servers. But, UA_Client_findServers() is only 2, server multicast is missing

Server[0]: LDS-raspberrypi
	RecordID: 0
	Discovery URL: opc.tcp:https://raspberrypi:4840/
	Capabilities: LDS,

Server[1]: Sample Server-raspberrypi
	RecordID: 1
	Discovery URL: opc.tcp:https://raspberrypi:4841/
	Capabilities: NA,

Server[2]: Sample Multicast Server-raspberrypi
	RecordID: 2
	Discovery URL: opc.tcp:https://raspberrypi:16600/
	Capabilities: NA,

Server[0]: urn:open62541.example.local_discovery_server
	Name: open62541-based OPC UA Application
	Application URI: urn:open62541.example.local_discovery_server
	Product URI: http:https://open62541.org
	Type: Server
	Discovery URLs:
		[0]: opc.tcp:https://raspberrypi:4840/

Server[1]: urn:open62541.example.server_register
	Name: open62541-based OPC UA Application
	Application URI: urn:open62541.example.server_register
	Product URI: http:https://open62541.org
	Type: Server
	Discovery URLs:
		[0]: opc.tcp:https://raspberrypi:4841/

-------- Server Endpoints --------

Endpoints for Server[0]: urn:open62541.example.local_discovery_server

	Endpoint[0]:
		Endpoint URL: opc.tcp:https://raspberrypi:4840/
		Transport profile URI: http:https://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary
		Security Mode: None
		Security profile URI: http:https://opcfoundation.org/UA/SecurityPolicy#None
		Security Level: 0
Endpoints for Server[1]: urn:open62541.example.server_register

	Endpoint[0]:
		Endpoint URL: opc.tcp:https://raspberrypi:4841/
		Transport profile URI: http:https://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary
		Security Mode: None
		Security profile URI: http:https://opcfoundation.org/UA/SecurityPolicy#None
		Security Level: 0

Everything else looks normal except an error message on Multicast DNS as following. The multicast example works ok, so im not sure how significant this error is?

pi@raspberrypi:~/Proj/open62541/open62541/build/bin/examples $ ./discovery_server_lds 
[2019-02-19 15:55:18.993 (UTC+0800)] info/network	TCP network layer listening on opc.tcp:https://raspberrypi:4840/
[2019-02-19 15:55:18.993 (UTC+0800)] info/server	Multicast DNS: add record for domain: LDS-raspberrypi._opcua-tcp._tcp.local.
[2019-02-19 15:55:19.094 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:19.195 (UTC+0800)] info/server	Multicast DNS: found server: opc.tcp:https://raspberrypi:4840/
[2019-02-19 15:55:19.195 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:19.898 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:21.904 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:22.206 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:22.307 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:22.879 (UTC+0800)] info/network	Connection 6 | New connection over TCP from 127.0.0.1
[2019-02-19 15:55:22.879 (UTC+0800)] info/channel	Creating a new SecureChannel
[2019-02-19 15:55:22.879 (UTC+0800)] warn/securitypolicy	No PKI plugin set. Accepting all certificates
[2019-02-19 15:55:22.879 (UTC+0800)] info/channel	Connection 6 | SecureChannel 1 | Opened SecureChannel
[2019-02-19 15:55:22.880 (UTC+0800)] info/session	Connection 6 | SecureChannel 1 | Session b96ca1c2-ba7f-6a45-2462-d6ad2d2232d3 | ActivateSession: Session activated
[2019-02-19 15:55:22.880 (UTC+0800)] info/server	Multicast DNS: add record for domain: Sample Multicast Server-raspberrypi._opcua-tcp._tcp.local.
[2019-02-19 15:55:22.881 (UTC+0800)] info/session	Connection 6 | SecureChannel 1 | Session b96ca1c2-ba7f-6a45-2462-d6ad2d2232d3 | CloseSession
[2019-02-19 15:55:22.881 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:22.881 (UTC+0800)] info/channel	Connection 6 | SecureChannel 1 | CloseSecureChannel
[2019-02-19 15:55:22.881 (UTC+0800)] info/network	Connection 6 | Closed
[2019-02-19 15:55:23.082 (UTC+0800)] info/server	Multicast DNS: found server: opc.tcp:https://raspberrypi:16600/
[2019-02-19 15:55:23.082 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:23.184 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:23.735 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:25.741 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable
[2019-02-19 15:55:27.746 (UTC+0800)] error/server	Multicast error: Can not write to socket. Resource temporarily unavailable

Checklist

Please provide the following information:

  • open62541 Version (release number or git tag): v0.3.0
  • Other OPC UA SDKs used (client or server):
  • Operating system: raspberry pi3 (Linux raspberrypi 4.14.79-v7+ armv7l )
  • Logs (with UA_LOGLEVEL set as low as necessary) attached
  • Wireshark network dump attached
  • Self-contained code example attached: examples\discovery
  • Critical issue
@Pro Pro self-assigned this Feb 25, 2019
@Pro Pro added Component: Server Issues related to the server code Priority: Low Issue with low priority Type: Bug Bug in the code which needs to be fixed labels Jul 25, 2019
@Pro Pro added this to the 1.0 milestone Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Server Issues related to the server code Priority: Low Issue with low priority Type: Bug Bug in the code which needs to be fixed
Projects
None yet
Development

No branches or pull requests

2 participants