BadDisconnect trying to on GetEndpoints for https

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
CarelC
Jr. Member
Jr. Member
Posts: 3
Joined: 08 Apr 2021, 13:45

BadDisconnect trying to on GetEndpoints for https

Post by CarelC »

Hi,

I am evaluating the C++ Client SDK and running client_lesson04, trying to browse the endpoints on the "Quickstart Reference Server" of the OPC Foundation (https://github.com/OPCFoundation/UA-.NETStandard)

When I run the example I get the following error trying to get the endpoints from the https URL:

Code: Select all

** DiscoveryUrl [https://<hostname>:62540/Quickstarts/ReferenceServer/discovery] ***********************
GetEndpoints failed with status BadDisconnect
UaExpert can discover the endpoints on this address but I get the following errors in the Log:

Code: Select all

[uastack] 
verify error:
	num=18:self signed certificate
	depth=0
	/DC=<hostname>/O=OPC Foundation/ST=Arizona/C=US/CN=Quickstart Reference Server
[uastack] OpcUa_Socket_FinalizeSslConnect: SSL certificate verification result 18 -> "self signed certificate"!
[uastack] OpcUa_HttpsStream_Read: End of Stream reached! Buffer 0 of 0!
Adding Url opc.tcp://<hostname>:62541/Quickstarts/ReferenceServer
...
How can I modify the client_lesson4 to also allow me to get the endpoints on this address?

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: BadDisconnect trying to on GetEndpoints for https

Post by Support Team »

Hi,

HTTPS is not the default / mandatory protocol for OPC UA and it is deactivated in the C++ SDK by default.
Therefore you are not able to connect with HTTPs at all with the evaluation version.

Native OPC UA clients and servers are always using the native OPC UA TCP protocol.

UaExpert is based on the C++ SDK and has the HTTPs option activated.
You need the source SDK to activate the HTTPS support.
Best regards
Unified Automation Support Team

CarelC
Jr. Member
Jr. Member
Posts: 3
Joined: 08 Apr 2021, 13:45

Re: BadDisconnect trying to on GetEndpoints for https

Post by CarelC »

Thanks for the update.

We are in the process to buy the C++ Client SDK + Source.

When we get the source, will it be clear how to enable the HTTPs support?

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: BadDisconnect trying to on GetEndpoints for https

Post by Support Team »

There are switches in the SDK CMake files.
You can contact support if you cannot find them.
Best regards
Unified Automation Support Team

Post Reply