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
Discovery Mechanism
February 3, 2021
20:29, EET
Forum Posts: 30
Member Since:
June 2, 2019
sp_UserOfflineSmall Offline

I would want to know if my understanding of discovery mechanism is correct.
I am trying to emulate a unplanned exit of the server by closing the terminal of a running instance of the server. As per the specification, the LDS will be aware of this after 10mins, until which it would assume that the server still exists. However, my observation is that the server is existent even beyond 10mins, until I shut down the LDS.

Please let me know if my understanding is correct? Or am I emulating it wrong?


February 4, 2021
12:59, EET
Bjarne Boström
Forum Posts: 895
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline


I think your description is pretty much how it is defined in the specification, see:

https://reference.opcfoundation.org/v104/Core/docs/Part4/5.4.5/ (RegisterServer service call)

https://reference.opcfoundation.org/v104/Core/docs/Part4/7.27/ (the RegisteredServer parameter)

https://reference.opcfoundation.org/v104/GDS/docs/4.2.2/ (flow chart of the process; note that I’m not sure is the “GDS” in the url path a typo, since that is Part 12 of the core specification, unless that is changed recently, which is very well in the realms of possibilities; https://reference.opcfoundation.org/v104/)

So I would say it is most likely a LDS implementation bug, if it wont mark the server as offline. Basically the system relies on the server periodically registering that it is still online and the LDS having a timeout that will mark it as offline and that timer would be refreshed each time the server calls it is online.

Though, once again in my personal opinion, it is a separate question that is that info of any practical use.

If a server would immediately or during the 10min go offline, the info received by a client from LDS would be out of date and not reflecting reality, thus a client cannot assume the server being online ever (i.e. it cannot 100% rely on this info). However it could assume that it is offline if it is not shown online, which could maybe potentially be useful in some complicated reduncancy server setups for chosing e.g. initial server of some set to which to connect to. However, even in this case it would most likely need to see one of them online, which could be outdated info, but it could maybe be a tie-breaker option if it would have to chose from 2 servers (i.e. better anyway to try to connect to the one that is marked as online).

If a server would be repeatedly starting up, registering as online, but then immediately crashing, but then being restarted by some sort of watchdog, we would get a situation where the LDS would continuously show the server as online, but in practice you could never connect to that (or the timing would be very narrow).

Also it should be noted, that this was assuming a separate LDS application was meant, each OPC UA Server will also usually have an internal LDS, that responds to the FindServers calls returning the server. That runs in the “bare port”, without a server name, with the idea I guess that you could in theory have multiple OPC UA servers running on the same port differentiated by the ServerName part of the url only (like a web-server hosting multiple sites etc.). That internal one would typically also shut down when the normal server is shutting down.

We do not have our own (standalone) LDS implemenation (just the internal mentioned above), thus you should report this bug to the implementor of that LDS application. Once your app stops sending the RegisterServer calls the LDS should notice that by itself at most 10mins. Though it should be noted that we do try to call it with it being false if you properly .shutdown the UaServer, so you should be doing the emulation right by doing what you said.

Not exactly related, but could be useful info for anyone else reading in the future, the internal LDS cannot respond to FindServersOnNetwork, that is to be only implemented by standalone discoveryservers: https://reference.opcfoundation.org/v104/Core/docs/Part4/5.4.3/

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 124

pramanj: 86

ibrahim: 74

rocket science: 70

kapsl: 57

Sabari: 51

gjevremovic: 49

Xavier: 43

fred: 41

TimK: 41

Member Stats:

Guest Posters: 0

Members: 685

Moderators: 15

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1359

Posts: 5808

Newest Members:

doloreswanganeen, anqilan456, gaurav.kumar3, hulda51r1817, sonpaton9189533, Alexandercd, Matthewca, nadjettearmagnac, elwoodmerry7, eunicefisken

Moderators: Jouni Aro: 966, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 895, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 25, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 252, Lusetti: 0

Administrators: admin: 1