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
ERROR AddressSpace.readReferences
August 8, 2016
16:12, EEST
Avatar
gjevremovic
Member
Members
Forum Posts: 49
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

Hi,
Below is what we get in log while our client (prosys SDK 2.2.0-552) browses custom opc ua server.
It starts ok from root node, and reads well nodes from namespace 0, but when starts with some nodes from ns 4 (custom nodes are there),
it starts with:
08.08.2016 15:01:03,428 ERROR AddressSpace.readReferences – readReferences
com.prosysopc.ua.StatusException: BAD (0x80000000) “” StatusCode=BAD (0x80000000) “”
at com.prosysopc.ua.client.UaClient.checkOperationResult(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.checkOperationResult(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.readReferences(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.getNode(Unknown Source)
This exception doesn’t interrupt further browsing. I think it browse all the tree ( I guess, I see in log a lot of nodes exported),
so this exception is catched and forward browsing continues without problem.
It throws the exception at line 5:

1 if (ref.getIsForward()
2 && (ref.getNodeClass().toString().equalsIgnoreCase("Object") || ref.getNodeClass().toString()
3 .equalsIgnoreCase("Variable"))) {
4 NodeId nodeId = addressSpace.getNamespaceTable().toNodeId(ref.getNodeId());
5 UaNode uaNode = addressSpace.getNode(nodeId);
6 }

I can’t find what is wrong in server as UaExpert browse through the tree and I can’t see any bad statuses or similar.
Also client works good with other servers (UaDemoCpp, UaAnsiCSdk, Siemens, Beckhoff), no error spotted.
What it can be?

Best regards,
GJevremovic

August 9, 2016
10:39, EEST
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

The error message basically states that when the client tried to read references of some node, the server responded with StatusCode bad.

Could you test further and see what node is used as a parameter in the getNode and subsequent readReferences method call? You should be able to find out this node if you raise the log level of AddressSpace class to debug level.

What kind of references should this node have? For example, if you look at the references of that node with some third party OPC UA Client, what do you see?

Also, it would be nice to know if this same error happens with the latest SDK version 2.2.2.

August 9, 2016
15:11, EEST
Avatar
gjevremovic
Member
Members
Forum Posts: 49
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

Thank you for fast reply.
For this node in log “APPL.Application.Historizer.values[143].led2” with UaExpert I see no references, It is leaf node.
No inversion or forward reference.

With debug switch on for prosys api this is extended log (one more exception is there):

09.08.2016 13:40:31,571 DEBUG AddressSpace.getNode – getNode: nodeId=i=47 node=NodeId=i=47, NodeClass=ReferenceType, BrowseName=HasComponent, IsAbstract=false, Symmetric=false, InverseName=ComponentOf
09.08.2016 13:40:31,571 DEBUG AddressSpace.getNode – getNode: nodeId=ns=4;s=APPL.Application.Historizer.values[143].led2 node=null
09.08.2016 13:40:31,572 DEBUG UaNodeImpl.getProperty – getProperty: name=MaxNodesPerRead
09.08.2016 13:40:31,636 DEBUG AddressSpace.getNode – classValues: [DataValue(value=2, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:46.9408843 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:46.9408843 GMT, serverPicoseconds=0), DataValue(value=4:led2, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:46.9408845 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:46.9408845 GMT, serverPicoseconds=0), DataValue(value=(en-US) led2, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:46.9408847 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:46.9408847 GMT, serverPicoseconds=0)]
09.08.2016 13:40:31,636 DEBUG AddressSpace.getNode – NodeClass: Variable
09.08.2016 13:40:31,702 DEBUG AddressSpace.browse – browse: c=null
09.08.2016 13:40:31,702 DEBUG UaClientNodeFactory.a – createInstance: public com.prosysopc.ua.client.nodes.UaVariableImpl(com.prosysopc.ua.client.AddressSpace,org.opcfoundation.ua.builtintypes.NodeId,org.opcfoundation.ua.builtintypes.QualifiedName,org.opcfoundation.ua.builtintypes.LocalizedText)
09.08.2016 13:40:31,702 DEBUG NodeCache.addNode – addNode: node=4:led2 Id=ns=4;s=APPL.Application.Historizer.values[143].led2
09.08.2016 13:40:31,702 DEBUG NodeCache.S – trimQueue
09.08.2016 13:40:31,702 DEBUG AddressSpace.getNode – typeDefinition not local:i=0
09.08.2016 13:40:31,702 DEBUG AddressSpace.readNode – readNode: node=NodeId=ns=4;s=APPL.Application.Historizer.values[143].led2, NodeClass=Variable, BrowseName=4:led2 DataType=i=24, ValueRank=-1, MinimumSamplingInterval=-1.000000, AccessLevel=[CurrentRead, CurrentWrite, HistoryRead, HistoryWrite, SemanticChange], UserAccessLevel=[CurrentRead, CurrentWrite, HistoryRead, HistoryWrite, SemanticChange], Historizing=false, Value=DataValue(value=(null), statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=null, serverPicoseconds=0)
09.08.2016 13:40:31,702 DEBUG AddressSpace.readNode – readNode: attributes=[1, 2, 3, 4, 5, 6, 7, 13, 14, 15, 16, 17, 18, 19, 20]
09.08.2016 13:40:31,702 DEBUG AddressSpace.readAttributes – readAttributes(NodeId=ns=4;s=APPL.Application.Historizer.values[143].led2, NodeClass=Variable, BrowseName=4:led2 DataType=i=24, ValueRank=-1, MinimumSamplingInterval=-1.000000, AccessLevel=[CurrentRead, CurrentWrite, HistoryRead, HistoryWrite, SemanticChange], UserAccessLevel=[CurrentRead, CurrentWrite, HistoryRead, HistoryWrite, SemanticChange], Historizing=false, Value=DataValue(value=(null), statusCode=GOOD (0x00000000) “”, sourceTimestamp=null, sourcePicoseconds=0, serverTimestamp=null, serverPicoseconds=0), [1, 2, 3, 4, 5, 6, 7, 13, 14, 15, 16, 17, 18, 19, 20])
09.08.2016 13:40:31,702 DEBUG UaNodeImpl.getProperty – getProperty: name=MaxNodesPerRead
09.08.2016 13:40:31,771 DEBUG AddressSpace.readAttributes – readAttributes: attribute=NodeId value=DataValue(value=ns=4;s=APPL.Application.Historizer.values[143].led2, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757830 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757830 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,772 DEBUG UaNodeImpl.writeAttributeValue – writeAttributeValue attributeId=1 value=ns=4;s=APPL.Application.Historizer.values[143].led2
09.08.2016 13:40:31,772 DEBUG AddressSpace.readAttributes – readAttributes: attribute=NodeClass value=DataValue(value=2, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757832 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757832 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,772 DEBUG AddressSpace.readAttributes – readAttributes: attribute=BrowseName value=DataValue(value=4:led2, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757834 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757834 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,772 DEBUG UaNodeImpl.writeAttributeValue – writeAttributeValue attributeId=3 value=4:led2
09.08.2016 13:40:31,772 DEBUG AddressSpace.readAttributes – readAttributes: attribute=DisplayName value=DataValue(value=(en-US) led2, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757836 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757836 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,772 DEBUG UaNodeImpl.writeAttributeValue – writeAttributeValue attributeId=4 value=(en-US) led2
09.08.2016 13:40:31,772 DEBUG AddressSpace.readAttributes – readAttributes: attribute=Description value=DataValue(value=(en-US) led2, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757838 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757838 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,772 DEBUG UaNodeImpl.writeAttributeValue – writeAttributeValue attributeId=5 value=(en-US) led2
09.08.2016 13:40:31,772 DEBUG AddressSpace.readAttributes – readAttributes: attribute=WriteMask value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757839 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757839 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,772 DEBUG UaNodeImpl.writeAttributeValue – writeAttributeValue attributeId=6 value=0
09.08.2016 13:40:31,772 DEBUG AddressSpace.readAttributes – readAttributes: attribute=UserWriteMask value=DataValue(value=0, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757841 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757841 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,772 DEBUG UaNodeImpl.writeAttributeValue – writeAttributeValue attributeId=7 value=0
09.08.2016 13:40:31,773 DEBUG AddressSpace.readAttributes – readAttributes: attribute=Value value=DataValue(value=true, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757843 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757843 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,773 DEBUG AddressSpace.readAttributes – readAttributes: attribute=DataType value=DataValue(value=i=1, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757845 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757845 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,773 DEBUG AddressSpace.readAttributes – readAttributes: attribute=ValueRank value=DataValue(value=-1, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757847 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757847 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,773 DEBUG AddressSpace.readAttributes – readAttributes: attribute=ArrayDimensions value=DataValue(value=(null), statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757848 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757848 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,773 DEBUG AddressSpace.readAttributes – readAttributes: attribute=AccessLevel value=DataValue(value=3, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757850 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757850 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,773 DEBUG AddressSpace.readAttributes – readAttributes: attribute=UserAccessLevel value=DataValue(value=3, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757852 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757852 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,773 DEBUG AddressSpace.readAttributes – readAttributes: attribute=MinimumSamplingInterval value=DataValue(value=100, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757854 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757854 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,773 DEBUG AddressSpace.readAttributes – StatusException:
com.prosysopc.ua.StatusException: Cannot write value StatusCode=Bad_InvalidArgument (0x80AB0000) “One or more arguments are invalid.”
at com.prosysopc.ua.client.nodes.UaVariableImpl.writeAttributeValue(Unknown Source)
at com.prosysopc.ua.client.nodes.UaNodeImpl.setAttribute(Unknown Source)
at com.prosysopc.ua.client.nodes.UaVariableImpl.setAttribute(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.readAttributes(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.readNode(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.getNode(Unknown Source)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:784)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:938)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:938)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:938)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:938)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:938)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.createOpcUaSymbolFile(OpcUaServerBrowser.java:310)
at my.opcua.browser.OpcUaServerBrowser.main(OpcUaServerBrowser.java:286)
Caused by: java.lang.ClassCastException: org.opcfoundation.ua.builtintypes.UnsignedInteger cannot be cast to java.lang.Double
… 20 more
09.08.2016 13:40:31,773 DEBUG AddressSpace.readAttributes – readAttributes: attribute=Historizing value=DataValue(value=false, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757856 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757856 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,774 DEBUG AddressSpace.getNode – getNode: node=NodeId=ns=4;s=APPL.Application.Historizer.values[143].led2, NodeClass=Variable, BrowseName=4:led2 DataType=i=1, ValueRank=-1, MinimumSamplingInterval=-1.000000, AccessLevel=[CurrentRead, CurrentWrite], UserAccessLevel=[CurrentRead, CurrentWrite], Historizing=false, Value=DataValue(value=true, statusCode=GOOD (0x00000000) “”, sourceTimestamp=08/09/16 14:33:47.0757843 GMT, sourcePicoseconds=0, serverTimestamp=08/09/16 14:33:47.0757843 GMT, serverPicoseconds=0)
09.08.2016 13:40:31,774 DEBUG AddressSpace.readReferences – readReferences: node=4:led2
09.08.2016 13:40:31,837 ERROR AddressSpace.readReferences – readReferences
com.prosysopc.ua.StatusException: BAD (0x80000000) “” StatusCode=BAD (0x80000000) “”
at com.prosysopc.ua.client.UaClient.checkOperationResult(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.checkOperationResult(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.readReferences(Unknown Source)
at com.prosysopc.ua.client.AddressSpace.getNode(Unknown Source)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:784)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:938)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:938)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:938)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:938)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.addTreeNode(OpcUaServerBrowser.java:938)
at my.opcua.browser.OpcUaServerBrowser.dumpOpcUaAddressSpace(OpcUaServerBrowser.java:758)
at my.opcua.browser.OpcUaServerBrowser.createOpcUaSymbolFile(OpcUaServerBrowser.java:310)
at my.opcua.browser.OpcUaServerBrowser.main(OpcUaServerBrowser.java:286)
09.08.2016 13:40:31,838 DEBUG AddressSpace.readProperties – readProperties: node=4:led2 properties=null
09.08.2016 13:40:31,838 DEBUG AddressSpace.getNode – getNode: nodeId=i=1 node=NodeId=i=1, NodeClass=DataType, BrowseName=Boolean, IsAbstract=false
09.08.2016 13:40:31,838 DEBUG UaClientReference.getIsInverse – getIsInverse: nodeId=i=1 sourceId=nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=24 targetId=nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=1
09.08.2016 13:40:31,838 DEBUG AddressSpace.getNode – getNode: nodeId=i=24 node=NodeId=i=24, NodeClass=DataType, BrowseName=BaseDataType, IsAbstract=false
09.08.2016 13:40:31,838 DEBUG UaClientReference.getIsInverse – getIsInverse: nodeId=i=1 sourceId=nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=24 targetId=nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=1
09.08.2016 13:40:31,838 DEBUG AddressSpace.getNode – getNode: nodeId=i=24 node=NodeId=i=24, NodeClass=DataType, BrowseName=BaseDataType, IsAbstract=false
09.08.2016 13:40:31,903 ERROR OpcUaServerBrowser.addTreeNode – *****
BAD (0x80000000) “”

August 9, 2016
17:17, EEST
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

Thank you for the additional log. There are two different exceptions shown indeed.

The first exception is Bad_InvalidArgument which is caused by java.lang.ClassCastException: org.opcfoundation.ua.builtintypes.UnsignedInteger cannot be cast to java.lang.Double. The MinimumSamplingInterval attribute should be of data type Duration which is a Double in practice. For some reason the MinimumSamplingInterval attribute of the node APPL.Application.Historizer.values[143].led2 seems to be UnsignedInteger even though it should be a Double. Does the server application handle MinimumSamplingInterval values as UnsignedIntegers?

The second exception is the original StatusCode=BAD from readReferences. Unfortunately, raising the log level to debug provides no additional information. Basically the only thing that is shown here is that the server responds with StatusCode=BAD to client browse requests. You mentioned that there’s no references visible in the node also with UaExpert. In OPC UA, there’s usually at least one inverse reference also in leaf nodes. This is the inverse reference pointing to the parent node. In addition to this, usually always nodes have a type definition. This leads me to believe that actually the same response is returned for UaExpert. This is most probably a server side issue.

Can you access the server application log and see if there’s some information about why the StatusCode is bad when references of the node APPL.Application.Historizer.values[143].led2 are browsed?

September 7, 2016
16:35, EEST
Avatar
gjevremovic
Member
Members
Forum Posts: 49
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

Hi Heikki,
sorry I missed to answer. In server log I didn’t found nothing additional but yes this was server issues. I received the info from server developers that it was developed not according specification. UaExpert does not report these kind of errors. Actually I didn’t noticed that this does not affect my client stability, it just skips “bad” nodes.
BR,
Goran

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
18 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: 730

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

PromotionToold, HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus

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

Administrators: admin: 1