9:10, EEST
April 12, 2018
I was testing LDS with the Prosys Java SDK. I downloaded the LDS from OPC foundation and installed and ran the LDS service. And then registered the sample Prosys Simulation server to the LDS. Now, if I try to connect to the LDS with the url opc.tcp://:4840, and then connect with Security mode None, I get the following exception.
Exception in thread “main” com.prosysopc.ua.client.ConnectException: Failed to create session channel to server: : opc.tcp://10.195.119.132:4840 [http://opcfoundation.org/UA/SecurityPolicy#None,None] ServiceResult=Bad_ServiceUnsupported (0x800B0000) “The server does not support the requested service.”
at com.prosysopc.ua.client.UaClient.u(SourceFile:4719)
at com.prosysopc.ua.client.UaClient.connect(SourceFile:784)
at com.prosysopc.ua.samples.client.SimpleClient.main(SimpleClient.java:41)
Caused by: org.opcfoundation.ua.common.ServiceResultException: Bad_ServiceUnsupported (0x800B0000) “The server does not support the requested service.”
at org.opcfoundation.ua.transport.tcp.io.TcpConnection$ReadThread.run(TcpConnection.java:783)
But, when I print client.getSupportedSecurityModes(), I get the following which clearly includes Security mode none.
[[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]]
Am I missing something here?
9:47, EEST
April 17, 2013
Hi Anusha,
The Local Discovery Server is not a normal OPC UA server in a sense that you cannot create a session to the server. This is the reason why the UaClient.connect method call fails with error message “The server does not support the requested service”. The error message is very informative as indeed this service is not supported by the LDS.
Instead, the idea is that OPC UA clients can discover registered servers by calling the FindServers Service on the LDS.
As an example on how to handle the discovery process, please see the example implementation in SampleConsoleClient.discover().
23:42, EEST
April 12, 2018
Ok, Thanks. I got it working. I had one other question. The LDS gives the application description of the servers registered to it. In the application description, I get the discovery URLs which has the host name of the server. But, in our case, we don’t normally have DNS setup and hence will always say unknown host exception if we connect to that url.
How do we get the IP address of the server instead of hostname in the url? Or is there other mechanism in the SDK which will give me the ip address of the corresponding hostname?
10:08, EEST
April 17, 2013
Hi Anusha,
You have a valid point that DNS setup is not always available and that can be problematic. But it’s good to note that this issue is not related to the LDS application in any way.
To begin with, the FindServers service call returns applications that are always on the same host computer as the LDS. So, if the OPC UA client application knew how to connect to the LDS, it should also know how to connect to the applications returned by the LDS. Because the hostname and ip-address is the same.
Now it’s also good to note that there’s also another service called FindServersOnNetwork. That may also return information about applications running on different host computers. But for now, let’s keep the discussion in the FindServers call only.
Furthermore, the LDS only stores information that was reported by the applications themselves. So, if the applications use hostname in their Endpoints and the client cannot resolve this hostname, it’s not the problem of the LDS but the applications and the DNS environment.
To put it shortly, you can either
– configure DNS environment properly or
– manually modify the endpoint to contain ip-address when connecting (you should know this already because you knew how to connect to the LDS) or
– change the applications that register to the LDS so that their Endpoints mention ip-addresses instead of hostnames.
Most Users Ever Online: 1919
Currently Online:
14 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: 729
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech KubalaModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1