13:15, EET
November 27, 2019
I am a beginner to OPCUA. Iwas able to run the sampleConsoleServer in a remote server. I am able to acess it remotely using the IP address of the server. But the OPC Server is returning an endpoint that is defined based on the machine name. The hostname is actually different from the machine name and hence is a problem. If there is any way i can set the hostname of the endpoint in the code this issue would be solved..
Thanks
11:53, EET
April 3, 2012
Hi,
If I may ask why it is a problem? Generally speaking the hostname is the one you use to connect. If that doesn’t work, then your DNS settings should be checked so that it can resolve that.
Generally in practice the endpointUrl should not be used for the connection, unless you have nothing else. For examples connecting into a server behind NAT usually isn’t aware of the address translation (regardless of that the specification magically assumes this to be the case). But it should also be noted that the specification has NAT workaround such as that the Client should be able to deal with this (1.04 Part 12 Annex A), i.e. it might need to just use the initial connection address.
Additionally it should be noted that the EndpointUrl Hostname portion should be a hostname of the machine, therefore using the (to my knowledge) Windows-only “Machine name” is not an option. OPC UA (and Java) are platform-independent so I do not think using the Machine name would make sense (however, as long as your OS can convert that to suitable IP address, connecting with that should by itself work; note that “Machine name” only works within a LAN).
I would recommend making the Machine name and hostname the same. Alternatively you could add a second hostname that matches the machine name. Note that by default we will only get one hostname (the one ApplicationIdentity.getActualHostName() returns, and that is best-effort search). Additionally it should be noted that multiple hostnames-scenario is not that well tested, but should work. However you do need to pass the hostnames for certificate generation and add the extra ones to UaServer.addEndpointHost().
Most Users Ever Online: 1919
Currently Online:
28 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: 728
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuartModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1