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
Can we explicitly define the Endpoint url for OPC UA Server using Prosys OPCUA Java SDK?
November 27, 2019
13:15, EET
Avatar
anandhu
New Member
Members
Forum Posts: 1
Member Since:
November 27, 2019
sp_UserOfflineSmall Offline

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..

ThanksEmbarassed

November 28, 2019
11:53, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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().

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1