SampleConsoleServer could not register to Discovery Server on Embedded System

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

Moderator: uasdkjava

Post Reply
naksita
Jr. Member
Jr. Member
Posts: 2
Joined: 07 Sep 2012, 17:02

SampleConsoleServer could not register to Discovery Server on Embedded System

Post by naksita »

Hello,

I have a problem when I was trying to run the SampleConsoleServer.sh on Gumstix Overo Air Com (Ubuntu 10.04 armv7l) it shows this message during the server initialization
WARN Could not register server (offline) to Discovery Server at opc.tcp://localhost:4840 Cause: Failed to retrieve endpoints. The server is not available: opc.tcp://localhost:4840
INFO Compliance address space created.
INFO Address space created.
INFO Server endpoint bound to opc.tcp://127.0.1.1:52520/OPCUA/SampleConsoleServer
INFO Discovery endpoint bound to opc.tcp://127.0.1.1:52520/OPCUA/SampleConsoleServer
INFO Server endpoint bound to opc.tcp://localhost:52520/OPCUA/SampleConsoleServer
INFO Discovery endpoint bound to opc.tcp://localhost:52520/OPCUA/SampleConsoleServer
INFO Server endpoint bound to opc.tcp://naksita-desktop:52520/OPCUA/SampleConsoleServer
INFO Discovery endpoint bound to opc.tcp://naksita-desktop:52520/OPCUA/SampleConsoleServer
WARN Could not register server (online) to Discovery Server at opc.tcp://localhost:4840 Cause: Failed to retrieve endpoints. The server is not available: opc.tcp://localhost:4840
then the client from the other machine cannot connect to this server. I have no problem when I was running this SampleConsoleServer on PC.

I also tried to look in the code to see what happened but it seems that this problem occurs in UAServer.init() method which I don't have to source code.

Thank you in advance.
naksita

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

Re:SampleConsoleServer could not register to Discovery Server on Embedded System

Post by Support Team »

Hello naksita,

I assume you have no Discovery Server installed on the Linux box. Therefore the demo server is not able to register with the discovery server.

A client tries first to discover the available servers on a host using port 4840. I assume this is the problem with connecting the client. If you try the server URL directly it should work.

If you have only one OPC UA server running on a host, you can run this server directly on Port 4840 since every UA server is also a discovery server for itself.

Best Regards,
Unified Automation Support Team
Best regards
Unified Automation Support Team

naksita
Jr. Member
Jr. Member
Posts: 2
Joined: 07 Sep 2012, 17:02

Re:SampleConsoleServer could not register to Discovery Server on Embedded System

Post by naksita »

Thank you very much for your reply.

Yes, after I managed to run the server directly on port 4840 plus changed the /etc/hosts file to link my machine name to the network interface IP then I could connect the client to the server from different machine.

Best regards,
naksita

Benste
Jr. Member
Jr. Member
Posts: 1
Joined: 12 Feb 2014, 14:57

Re: SampleConsoleServer could not register to Discovery Serv

Post by Benste »

Same exception with .Net-FoundationSDK on Win7,
Server needed admin rights to register on LocalDiscoveryServer

Post Reply