Page 1 of 1

UaServer can't register with LDS

Posted: 20 Jul 2017, 08:26
by tuan_phan
I have installed the UA Local Discovery Server (LDS) and edit ualds.ini file. Purpose for allow when UaServer register LDS without security

Code: Select all

# The OPCUA application uri used by the LDS.
ServerUri = urn:[gethostname]:UALocalDiscoveryServer

# maximum age of registered server entries before they expire in seconds. (Default=600)
ExpirationMaxAge = 600

# AllowLocalRegistration: (default=no) this will disable certificate trust checks for connections comming from
# localhost. Note that this is a security risk. Only enable this feature if you are aware of the full implications.
AllowLocalRegistration = yes

# Endpoint configuration
# Number of available endpoints
Endpoints/size = 1
Endpoints/0/Url = opc.tcp://[gethostname]:4840
Endpoints/0/SecurityPolicies = SecurityPolicy_None

Url =
MessageSecurity = None

Then I register to LDS, see logfile :
ServerUri '' is invalid (needs to start with 'urn:' or 'http://')

So I can't register with LDS.

Any idea of where could be the mistake?

Thank you very much,

Re: UaServer can't register with LDS

Posted: 26 Jul 2017, 13:19
by Support Team
Yes, read the error message. The problem is that the ServerUri is invalid. Your server seems to send an empty ApplicationUri. That is not allowed by OPC UA standard.
Check your server configuration to provide a valid ApplicationUri.
In our C++ DemoServer for example you can set the Uri in the ServerConfig.xml:

Code: Select all


Re: UaServer can't register with LDS

Posted: 03 Jan 2020, 18:43
by joshua.eliser
Sorry to post on an old thread, but I'm having a problem with registering with the OPCUA LDS. I completely started over by using a fresh checkout of the LDS and the UA C++ SDK. I'm using the latest LDS application from the OPC Foundation ( and I'm using the UA SDK server examples. There is a section in the UA configuration for DiscoveryRegistration, and there is note for enabling the Url of the LDS. I did that in the UA configuration below ...

Code: Select all

        <!--Discovery configuration
            Configuration for registration with discovery server(s)-->
            <!--Flag indicating if the certificates should be exchanged with the windows certificate store -->
            <!--Path of the local discovery server trust list. This is where the server copies it's certificate to
                if the file based store of the new LDS is used. -->
            <!--Store name used for the local discovery server in the windows certificate store -->
            <DiscoveryServerStoreName>UA Applications</DiscoveryServerStoreName>
            <!--Certificate name of the local discovery server in the windows certificate store -->
            <DiscoveryServerCertificateName>UA Local Discovery Server</DiscoveryServerCertificateName>
            <!--Interval in milliseconds for registration with discovery server(s) -->
            <!--List of discovery servers to register with.
                If the list is empty, no registration is executed.
                Default is opc.tcp://localhost:4840 for the local discovery server.
                Additional remote discovery servers can be added -->
        <!--Discovery configuration end-->
When the UA server example starts up and performs the LDS registration, the LDS application is closing the channel due to an error.

Code: Select all

Fri Jan  3 10:30:43 [11933]: Server startup complete. Host name is jeliser-thinkpad-x1.
Fri Jan  3 10:30:43 [11933]: Using certificate store at /opt/opcfoundation/ualds/pki/...
Fri Jan  3 10:30:43 [11933]: Opening endpoint 'opc.tcp://'...
Fri Jan  3 10:30:43 [11933]: Endpoint is open.
Fri Jan  3 10:30:45 [11933]: ualds_endpoint_callback called: Event=SecureChannelOpened, SecureChanneldId=0x00000001, uStatus=0x00000000
Fri Jan  3 10:30:45 [11933]: ualds_endpoint_callback: SecureChannel 0x00000001 opened with in mode 1 status 0x00000000!
Fri Jan  3 10:30:45 [11933]: [uastack] OpcUa_SecureListener_ProcessRequest: Closing channel due error 0x800B0000!
0x800B0000 corresponds to a UA_SCBADSERVICEUNSUPPORTED (https://documentation.unified-automatio ... e90a436aee). I'm at a loss where to go from here. I looked through the UA server base class and didn't find anything that jumped out at me. I thought maybe there was a virtual method or something that was missing, but I couldn't find anything.

Thanks again for the help!

Re: UaServer can't register with LDS

Posted: 03 Jan 2020, 18:56
by joshua.eliser
Also, I'm using the demo version of the SDK while the PO is being processed. Is the discovery component of the server note included with the demo SDK?

Re: UaServer can't register with LDS

Posted: 13 Jan 2020, 20:42
by joshua.eliser
We've purchased the licensed version of the UA C++ SDK and I'm still having the same problem. The UA server examples is unable to register with the LDS.