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
UaClient setAutoReconnect(false) does not prevent OPC UA Stack to reconnect
January 15, 2014
12:31, EET
Avatar
Roger
New Member
Members
Forum Posts: 2
Member Since:
January 14, 2014
sp_UserOfflineSmall Offline

Hi, in my application I would like to control reconnect attempts and I therefore tried to setAutoReconnect(false) and then listen to ServerState changes to control when to call reconnect. However it seems that this switch only disables the reconnect functionality in the Prosys OPC Java client stack and not in the OPC Foundation UA stack which still tries to reconnect.

Is this a bug or feature?

Best Regards,
Roger Eriksson Bjurek

January 15, 2014
12:44, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Well, yes the stack will try to resend packages, but the SDK manages the proper reconnection including channel and session recreation as necessary.

You might like to try also with the new (partly reworked) stack (and SDK) and see if it behaves any better in this situation. It is currently available as public beta.

May 24, 2019
15:24, EEST
Avatar
stielerit
New Member
Members
Forum Posts: 1
Member Since:
May 24, 2019
sp_UserOfflineSmall Offline

We tried to call setAutoReconnect(false) in SDK 4.0.0 and the client still reconnects when the connection is lost.
Any workaround / wrong behaviour?

May 24, 2019
16:16, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Hmm.. that should prevent it. At least as long as it is called before the connection break happens. I assume you do this? Otherwise please check that you are not calling UaClient.reconnect() manually somewhere.

How long/what kind of connection break it was? If the break is really short and returns as-if it never was broken that might go undetected as the status is read periodically from the server. See e.g. https://stackoverflow.com/questions/8007995/how-to-identify-a-broken-socket-connection-in-java-immediately.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 736

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6450

Newest Members:

kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1