18:30, EEST
August 20, 2014
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
18:41, EEST
April 3, 2012
9:42, EEST
August 20, 2014
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.
12:08, EEST
April 3, 2012
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)
Most Users Ever Online: 1919
Currently Online:
22 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: 729
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25ZofModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1