Avatar
Please consider registering
guest
sp_LogInOut Log Insp_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 RSSsp_TopicIcon
Implementation of connect to server when client starts first
April 10, 2026
11:07, EEST
Avatar
miti
Member
Members
Forum Posts: 7
Member Since:
January 26, 2024
sp_UserOfflineSmall Offline

If our OPC UA client starts without the server is up then the client don’t connect to server.
If server is up when the client starts and for restarts we have used the reconnect funcionality in the SDK.
We would like it to connect automatically when server connects comes online without needing to restart the client app.
What is the best way to achieve that?
Didn’t find something similar to the automatic reconnect feature for that use case.

I am about to do an implementation where on a failed connect we wait a while before trying to connect again.
Need to do it threaded as our app connects to several servers creating a client for each and twe want app to work for the servers that are up.
Is that the way to go or is there something I missed in OPC UA Java SDK that we can use instead?

April 10, 2026
13:58, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1081
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

That is the way to go. The initial connection must be done successfully manually, after that the SDK can take care of the rest. So basically have e.g. a List of UaClients that have not yet succeeded in a .connect and then periodically do .connect for them and once successful remove from the List. Or have separate thread per client to do the same.

It is possible we some day create something in the SDK that would make this easier.

April 10, 2026
14:30, EEST
Avatar
miti
Member
Members
Forum Posts: 7
Member Since:
January 26, 2024
sp_UserOfflineSmall Offline

Thanks for confirming that I am on the right track.Cool

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 40
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 100
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 773
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1558
Posts: 6567
Newest Members:
carlotae86, otiliabanks, kasha94646158368, bridgetterandle, julietabernacchi, eulakilvington, DavidBS, fcbuycom, xyygeorgetta, srijithvijay
Moderators: Jouni Aro: 1039, Pyry: 1, Petri: 1, Bjarne Boström: 1054, Jimmy Ni: 26, Matti Siponen: 359, Lusetti: 0
Administrators: admin: 1