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: 430
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: 267

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 91

pramanj: 86

ibrahim: 68

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 36

Rainer Versteeg: 32

peterrob45: 25

Member Stats:

Guest Posters: 0

Members: 909

Moderators: 12

Admins: 1

Forum Stats:

Groups: 3

Forums: 14

Topics: 907

Posts: 3809

Newest Members:

sve, aimstormsolution, efogefabo, antoniovaughn, rbegert, ananyagupta, marisolcopeland, Waeuk, Tobs, anandhu

Moderators: Jouni Aro: 834, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 430, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 16, Markus Johansson: 1

Administrators: admin: 0