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
Bad_IdentityTokenRejected” and “Bad_SessionNotActivated”
September 17, 2024
14:38, EEST
Avatar
swapnilbadgujar
New Member
Members
Forum Posts: 2
Member Since:
September 17, 2024
sp_UserOfflineSmall Offline

We are facing issue while connecting to OPCUA server.

Application:
We have SpringBoot Application which can connect to more than 1 OPCUA servers. We have added logic to handle retries as well if server was down on application start up.

Issue:
We are facing 2 issues: “Bad_IdentityTokenRejected” and “Bad_SessionNotActivated”

1. If Server 1 is Running and Server 2 is Down when Application is started, then we get Bad_IdentityTokenRejected on 1st Attempt and with 2nd Attempt it gets connected.
While 1st attempt, tried connecting to server from OPCUA Browser, connection was successful.

• Stack trace:
2024-09-16 21:17:25,318 [pool-2-thread-1] ERROR UaClientSubscriptionManager – Failed retry to connect to OPC UA server: UaServer1. Attempt 1/5
com.prosysopc.ua.SessionActivationException: Failed to activate Session. ServiceResult=Bad_IdentityTokenRejected (0x80210000) “The user identity token is valid but the server has rejected it.”
at com.prosysopc.ua.client.UaClient.ciO(SourceFile:5530)
at com.prosysopc.ua.client.UaClient.connect(SourceFile:1067)
at UaClientSubscriptionManager.connectAndSubscribe(UaClientSubscriptionManager.java:101)
at UaClientSubscriptionManager.lambda$scheduleRetryWithFixedDelay$0(UaClientSubscriptionManager.java:128)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: ServiceFault [ResponseHeader=”ResponseHeader [Timestamp=”09/16/24 15:47:25.3130000 GMT”, RequestHandle=”0″, ServiceResult=”Bad_IdentityTokenRejected (0x80210000) “The user identity token is valid but the server has rejected it.””, ServiceDiagnostics=”Diagnostic Info:
“, StringTable=”null”, AdditionalHeader=”null”]”]

2nd Attempt Connects
Server 2 Started after 3rd Attempt – Connects

2. If Server 1 and Application are started simultaneously, we get “Bad_SessionNotActivated” error for connecting to Server. After so many retries of connect (~1 min) client connects to Server successfully.

• Stack trace:
2024-09-16 21:30:40,952 [main] ERROR handler.ServerDataBrowseAndMappingHandler – Failed to browse root node of OPC UA server Server2 with error Failed while browsing nodes with error ServiceFault [ResponseHeader=”ResponseHeader [Timestamp=”09/16/24 16:00:40.9500000 GMT”, RequestHandle=”1406″, ServiceResult=”Bad_SessionNotActivated (0x80270000) “The session cannot be used because ActivateSession has not been called.””, ServiceDiagnostics=”Diagnostic Info:
“, StringTable=”null”, AdditionalHeader=”null”]”]
BrowseUaNodeException: Failed while browsing nodes with error ServiceFault [ResponseHeader=”ResponseHeader [Timestamp=”09/16/24 16:00:40.9500000 GMT”, RequestHandle=”1406″, ServiceResult=”Bad_SessionNotActivated (0x80270000) “The session cannot be used because ActivateSession has not been called.””, ServiceDiagnostics=”Diagnostic Info:
“, StringTable=”null”, AdditionalHeader=”null”]”]

handler.ServerDataBrowseAndMappingHandler.browseAndProcessServerData(ServerDataBrowseAndMappingHandler.java:80)
at OpcUaNodeCollector.lambda$init$0(OpcUaNodeCollector.java:50)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.concurrent.ConcurrentHashMap$EntrySpliterator.forEachRemaining(ConcurrentHashMap.java:3652)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at .init(OpcUaNodeCollector.java:47)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:365)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:237)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:168)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:451)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:397)
at NodeMappingConfiguration.init(NodeMappingConfiguration.java:82)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:365)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:237)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:168)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:451)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:397)
at UaClientSubscriptionManager.connectUaClient(UaClientSubscriptionManager.java:80)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:365)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:237)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:168)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:451)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:397)
at .initializeUaClients(UaClientFactory.java:92)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:365)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:237)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:168)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:451)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:384)
at org.springframework.boot.context.event.EventPublishingRunListener.ready(EventPublishingRunListener.java:109)
at org.springframework.boot.SpringApplicationRunListeners.lambda$ready$6(SpringApplicationRunListeners.java:80)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112)
at org.springframework.boot.SpringApplicationRunListeners.ready(SpringApplicationRunListeners.java:80)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:348)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at UiBackendApplication.main(UiBackendApplication.java:10)
Caused by: com.prosysopc.ua.ServiceException: ServiceFault [ResponseHeader=”ResponseHeader [Timestamp=”09/16/24 16:00:40.9500000 GMT”, RequestHandle=”1406″, ServiceResult=”Bad_SessionNotActivated (0x80270000) “The session cannot be used because ActivateSession has not been called.””, ServiceDiagnostics=”Diagnostic Info:
“, StringTable=”null”, AdditionalHeader=”null”]”] ServiceResult=Bad_SessionNotActivated (0x80270000) “The session cannot be used because ActivateSession has not been called.” Diagnostics=Diagnostic Info:

at com.prosysopc.ua.client.UaClient.a(SourceFile:5967)
at com.prosysopc.ua.client.UaClient.read(SourceFile:3266)
at com.prosysopc.ua.client.UaClient.readAttributes(SourceFile:3553)
at com.prosysopc.ua.client.UaClient.readAttributes(SourceFile:3520)
at com.prosysopc.ua.client.AddressSpace.getNode(SourceFile:954)
at com.prosysopc.ua.client.AddressSpace.getNode(SourceFile:874)
at UaClientHelper.browseNodeAndFillMapRecursively(UaClientHelper.java:83)
… 78 more
Caused by: ServiceFault [ResponseHeader=”ResponseHeader [Timestamp=”09/16/24 16:00:40.9500000 GMT”, RequestHandle=”1406″, ServiceResult=”Bad_SessionNotActivated (0x80270000) “The session cannot be used because ActivateSession has not been called.””, ServiceDiagnostics=”Diagnostic Info:
“, StringTable=”null”, AdditionalHeader=”null”]”]
at com.prosysopc.ua.stack.transport.impl.AsyncResultImpl.waitForResult(SourceFile:293)
at com.prosysopc.ua.stack.transport.tcp.io.SecureChannelTcp.serviceRequest(SourceFile:883)
at com.prosysopc.ua.stack.transport.tcp.io.SecureChannelTcp.serviceRequest(SourceFile:822)
at com.prosysopc.ua.stack.application.SessionChannel.serviceRequest(SourceFile:439)
at com.prosysopc.ua.stack.transport.ChannelService.Read(SourceFile:965)
at com.prosysopc.ua.client.UaClient.a(SourceFile:5961)
… 84 more
2024-09-16 21:30:41,427 [PublishTask-com.prosysopc.ua.client.UaClient@16a14076] INFO com.prosysopc.ua.stack.transport.tcp.io.SecureChannelTcp – 3 Closed
2024-09-16 21:30:41,427 [PublishTask-com.prosysopc.ua.client.UaClient@16a14076] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52521 Closed
2024-09-16 21:30:41,427 [TcpConnection/Read] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52521 Closed (expected).
.
.
.
2024-09-16 21:31:41,692 [PublishTask-com.prosysopc.ua.client.UaClient@16a14076] INFO com.prosysopc.ua.stack.transport.tcp.io.SecureChannelTcp – 53 Closed
2024-09-16 21:31:41,692 [PublishTask-com.prosysopc.ua.client.UaClient@16a14076] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52521 Closed
2024-09-16 21:31:41,692 [TcpConnection/Read] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52521 Closed (expected)
2024-09-16 21:31:41,693 [PublishTask-com.prosysopc.ua.client.UaClient@16a14076] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52521 Connecting
2024-09-16 21:31:41,697 [PublishTask-com.prosysopc.ua.client.UaClient@16a14076] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – Connected (non-reverse), handshake completed, local=/127.0.0.1:56917, remote=/127.0.0.1:52521
2024-09-16 21:31:41,750 [PublishTask-com.prosysopc.ua.client.UaClient@16a14076] INFO com.prosysopc.ua.client.Subscription – Requesting missing NotificationMessage (SequenceNumber=1) from the server using Republish: Target SequenceNumber=1
2024-09-16 21:31:41,751 [PublishTask-com.prosysopc.ua.client.UaClient@16a14076] INFO com.prosysopc.ua.client.Subscription – Failed to get a response to Republish (SequenceNumber=1): Error=Bad_SubscriptionIdInvalid (0x80280000) “The subscription id is not valid.”
2024-09-16 21:31:41,751 [PublishTask-com.prosysopc.ua.client.UaClient@16a14076] INFO com.prosysopc.ua.client.UaClient – Subscription ID=1726502428 no longer valid (), recreating
2024-09-16 21:31:41,755 [PublishTask-com.prosysopc.ua.client.UaClient@16a14076] INFO com.prosysopc.ua.client.UaClient – reconnect: Reconnected to server (session reactivated)

September 17, 2024
15:30, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

For an application like this where there isn’t a user pressing a ‘connect button’ (my assumption here), basically first have an UaClient object per Server. Put all known such UaClients on startup first to an “unconnected clients” set. Any later new UaClients should also be put to this set. In some background thread try calling UaClient.connect for all clients of this set (at the same time or sequentially, doesn’t matter). If any succeeds, remove that UaClient from the set and now that UaClient can be used by the application. For any failures try again (until success) on loop.

Once UaClient.connect has successfully connected (i.e. doesn’t throw), then you should not call .connect again, unless you do call .disconnect (and basically then you should return the UaClient back to the set). SDK handles reconnections automatically by default once initially successfully connected (until .disconnect) (if you disable automatic reconnections, then reconnects instead must be done by manually repeatedly calling .reconnect and not .connect, unless you .disconnect).

You didn’t mention SDK version nor edition, but basically unless the server was made with our SDK, there isn’t nothing we can do about what the server does and returns. Normally at least if a server has properly started and does accept connections, it shouldn’t fail to Bad_IdentityTokenRejected or Bad_SessionNotActivated.

Note however that you must not call any other methods than .connect until connect succeeds, e.g. you shouldn’t call e.g. .read before there is a connection/session, othewise it will fail (and in a multithreaded application you must ensure no other threads try to use the client until there is a connection). Note that if the connection is lost after connected then calls can still fail.

September 18, 2024
8:09, EEST
Avatar
swapnilbadgujar
New Member
Members
Forum Posts: 2
Member Since:
September 17, 2024
sp_UserOfflineSmall Offline

We are doing the same. We have maintained one Map for configuredClients and one for connectedClients, Once client is connected we add it into connectedClients map and then only browse for nodes for that server.

There are 2 issues basically.
1. If Server 1 is Running and Server 2 is Down when Application is started, then we get Bad_IdentityTokenRejected on 1st Attempt and with 2nd Attempt it gets connected.
While 1st attempt, tried connecting to server from OPCUA Browser, connection was successful.

Here we are connecting to server from application and OPCUA Browser at the same time. Connection from OPCUA browser is successful and from application it gives Bad_IdentityTokenRejected.

2. If Server 1 and Application are started simultaneously, we get “Bad_SessionNotActivated” error for connecting to Server. After so many retries of connect (takes ~1 min), client connects (which happens through your code) to Server successfully.

We are using prosys-opc-ua-sdk-for-java-5.2.2-139-client-server SDK for server and client.

September 18, 2024
10:54, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

In that case (i.e. our SDK talks to “itself”) if you use the sampleconsoleclient connecting to sampleconsoleserver, after you have started the sampleconsoleserver, you should be able to use the flags ‘-u opcua -p opcua’ (such as e.g. on linux when started from the SDK .zip ‘sh sampleconsoleclient.sh -u opcua -p opcua’). That should be enough proof that it doesn’t need a second attempt. On the server it goes to the sample com.prosysopc.ua.samples.server.MyUserValidator.onValidate(Session, ServerUserIdentity), which just checks that hardcoded user+password example.

P.S.
Note that the sampleconsoleclient does ask to trust the certificate once during connect if you haven’t done that already (e.g. by having sign or sign&encrypt connection or previously trusted it) as the credentials must be encrypted using the servers public key.

Then you should be able to find a difference to your application. Basically if it works with the samples there isn’t much we can do, but if you are able to reproduce the problem with them somehow it would be easier to investigate or explain.

P.S.2.
Browser does make an extra GetEndpoints step i.e. technically 3 connections. Normally Clients do open a connection for GetEndpoints and then close that one and then using the endpoint make the real connection (basically we only need the servers certificate from it). GetEndpoints can fail faster and currently listening UaClient.connect separate steps is not possible so the first one is used to tell the user faster if the connection doesn’t work, thus that is why Browser does one extra before starting the UaClient.connect, however this should have no difference to any server, but it is technically a difference that could be observed using wireshark thus mentioning.

October 3, 2024
12:56, EEST
Avatar
jyotisathe
Member
Members
Forum Posts: 3
Member Since:
September 16, 2024
sp_UserOfflineSmall Offline

We tried to run 2 servers in Anonymous mode for which we have overriden onValidate method which returns true.

Still we see connection between server and client gets connected then closed again connected. (bolded part)

Is this expected behavior.

2024-10-01 19:05:24,381 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52520 Connecting
2024-10-01 19:05:24,393 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – Connected (non-reverse), handshake completed, local=/127.0.0.1:55966, remote=/127.0.0.1:52520
2024-10-01 19:05:24,464 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.SecureChannelTcp – 5 Closed
2024-10-01 19:05:24,464 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52520 Closed
2024-10-01 19:05:24,464 [TcpConnection/Read] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52520 Closed (expected)
2024-10-01 19:05:24,512 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52520 Connecting
2024-10-01 19:05:24,513 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – Connected (non-reverse), handshake completed, local=/127.0.0.1:55967, remote=/127.0.0.1:52520
2024-10-01 19:05:24,521 [main] INFO com.prosysopc.ua.client.UaClient – Server sent a certificate, although SecurityPolicy NONE is used
2024-10-01 19:05:24,572 [main] INFO com.prosysopc.ua.client.UaClient – Using OperationLimits [maxMonitoredItemsPerCall=10000, maxNodesPerBrowse=10000, maxNodesPerHistoryReadData=10000, maxNodesPerHistoryReadEvents=10000, maxNodesPerHistoryUpdateData=10000, maxNodesPerHistoryUpdateEvents=10000, maxNodesPerMethodCall=10000, maxNodesPerNodeManagement=10000, maxNodesPerRead=10000, maxNodesPerRegisterNodes=10000, maxNodesPerTranslateBrowsePathsToNodeIds=10000, maxNodesPerWrite=10000]
2024-10-01 19:05:25,064 [main] INFO com.prosysopc.ua.typedictionary.TypeDictionary – TypeDictionary initialized successfully
2024-10-01 19:05:25,089 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52521 Connecting
2024-10-01 19:05:25,090 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – Connected (non-reverse), handshake completed, local=/127.0.0.1:55969, remote=/127.0.0.1:52521
2024-10-01 19:05:25,093 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.SecureChannelTcp – 8 Closed
2024-10-01 19:05:25,093 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52521 Closed
2024-10-01 19:05:25,093 [TcpConnection/Read] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52521 Closed (expected)
2024-10-01 19:05:25,094 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – /127.0.0.1:52521 Connecting
2024-10-01 19:05:25,096 [main] INFO com.prosysopc.ua.stack.transport.tcp.io.TcpConnection – Connected (non-reverse), handshake completed, local=/127.0.0.1:55970, remote=/127.0.0.1:52521
2024-10-01 19:05:25,100 [main] INFO com.prosysopc.ua.client.UaClient – Server sent a certificate, although SecurityPolicy NONE is used
2024-10-01 19:05:25,104 [main] INFO com.prosysopc.ua.client.UaClient – Using OperationLimits [maxMonitoredItemsPerCall=10000, maxNodesPerBrowse=10000, maxNodesPerHistoryReadData=10000, maxNodesPerHistoryReadEvents=10000, maxNodesPerHistoryUpdateData=10000, maxNodesPerHistoryUpdateEvents=10000, maxNodesPerMethodCall=10000, maxNodesPerNodeManagement=10000, maxNodesPerRead=10000, maxNodesPerRegisterNodes=10000, maxNodesPerTranslateBrowsePathsToNodeIds=10000, maxNodesPerWrite=10000]
2024-10-01 19:05:25,437 [main] INFO com.prosysopc.ua.typedictionary.TypeDictionary – TypeDictionary initialized successfully

October 3, 2024
13:34, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Yes, that is expected behavior. First connection/channel cannot use security, does GetEndpoints, which gives us the certificate of the server, which is then used in the second one for secure connection. The securitymode of a channel is fixed upon construction, so it cannot be swapped. The logic is the same in the SDK even if you choose the NONE securitymode.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
40 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: 734

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1523

Posts: 6449

Newest Members:

christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518

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

Administrators: admin: 1