Please consider registering

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, EEST
New Member
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..


November 28, 2019
11:53, EEST
Bjarne Boström
Forum Posts: 544
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline


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:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 103

pramanj: 86

ibrahim: 70

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 38

Rainer Versteeg: 32

Thomas Reuther: 31

Member Stats:

Guest Posters: 0

Members: 1102

Moderators: 14

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1008

Posts: 4266

Newest Members:

normagalindo47, aurelia27u, isobel41d356980, michaeldegli, gqbdolores, kez1399, jaclynmcvay358, testuser20, edox, danilolapine

Moderators: Jouni Aro: 851, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 544, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 20, Markus Johansson: 19, Matti Siponen: 53, Lusetti: 0

Administrators: admin: 0