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
SecurityToken has timeouted due WINDOWS date change
December 19, 2014
16:38, EET
Avatar
d.zinato
Member
Members
Forum Posts: 9
Member Since:
September 25, 2013
sp_UserOfflineSmall Offline

Hi,

I found this problem during a test session, using OPC UA Java SDK version 2.0.0.194.
My OPC UA client application was connected to a Kepware 5 server, and I moved the Windows date from 19 December 2014 to 26 December 2014, to simulate a week change.

My application raised this error :

2014-12-26 17:12:44,015 WARN – /127.0.0.1:49320 SecurityToken SecurityToken(Id=1, secureChannelId=29967744, creationTime=19-dic-2014 17.02.34, lifetime=3600000) has timeouted
2014-12-26 17:12:44,015 INFO – /127.0.0.1:49320 Closed
2014-12-26 17:12:44,047 ERROR – [osgi.tkdata.services.impl.usersdataupdater] updateHmiButtons – error on writing [MB.USER_PC20.PC.BUTTONS900] on plant:Bad_UnexpectedError (code=0x80010000, description=”SecurityToken 1 has timeouted”)
com.prosysopc.ua.client.UaClient.a(Unknown Source)
com.prosysopc.ua.client.UaClient.write(Unknown Source)
com.prosysopc.ua.client.UaClient.writeAttribute(Unknown Source)
osgi.tkdata.services.impl.opcuadriverimpl.OPCUaAsyncDriverImpl.writeItem(OPCUaAsyncDriverImpl.java:339)
osgi.tkdata.services.impl.usersdataupdater.internal.UsersDataUpdaterImpl.updateHmiButtons(UsersDataUpdaterImpl.java:367)
osgi.tkdata.services.impl.usersdataupdater.internal.UsersDataUpdaterImpl.doUpdateUsersDataOnPlant(UsersDataUpdaterImpl.java:92)
osgi.tkdata.services.impl.usersdataupdater.internal.UsersDataUpdaterImpl.updateUsersDataOnPlant(UsersDataUpdaterImpl.java:277)
osgi.tkdata.services.impl.usersdataupdater.event.UserDataUpdaterEventHandler.handleEvent(UserDataUpdaterEventHandler.java:26)
org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
osgi.tkdata.services.impl.planteventgeneratorimpl.internal.EventProcessor.processEventInDataManagerMode(EventProcessor.java:102)
osgi.tkdata.services.impl.planteventgeneratorimpl.internal.EventProcessor.processEvent(EventProcessor.java:65)
osgi.tkdata.services.impl.planteventgeneratorimpl.internal.PlantDataManagerThread.run(PlantDataManagerThread.java:94)

2014-12-26 17:12:44,110 WARN – /127.0.0.1:49320 SecurityToken SecurityToken(Id=1, secureChannelId=29967738, creationTime=19-dic-2014 17.02.27, lifetime=3600000) has timeouted
2014-12-26 17:12:44,110 INFO – /127.0.0.1:49320 Closed
2014-12-26 17:12:44,125 WARN – /127.0.0.1:49320 SecurityToken SecurityToken(Id=1, secureChannelId=29967742, creationTime=19-dic-2014 17.02.32, lifetime=3600000) has timeouted
2014-12-26 17:12:44,125 INFO – /127.0.0.1:49320 Closed
2014-12-26 17:12:44,125 WARN – /127.0.0.1:49320 SecurityToken SecurityToken(Id=1, secureChannelId=29967734, creationTime=19-dic-2014 17.02.23, lifetime=3600000) has timeouted
2014-12-26 17:12:44,125 INFO – /127.0.0.1:49320 Closed
2014-12-26 17:12:44,157 WARN – /127.0.0.1:49320 SecurityToken SecurityToken(Id=1, secureChannelId=29967732, creationTime=19-dic-2014 17.02.21, lifetime=3600000) has timeouted
2014-12-26 17:12:44,157 INFO – /127.0.0.1:49320 Closed
2014-12-26 17:12:44,157 WARN – /127.0.0.1:49320 SecurityToken SecurityToken(Id=1, secureChannelId=29967740, creationTime=19-dic-2014 17.02.29, lifetime=3600000) has timeouted
2014-12-26 17:12:44,157 INFO – /127.0.0.1:49320 Closed
2014-12-26 17:12:44,157 WARN – /127.0.0.1:49320 SecurityToken SecurityToken(Id=1, secureChannelId=29967736, creationTime=19-dic-2014 17.02.25, lifetime=3600000) has timeouted
2014-12-26 17:12:44,157 INFO – /127.0.0.1:49320 Closed

After this stacktrace, all the read/write operation raised errors : i had to disconnect and reconnect to Kepware server to solve them.

My question is : can i intercept the security token timeout at code side, and force disconnect and reconnect automatically?
Because, this can be a great problem during the next time change day (28th march 2015).

Thanks

December 22, 2014
11:19, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

That is quite expected, since the security tokens have a certain life time – and they are checked against the clock. But I suppose it should probably recover from that a bit better, anyway.

Daylight Saving Time changes are not a real problem, since all timestamps that are used are UTC – and won’t therefore be affected of plain time zone changes.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
24 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: 731

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

inilarythikibia, rickykennion, PromotionToold, HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466

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

Administrators: admin: 1