13:15, EEST
June 27, 2012
I’m working on changing security settings right now, and it looks like updating them after the server has started doesn’t work. I can change the authentication type and see the change take effect immediately, but if I call setSecurityModes() to change the security policies or message security modes, the changes don’t happen unless I completely shut the server down. Even calling shutdown() and start() doesn’t seem to pick up the changes. Is this something that should work?
When changing the authentication mode I’m seeing an exception. I set UAExpert and the server up to connect with anonymous authentication, and connected successfully. Then I changed the authentication mode on the server to Password, and tried to reconnect with UAExpert. I get the exception below when that happens. If I close and reopen UAExpert, it then realizes I need a password and works correctly.
2013-05-17 08:48:05,805[Blocking-Work-Executor-17] ERROR – While handling ActivateSessionRequest (id=1837502933)
UserTokenSignature=SignatureData (id=2096951071)
Signature=null
Algorithm=null
LocaleIds=class java.lang.String[1]
[0]=en
ClientSoftwareCertificates=class org.opcfoundation.ua.core.SignedSoftwareCertificate[0]
ClientSignature=SignatureData (id=1102519380)
Signature=null
Algorithm=null
UserIdentityToken=ExtensionObject (id=1554313344)
encodeType=EncodeType (id=463011245)
ordinal=0
name=Binary
object=byte[] (id=1353290500)
typeId=NodeId (id=754128123)
value=UnsignedInteger (id=2068093725)
value=324
type=IdType (id=1291261514)
ordinal=0
name=Numeric
namespaceIndex=0
hash=1142157539
RequestHeader=RequestHeader (id=182878667)
AuditEntryId=null
AuthenticationToken=NodeId (id=592657412)
value=UnsignedInteger (id=763968698)
value=4
type=IdType (id=1291261514)
namespaceIndex=0
RequestHandle=UnsignedInteger (id=217181873)
value=8
Timestamp=DateTime (id=1601023258)
value=130132684858030545
AdditionalHeader=null
ReturnDiagnostics=UnsignedInteger (id=1936026766)
value=0
TimeoutHint=UnsignedInteger (id=427800296)
value=10000
ServiceFault: Bad_InternalError (0x80020000) “An internal error occurred as a result of a programming or configuration error.”
Diagnostic Info: java.lang.NullPointerException
at com.prosysopc.ua.UserIdentity.decryptPassword(Unknown Source)
at com.prosysopc.ua.server.SessionManager$ServerUserIdentity.(Unknown Source)
at com.prosysopc.ua.server.SessionManager.activateSession(Unknown Source)
at com.prosysopc.ua.server.SessionServiceHandler.onActivateSession(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.opcfoundation.ua.application.ServiceHandlerComposition$1.serve(Unknown Source)
at org.opcfoundation.ua.application.ServiceHandlerComposition.serve(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpServer$UATcpServerConnection$UATcpServerSecureChannel.onSecureMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpServer$UATcpServerConnection.onSecureMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpConnection$3.onMessageComplete(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder.fireComplete(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder.setMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
at org.opcfoundation.ua.application.ServiceHandlerComposition$1.serve(Unknown Source)
at org.opcfoundation.ua.application.ServiceHandlerComposition.serve(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpServer$UATcpServerConnection$UATcpServerSecureChannel.onSecureMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpServer$UATcpServerConnection.onSecureMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.UATcpConnection$3.onMessageComplete(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder.fireComplete(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder.setMessage(Unknown Source)
at org.opcfoundation.ua.transport.tcp.nio.SecureInputMessageBuilder$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at com.prosysopc.ua.UserIdentity.decryptPassword(Unknown Source)
at com.prosysopc.ua.server.SessionManager$ServerUserIdentity.(Unknown Source)
at com.prosysopc.ua.server.SessionManager.activateSession(Unknown Source)
at com.prosysopc.ua.server.SessionServiceHandler.onActivateSession(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
… 11 more
2013-05-17 08:48:05,810 [Blocking-Work-Executor-16] INFO – Session closed:
2013-05-17 08:48:05,810 [Selector] INFO – AsyncSocketInputStream.close(): unexpected untriggered monitor
2013-05-17 08:48:05,811 [Selector] INFO – Secure Channel closed, token=SecurityToken(Id=1, secureChannelId=2, creationTime=May 17, 2013 8:48:05 AM, lifetime=3600000)
2013-05-17 08:48:05,811 [Selector] INFO – Channel closed: Id=2, open channels=0
6:35, EEST
December 21, 2011
No, the server has not been designed to support changing the modes while running. I also expect that UaExpert probably does not always recheck the supported modes, so it may use “old settings” when connecting. This will probably explain the error.
I suppose you have a valid use case for this, so we should probably take a look what it takes to enable this kind of behavior in the SDK. shutdown/start has not been supported officially either, but we have had some requests, so it is getting slowly better as well.
Most Users Ever Online: 1919
Currently Online:
19 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: 726
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1525
Posts: 6456
Newest Members:
ernestoportus31, martin123, rickie5305, shaylamaggard4, rickyjuarez140, jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowallModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1028, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1