Avatar
Please consider registering
guest
sp_LogInOut Log Insp_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 RSSsp_TopicIcon
Connect to a OpcUa Server takes a long time
May 16, 2025
17:16, EEST
Avatar
rocket science
Member
Members
Forum Posts: 99
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Hi there,

I have one OpcUa Server where the connect takes very long (~2min).

In the log I can see that there is a very long time between a logging called ‘Using Operation Limits’ and ‘TypeDictionary initialized successfully’

Here are the logs:

16:54:51,543|UaApplication |INFO |Prosys OPC UA SDK for Java v4.10.2-62
16:54:51,543|UaApplication |INFO |(c) Prosys OPC Ltd.
16:54:52,333|TcpConnection |INFO |/10.17.150.115:4840 Connecting
16:54:52,563|TcpConnection |INFO |Connected (non-reverse), handshake completed, local=/10.14.0.98:51177, remote=/10.17.150.115:4840
16:54:52,876|TcpConnection |INFO |/10.17.150.115:4840 Closed
16:54:52,878|UaClient |INFO |Using an alternate endpoint URL ‘opc.tcp://10.22.22.180:4840’ instead of the requested ‘opc.tcp://10.17.150.115:4840’
16:54:52,879|TcpConnection |INFO |/10.17.150.115:4840 Closed (expected)
16:54:56,321|TcpConnection |INFO |/10.17.150.115:4840 Connecting
16:54:56,432|TcpConnection |INFO |Connected (non-reverse), handshake completed, local=/10.14.0.98:51178, remote=/10.17.150.115:4840
16:54:56,746|CryptoUtil |INFO |Using CryptoProvider com.prosysopc.ua.stack.transport.security.BcCryptoProvider
16:55:06,410|UaClient |WARN |Could not Read OperationLimit: Server/ServerCapabilities/OperationLimits/MaxNodesPerHistoryReadData with NodeId: i=12165, either the server does not have the node or the read didn’t return a Good value that can be interpreted as UnsignedInteger, value was: DataValue(value=(null), statusCode=Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=null, serverPicoseconds=0), using default value of 4294967295 instead (note that this will be overriden by clientside limits if lower)
16:55:06,411|UaClient |WARN |Could not Read OperationLimit: Server/ServerCapabilities/OperationLimits/MaxNodesPerHistoryReadEvents with NodeId: i=12166, either the server does not have the node or the read didn’t return a Good value that can be interpreted as UnsignedInteger, value was: DataValue(value=(null), statusCode=Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=null, serverPicoseconds=0), using default value of 4294967295 instead (note that this will be overriden by clientside limits if lower)
16:55:06,411|UaClient |WARN |Could not Read OperationLimit: Server/ServerCapabilities/OperationLimits/MaxNodesPerHistoryUpdateData with NodeId: i=12167, either the server does not have the node or the read didn’t return a Good value that can be interpreted as UnsignedInteger, value was: DataValue(value=(null), statusCode=Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=null, serverPicoseconds=0), using default value of 4294967295 instead (note that this will be overriden by clientside limits if lower)
16:55:06,411|UaClient |WARN |Could not Read OperationLimit: Server/ServerCapabilities/OperationLimits/MaxNodesPerHistoryUpdateEvents with NodeId: i=12168, either the server does not have the node or the read didn’t return a Good value that can be interpreted as UnsignedInteger, value was: DataValue(value=(null), statusCode=Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=null, serverPicoseconds=0), using default value of 4294967295 instead (note that this will be overriden by clientside limits if lower)
16:55:06,411|UaClient |WARN |Could not Read OperationLimit: Server/ServerCapabilities/OperationLimits/MaxNodesPerNodeManagement with NodeId: i=11713, either the server does not have the node or the read didn’t return a Good value that can be interpreted as UnsignedInteger, value was: DataValue(value=(null), statusCode=Bad_NodeIdUnknown (0x80340000) “The node id refers to a node that does not exist in the server address space.”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=null, serverPicoseconds=0), using default value of 4294967295 instead (note that this will be overriden by clientside limits if lower)
16:55:06,411|UaClient |INFO |Using OperationLimits [maxMonitoredItemsPerCall=1000, maxNodesPerBrowse=2000, maxNodesPerHistoryReadData=10000, maxNodesPerHistoryReadEvents=10000, maxNodesPerHistoryUpdateData=10000, maxNodesPerHistoryUpdateEvents=10000, maxNodesPerMethodCall=1, maxNodesPerNodeManagement=10000, maxNodesPerRead=2000, maxNodesPerRegisterNodes=2000, maxNodesPerTranslateBrowsePathsToNodeIds=2000, maxNodesPerWrite=2000]

*** after that line at 16:55:06,411 there are no SDK specific loggings, the next one is over 2 min later:

16:57:18,268|TypeDictionary|INFO |TypeDictionary initialized successfully

Do you have any idea what is happening here?

The BuildInfo is:

BuildInfo [ProductUri=https://www.siemens.com/s7-1200, ManufacturerName=”SIEMENS AG”, ProductName=”SIMATIC S7-1200 OPC UA”, SoftwareVersion=”FW: V.4.7.0″, BuildNumber=”00″, BuildDate=”01/01/70 00:00:00.0000000 GMT”]

May 16, 2025
18:10, EEST
Avatar
rocket science
Member
Members
Forum Posts: 99
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

I’ve also found that there is a

16:57:18,464 onStateChange: (Old/New) Unknown/Failed – ServerStatusError : GOOD (0x00000000) “The operation succeeded.”

and the onStatusChange also reports State=Failed all the time…

16:57:18,464 onStatusChange: status=ServerStatusDataType [… State=”Failed”, …] statusCode=GOOD (0x00000000) “The operation succeeded.”
16:57:19,598 onStatusChange: status=ServerStatusDataType [… State=”Failed”, …] statusCode=GOOD (0x00000000) “The operation succeeded.”
16:57:20,792 onStatusChange: status=ServerStatusDataType [… State=”Failed”, …] statusCode=GOOD (0x00000000) “The operation succeeded.”
16:57:22,002 onStatusChange: status=ServerStatusDataType [… State=”Failed”, …] statusCode=GOOD (0x00000000) “The operation succeeded.”
16:57:23,075 onStatusChange: status=ServerStatusDataType [… State=”Failed”, …] statusCode=GOOD (0x00000000) “The operation succeeded.”
16:57:24,169 onStatusChange: status=ServerStatusDataType [… State=”Failed”, …] statusCode=GOOD (0x00000000) “The operation succeeded.”
16:57:25,328 onStatusChange: status=ServerStatusDataType [… State=”Failed”, …] statusCode=GOOD (0x00000000) “The operation succeeded.”
16:57:26,524 onStatusChange: status=ServerStatusDataType [… State=”Failed”, …] statusCode=GOOD (0x00000000) “The operation succeeded.”

Maybe this is somehow related with the problem that the connect takes soo long.

And what I’ve also found is that I could add Subscriptions with MonitoredDataItems which was successful (Subscription got SubscriptionId, and MonitoredItem got MonitoredItemId, and also the ‘onAfterCreate’ listener was executed), but it seems that the server does not send out the onDataChange (maybe also because of the Server Status State=Failed ?)

May 16, 2025
18:18, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1039
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

At connect, the UaClient is initializing the TypeDictionary cache, which it needs for decoding custom structures.

If you think you don’t really need that or prefer to do it later, you can use

client.setInitTypeDictionaryOnConnect(false);
client.setInitTypeDictionaryAutoUsage(false);

to prevent it happening at the connection phase.

But yeah, if the ServerState is Failed, it means that the server is in a fatal error state for some reason, and cannot really provide meaningful data.

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 27
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 99
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 769
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1556
Posts: 6563
Newest Members:
odellflournoy9, Robertlom, kimhastings59, fentuy, KBrendel, GarryTerse, Shawnreify, Albertfug, madisonkilburn0, renafitchett0
Moderators: Jouni Aro: 1039, Pyry: 1, Petri: 1, Bjarne Boström: 1052, Jimmy Ni: 26, Matti Siponen: 359, Lusetti: 0
Administrators: admin: 1