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
java.lang.IllegalStateException: Timer already cancelled
May 29, 2017
18:30, EEST
Avatar
Ibrahim
Member
Members
Forum Posts: 76
Member Since:
August 20, 2014
sp_UserOfflineSmall Offline

Hi,
i’m getting the above mentioned exception in an OPC UA Client application when i disconnect and reconnect to the server again. This happens when “client.connect” is called. The first connect works fine, but after disconnecting and reconnecting this happens. Is there something i have to do before connecting the client again?

Thanks.

Regards
Ibrahim

May 29, 2017
18:41, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Could you post the stacktrace of the exception? Also which version of the SDK you are using? (Or did you mean the graphical application?)

– Bjarne

May 30, 2017
9:42, EEST
Avatar
Ibrahim
Member
Members
Forum Posts: 76
Member Since:
August 20, 2014
sp_UserOfflineSmall Offline

I’m using the Client Server SDK Version 2.2.6-708. UaStack Version: 1.03.340.1-SNAPSHOT. We got this UaStack Version from you because we had an issue with the nagles algorithm. Please see this thread: https://forum.prosysopc.com/forum/opc-ua-java-sdk/first-read-takes-200-ms/

Stack Trace:
Exception in thread “HMI2017Server” java.lang.IllegalStateException: Timer already cancelled.
at java.util.Timer.sched(Timer.java:397)
at java.util.Timer.schedule(Timer.java:193)
at org.opcfoundation.ua.utils.TimerUtil.schedule(TimerUtil.java:92)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.createSecureChannel(SecureChannelTcp.java:747)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.open(SecureChannelTcp.java:585)
at org.opcfoundation.ua.application.Client.createSecureChannel(Client.java:615)
at org.opcfoundation.ua.application.Client.createSecureChannel(Client.java:527)
at org.opcfoundation.ua.application.Client.createSecureChannel(Client.java:580)
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.getEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.v(Unknown Source)
at com.prosysopc.ua.client.UaClient.connect(Unknown Source)
at com.itac.plcconnectorV2.opcua.client.OpcUaClient.initialize(OpcUaClient.java:220)
at com.itac.plcconnectorV2.opcua.client.OpcUaClient.run(OpcUaClient.java:112)
at java.lang.Thread.run(Thread.java:748)

Thanks.

June 8, 2017
12:08, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

The Nagle’s algorithm issue is fixed for stack 1.02.337.12 which comes with SDK 2.3.0, therefore I recommed to use that (or you can wait for SDK 2.3.2. which we probably release this or next week).

As for this issue. The only scenario that seems possible in order to get this exception is to do some operation for the SDK/Stack after calling StackUtils.shutdown(). Since it’s designed for case where you need to stop all threads in order to undeploy an application e.g. from a java application server (e.g. tomcat), operations after that have undefined behaviour. Unless you have such undeployment needs you should not need to call StackUtils.shutdown().

Unless the case is the above one, does the exception happen always i.e. is it reproducible easily?

– Bjarne

P.S. Originally SDK 2.3.0 was supposed to be for ua spec 1.03 therefore the stack 1.03 snapshot was given, however since we needed to do other fixes before that for the SDK and Stack and they were large enough that they warranted a larger version increment we decied to keep SDK 2.x for ua 1.02 and make future 3.0 for ua 1.03 spec)

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
32 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

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

Administrators: admin: 1