Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
SampleConsoleServer: Could not register server (online) to Discovery Server
March 11, 2015
5:50, EET
Avatar
jansen
Member
Members
Forum Posts: 8
Member Since:
February 5, 2015
sp_UserOfflineSmall Offline

Hi,

I ran the SampleConsoleServer out of the box to test for connection with Softing OPC Toolbox.
In the log of the server, I received this warning.

03/11/2015 13:45:50.156 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

Could you assist me on this?

Thanks.

March 11, 2015
12:03, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

The server will try to register itself automatically to the Local Discovery Server, which is a separate component, available from OPC Foundation: https://opcfoundation.org/developer-tools/developer-kits-unified-architecture/local-discovery-server-lds/

If you know that the LDS is not available, you can comment out the line where ‘server.setDiscoveryServerAddress(discoveryAddress)’ is called or provide cmd line option -d- for the SampleConsoleServer.

March 12, 2015
1:44, EET
Avatar
jansen
Member
Members
Forum Posts: 8
Member Since:
February 5, 2015
sp_UserOfflineSmall Offline

I installed the local discovery server on my system and now received another warning.

03/12/2015 09:42:50.160 WARN Could not register server (online) to Discovery Server at opc.tcp://localhost:4840 Cause: Failed to create secure channel to server: : opc.tcp://INSTSGP0002N.bosch-si.com:4840 [http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15,SignAndEncrypt]

How do I create this secure channel to the server?

March 12, 2015
8:34, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

OK, yes this is expected as well. The registration requires a secure connection. This on the other hands requires that the Local Discovery Server accepts the certificate of your server. You will need to go the certificate store of LDS (‘C:\ProgramData\OPC Foundation\UA\Discovery\pki\’) and move the server certificate from ‘rejected’ to the ‘trusted\certs’. The server will trust the LDS certificate automatically.

April 5, 2015
14:46, EEST
Avatar
hypnosis01
Member
Members
Forum Posts: 7
Member Since:
April 5, 2015
sp_UserOfflineSmall Offline

Hi,
I have the same problem.
I also installed the local discovery server on my system.But it doesn’t work.
The problem is still there
on trying to run the SampleConsoleServer, I get the following log.
* Prosys OPC UA Java SDK v2.1.0-436
* (c) Prosys PMS Ltd.

* Running in EVALUATION mode
* Connections will close after 120 minutes

04/05/2015 22:28:56.476 INFO Issuer certificate loaded from PKI\CA\private\ProsysSampleCA.der
04/05/2015 22:28:57.507 INFO Issuer private key loaded from PKI\CA\private\ProsysSampleCA.pem
04/05/2015 22:28:57.507 INFO Reading application certificate from C:\OPCWorkspace\opcnamespace\OpcSamples\PKI\CA\private\SampleConsoleServer.der
04/05/2015 22:28:57.507 INFO Reading private key from keystore C:\OPCWorkspace\opcnamespace\OpcSamples\PKI\CA\private\SampleConsoleServer.pem
04/05/2015 22:28:57.523 INFO HTTPS certificate loaded from PKI\CA\private\SampleConsoleServer_https.der
04/05/2015 22:28:57.523 INFO HTTPS private key loaded from PKI\CA\private\SampleConsoleServer_https.pem
04/05/2015 22:28:57.726 INFO Loading model from jar:file:/C:/OPCWorkspace/opcuajava/lib/Prosys-OPC-UA-Java-SDK-Client-Server-Evaluation-2.1.0-436.jar!/com/prosysopc/ua/server/Opc.Ua.NodeSet2.xml
04/05/2015 22:29:03.773 WARN Connection failed: Bad_ConnectionRejected (code=0x80AC0000, description=”2158755840, Connection refused: connect”)
04/05/2015 22:29:04.867 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
04/05/2015 22:29:05.195 INFO Address space created.
04/05/2015 22:29:05.460 INFO Server endpoint: https://rfyF14:52443/OPCUA/SampleConsoleServer [[http://opcfoundation.org/UA/SecurityPolicy#None,None]]
04/05/2015 22:29:06.742 INFO Endpoint bound to: [10.0.2.14:52443, 127.0.0.1:52443]
04/05/2015 22:29:06.742 INFO Server endpoint: opc.tcp://rfyF14:52520/OPCUA/SampleConsoleServer [[http://opcfoundation.org/UA/SecurityPolicy#None,None], [http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15,Sign], [http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15,SignAndEncrypt], [http://opcfoundation.org/UA/SecurityPolicy#Basic256,Sign], [http://opcfoundation.org/UA/SecurityPolicy#Basic256,SignAndEncrypt]]
04/05/2015 22:29:06.757 INFO Endpoint bound to: [10.0.2.14:52520, 127.0.0.1:52520]
04/05/2015 22:29:07.242 INFO Session NOT Activated: Unknown Token=i=2314509064
04/05/2015 22:29:07.507 INFO Session created: 26e580c9-5fdf-4bab-8691-dbae05e37ea5-01044EC1 (ID=ns=1;g=506e7c4d-aa1a-45f0-998d-0c9763e8c966 Token=i=2314999221 Channel=(SecureChannelId=1 State=Open URL=opc.tcp://rfyF14:52520/OPCUA/SampleConsoleServer RemoteAddress=/192.168.59.203:18476))
onValidate: userIdentity=Type=Anonymous
04/05/2015 22:29:07.554 INFO Session activated: 26e580c9-5fdf-4bab-8691-dbae05e37ea5-01044EC1 (ID=ns=1;g=506e7c4d-aa1a-45f0-998d-0c9763e8c966 Token=i=2314999221 Channel=(SecureChannelId=1 State=Open URL=opc.tcp://rfyF14:52520/OPCUA/SampleConsoleServer RemoteAddress=/192.168.59.203:18476))
04/05/2015 22:29:07.804 WARN Connection failed: Bad_ConnectionRejected (code=0x80AC0000, description=”2158755840, Connection refused: connect”)
04/05/2015 22:29:08.742 INFO Acknowledge on Subscription 1: 1 – Bad_SequenceNumberUnknown
04/05/2015 22:29:08.882 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
04/05/2015 22:29:08.898 INFO Simulation started.

——————————————————-
– Enter D to enable/disable server diagnostics
– Enter a to add a new node
– Enter d to delete a node
– Enter e to send an event
– Enter x to close the server
activateAlarm: severity=700

April 5, 2015
14:49, EEST
Avatar
hypnosis01
Member
Members
Forum Posts: 7
Member Since:
April 5, 2015
sp_UserOfflineSmall Offline

Looking forward to your help, thank you.

April 7, 2015
6:29, EEST
Avatar
hypnosis01
Member
Members
Forum Posts: 7
Member Since:
April 5, 2015
sp_UserOfflineSmall Offline

Hi,
According to the above way, I did.
But the emergence of a new exception

* Prosys OPC UA Java SDK v2.1.0-436
* (c) Prosys PMS Ltd.

* Running in EVALUATION mode
* Connections will close after 120 minutes

04/06/2015 13:48:33.936 INFO SecurityProvider initialized from org.bouncycastle.jce.provider.BouncyCastleProvider
04/06/2015 13:48:33.936 INFO Using SecurityProvider BC
04/06/2015 13:48:37.463 INFO localhost/127.0.0.1:4840 Connecting
04/06/2015 13:48:37.478 INFO localhost/127.0.0.1:4840 Connected
04/06/2015 13:48:37.494 INFO 41536 Closed
04/06/2015 13:48:37.494 INFO localhost/127.0.0.1:4840 Closed
04/06/2015 13:48:37.494 INFO localhost/127.0.0.1:4840 Closed (expected)
04/06/2015 13:48:37.494 INFO localhost/127.0.0.1:4840 Connecting
04/06/2015 13:48:37.510 INFO localhost/127.0.0.1:4840 Connected
04/06/2015 13:48:37.994 WARN Could not register server (offline) to Discovery Server at opc.tcp://localhost:4840 Cause: ServiceFault: Bad_DiscoveryUrlMissing (0x80510000) “No DiscoveryUrl was specified.”
Diagnostic Info:
04/06/2015 13:48:38.478 INFO Enabled protocols in SSL Engine are [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]
04/06/2015 13:48:38.478 INFO Enabled CipherSuites in SSL Engine are [TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_RC4_128_SHA, TLS_ECDH_ECDSA_WITH_RC4_128_SHA, TLS_ECDH_RSA_WITH_RC4_128_SHA, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_RC4_128_MD5, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
04/06/2015 13:48:38.478 INFO CipherSuites for policies (null) are [SSL_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA]
04/06/2015 13:48:38.478 INFO Endpoint bound to https://WIN-6BVO721SR9U:52443/OPCUA/SampleConsoleServer
04/06/2015 13:48:38.478 INFO Endpoint bound to https://WIN-6BVO721SR9U:52443
04/06/2015 13:48:38.493 INFO Endpoint bound to https://WIN-6BVO721SR9U:52443/OPCUA/SampleConsoleServer
04/06/2015 13:48:38.493 INFO Endpoint bound to https://WIN-6BVO721SR9U:52443
04/06/2015 13:48:38.493 INFO TCP/IP Socket bound to /10.0.2.15:52520
04/06/2015 13:48:38.493 INFO TCP/IP Socket bound to /127.0.0.1:52520
04/06/2015 13:48:38.509 INFO localhost/127.0.0.1:4840 Connecting
04/06/2015 13:48:38.509 INFO localhost/127.0.0.1:4840 Connected
04/06/2015 13:48:38.526 INFO 41538 Closed
04/06/2015 13:48:38.526 INFO localhost/127.0.0.1:4840 Closed
04/06/2015 13:48:38.526 INFO localhost/127.0.0.1:4840 Closed (expected)
04/06/2015 13:48:38.526 INFO localhost/127.0.0.1:4840 Connecting
04/06/2015 13:48:38.526 INFO localhost/127.0.0.1:4840 Connected

——————————————————-
– Enter D to enable/disable server diagnostics
– Enter a to add a new node
– Enter d to delete a node
– Enter e to send an event
– Enter x to close the server
activateAlarm: severity=700
activateAlarm: severity=500

Thanks.

April 7, 2015
16:00, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

This is weird. Can you connect to the server with any client?
Because the only way for that error to happen if there are no endpoints in the server which should be impossible.

Can you add the following line to the log.properties file located in the same directory as SampleConsoleServer:
log4j.logger.com.prosysopc.ua.server.UaServer=DEBUG
and rerun/paste log here.

– Bjarne

April 8, 2015
13:44, EEST
Avatar
hypnosis01
Member
Members
Forum Posts: 7
Member Since:
April 5, 2015
sp_UserOfflineSmall Offline

I added (log4j.logger.com.prosysopc.ua.server.UaServer=DEBUG) in the log.properties file,
The Abnormal log:
04/08/2015 21:36:25.312 INFO localhost/127.0.0.1:4840 Connecting
04/08/2015 21:36:25.327 INFO localhost/127.0.0.1:4840 Connected
04/08/2015 21:36:25.390 INFO 7692485 Closed
04/08/2015 21:36:25.390 INFO localhost/127.0.0.1:4840 Closed
04/08/2015 21:36:25.390 WARN localhost/127.0.0.1:4840 Error
org.opcfoundation.ua.common.ServiceResultException: Bad_SecurityPolicyRejected (0x80550000) “The security policy does not meet the requirements set by the Server.”
at org.opcfoundation.ua.transport.tcp.io.TcpConnection$ReadThread.run(Unknown Source)
04/08/2015 21:36:25.405 INFO localhost/127.0.0.1:4840 Connecting
04/08/2015 21:36:25.405 INFO localhost/127.0.0.1:4840 Connected
04/08/2015 21:36:26.622 WARN Could not register server (offline) to Discovery Server at opc.tcp://localhost:4840 Cause: ServiceFault: Bad_DiscoveryUrlMissing (0x80510000) “No DiscoveryUrl was specified.”
Diagnostic Info:
04/08/2015 21:36:27.422 INFO Server endpoint: opc.tcp://CorpOpcVM15:52520/OPCUA/SampleConsoleServer [[http://opcfoundation.org/UA/SecurityPolicy#None,None], [http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15,Sign], [http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15,SignAndEncrypt], [http://opcfoundation.org/UA/SecurityPolicy#Basic256,Sign], [http://opcfoundation.org/UA/SecurityPolicy#Basic256,SignAndEncrypt]]
04/08/2015 21:36:27.437 INFO TCP/IP Socket bound to /10.0.2.15:52520

Any help to point me in the right direction would be greatly appreciated.

October 20, 2016
18:30, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Looks like this issue wasn’t ever checked properly. turns out that the server does not specify the DiscoveryUrls properly, and the current LDS gives and error for it, whereas an older version did not.

But, in fact, this only happens during the first offline registration – the following online registration works fine.

However, this will be fixed in Java SDK 2.2.6

October 21, 2016
5:26, EEST
Avatar
tzls
Member
Members
Forum Posts: 4
Member Since:
October 20, 2016
sp_UserOfflineSmall Offline

I got the same problem. Could not register server (offline) to Discovery Server at opc.tcp://localhost:4840 Cause: ServiceFault: Bad_DiscoveryUrlMissing (0x80510000) “No DiscoveryUrl was specified.” How can I solve this problem?Thanks!

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 731

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

PromotionToold, HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1