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
OPC UA client cannot reconnect to OPC UA server after state change
October 24, 2022
16:43, EEST
Forum Posts: 3
Member Since:
June 1, 2022
sp_UserOfflineSmall Offline

Usually the OPC UA client (sdk 4.5.8-1468) gets in the state “Running” and connects properly to the server.
Ther’s absolutely no problem to subscribe to a certain node or anything else.
In the error case suddenly there’s a state change on server side and as soon as the server is up again the client is trying to subscribe to the needed nodes.
While the client is trying to subscribe to its needed nodes it crashes making the following log entry:

“Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.” “

What could be the reason for that?

Thanks a lot in advance!


October 24, 2022
17:57, EEST
Bjarne Boström
Forum Posts: 954
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline


Some servers sometimes do not have their nodes available immediately after reconnecting. I would say that is probably a bug and it should be reported to the server vendor. Though, depending on the server it might also be somewhat valid behavior depending on the data source (e.g. if it aggregates data from multiple sources, it might not have yet had a connection to all of them, and this might not be deterministic, so it might just have to accept incoming connections after some period).

That version of the SDK is quite old, I would recommend updating it. https://downloads.prosysopc.com/opcua/Prosys_OPC_UA_SDK_for_Java_4_Release_Notes.html, 4.6.0 added: “Improved: Subscription.setRecreateFailedItems(boolean) can be called to enable a Subscription to automatically attempt to recreate MonitoredItems with error code Bad_NodeIdUnknown since this StatusCode can imply in some cases that the Server hasn’t added that Node to its AddressSpace yet.” and in 4.8.0 that is by default true, due to these cases. And 4.9.0 is the latest version, thus I would recommend updating to that.

I should note that it could also be something else, but the above was the most typical case. For example, if you have made your MonitoredItems via NodeId, the index could have been changed on the server (per spec it can change every Session, only the 0 and 1 indexes are fixed, but like typically servers keep it static). This could be solved by making the item via ExpandedNodeId instead (by using the NamespaceUri version).

And also in theory the node could have been removed, there is no way for the SDK to know that, but I assume this is not the case here as you can validate that it probably exists.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 130

pramanj: 86

Francesco Zambon: 78

ibrahim: 75

rocket science: 73

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 665

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1430

Posts: 6119

Newest Members:

anitas, fakenatty, Negansaf, rheakempton93, JPasterkamp, mattiwenell, KevinGainy, jamiescooper, lonmackellar61, charleneeller1

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

Administrators: admin: 1