apache nifi和opc集成问题(getvalue处理器)

sc4hvdpw  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(556)

我集成了nifi opc ua[https://github.com/wadesalazar/nifi-opcua]使用ApacheNIFI 1.3的处理器。我关注以下url[https://community.hortonworks.com/articles/90355/collect-data-from-opc-ua-protocol.html]开始吧。我在windows上安装了prosys opc-ua的模拟opc服务器。
我能够从nifi上的getnodeids处理器提取消息,splittext处理器被用于逐行读取消息并发送到getvalue处理器,如示例所示,但是我的getvalue处理器不断抛出下面的错误。
我试图在getnodeids处理器中设置“starting node”属性,但无法确定应该设置什么节点属性,请在下面找到来自模拟服务器的示例数据。
从模拟opc服务器接收的样本数据:

nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=85
- nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2253
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2004
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2007
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2009
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2010
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2011
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2012
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11489
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11527
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2006
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2742
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2005
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2008
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2256
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2138
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2257
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2258
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2259
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2260
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2992
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2993
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2268
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2013
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2996
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2997
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11192
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11704
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2271
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2272
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2736
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2269
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2737
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=3704
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11703
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2735
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11702
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2274
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2020
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2275
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2290
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=3706
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2294
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2295
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2033
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2296
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2034
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=3709
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11313
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11314
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11312
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11492
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11493
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11494
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11715
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=11645
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=12637
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=12581
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=12642
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=12672
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=12675
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=12641
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=12710
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=12639
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=12640
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=12711
- - ns=2;s=MyObjectsFolder
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - - ns=2;s=MyDevice
- - - ns=2;s=MyDevice
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2255
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=68
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2994
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=68
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2254
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=68
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=2267
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=68
- ns=2;s=MyObjectsFolder
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - ns=2;s=MyDevice
- - - ns=2;s=MyDeviceType
- - - ns=2;s=MyEnumObject
- - - ns=2;s=MyLevel
- - - ns=2;s=MyLevel
- - - ns=2;s=MyLevel.Alarm
- - - ns=2;s=MyMethod
- - - ns=2;s=MySwitch
- - ns=2;s=MyDevice
- - - ns=2;s=MyDeviceType
- - - ns=2;s=MyEnumObject
- - - ns=2;s=MyLevel
- - - ns=2;s=MyLevel
- - - ns=2;s=MyLevel.Alarm
- - - ns=2;s=MyMethod
- - - ns=2;s=MySwitch
- ns=3;s=StaticData
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - ns=3;s=AccessLevels
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - - ns=3;s=AccessLevelCurrentRead
- - - ns=3;s=AccessLevelCurrentReadNotUser
- - - ns=3;s=AccessLevelCurrentReadWrite
- - - ns=3;s=AccessLevelCurrentWrite
- - - ns=3;s=AccessLevelCurrentWriteNotUser
- - ns=3;s=AnalogItemArrays
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - - ns=3;s=ByteAnalogItemArray
- - - ns=3;s=DoubleAnalogItemArray
- - - ns=3;s=FloatAnalogItemArray
- - - ns=3;s=Int16AnalogItemArray
- - - ns=3;s=Int32AnalogItemArray
- - - ns=3;s=Int64AnalogItemArray
- - - ns=3;s=SByteAnalogItemArray
- - - ns=3;s=UInt16AnalogItemArray
- - - ns=3;s=UInt32AnalogItemArray
- - - ns=3;s=UInt64AnalogItemArray
- - ns=3;s=AnalogItems
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - - ns=3;s=ByteAnalogItem
- - - ns=3;s=DoubleAnalogItem
- - - ns=3;s=FloatAnalogItem
- - - ns=3;s=Int16AnalogItem
- - - ns=3;s=Int32AnalogItem
- - - ns=3;s=Int64AnalogItem
- - - ns=3;s=SByteAnalogItem
- - - ns=3;s=Sample Instrument Int32AnalogItem
- - - ns=3;s=UInt16AnalogItem
- - - ns=3;s=UInt32AnalogItem
- - - ns=3;s=UInt64AnalogItem
- - ns=3;s=DataItems
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - - ns=3;s=BooleanDataItem
- - - ns=3;s=ByteDataItem
- - - ns=3;s=ByteStringDataItem
- - - ns=3;s=DateTimeDataItem
- - - ns=3;s=DoubleDataItem
- - - ns=3;s=FloatDataItem
- - - ns=3;s=GUIDDataItem
- - - ns=3;s=Int16DataItem
- - - ns=3;s=Int32DataItem
- - - ns=3;s=Int64DataItem
- - - ns=3;s=SByteDataItem
- - - ns=3;s=StringDataItem
- - - ns=3;s=UInt16DataItem
- - - ns=3;s=UInt32DataItem
- - - ns=3;s=UInt64DataItem
- - - ns=3;s=XmlElementDataItem
- - ns=3;s=DeepFolder
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - - ns=3;s=DeepObject01
- - ns=3;s=MultiStateItems
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - - ns=3;s=MultiStateDiscreteItem
- - ns=3;s=StaticArrayVariables
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - - ns=3;s=BooleanArray
- - - ns=3;s=ByteArray
- - - ns=3;s=ByteStringArray
- - - ns=3;s=DateTimeArray
- - - ns=3;s=DoubleArray
- - - ns=3;s=FloatArray
- - - ns=3;s=GUIDArrayArray
- - - ns=3;s=Int16Array
- - - ns=3;s=Int32Array
- - - ns=3;s=Int64Array
- - - ns=3;s=LocalizedTextArray
- - - ns=3;s=QualifiedNameArray
- - - ns=3;s=SByteArray
- - - ns=3;s=StringArray
- - - ns=3;s=UInt16Array
- - - ns=3;s=UInt32Array
- - - ns=3;s=UInt64Array
- - - ns=3;s=VariantArray
- - - ns=3;s=XmlElementArray
- - ns=3;s=StaticVariables
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - - ns=3;s=Boolean
- - - ns=3;s=Byte
- - - ns=3;s=ByteString
- - - ns=3;s=DateTime
- - - ns=3;s=Double
- - - ns=3;s=Duration
- - - ns=3;s=Enumeration
- - - ns=3;s=Float
- - - ns=3;s=GUID
- - - ns=3;s=Image
- - - ns=3;s=ImageBMP
- - - ns=3;s=ImageGIF
- - - ns=3;s=ImageJPG
- - - ns=3;s=ImagePNG
- - - ns=3;s=Int16
- - - ns=3;s=Int32
- - - ns=3;s=Int64
- - - ns=3;s=Integer
- - - ns=3;s=LocaleId
- - - ns=3;s=LocalizedText
- - - ns=3;s=NodeId
- - - ns=3;s=Number
- - - ns=3;s=QualifiedName
- - - ns=3;s=SByte
- - - ns=3;s=String
- - - ns=3;s=Time
- - - ns=3;s=UInt16
- - - ns=3;s=UInt32
- - - ns=3;s=UInt64
- - - ns=3;s=UInteger
- - - ns=3;s=UtcTime
- - - ns=3;s=Variant
- - - ns=3;s=XmlElement
- - ns=3;s=TwoStateItems
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - - ns=3;s=TwoStateDiscreteItem
- ns=4;s=NonUaNodeComplianceTest
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - ns=4;s=ByteString
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=SByte
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Time
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=String
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Int16
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Image
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=DateTime
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=LocalizedText
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=UtcTime
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=LocaleId
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=ImageGIF
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Number
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Int32
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=ImageBMP
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=UInteger
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Boolean
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=UInt64
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Enumeration
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=QualifiedName
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=GUID
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Duration
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Double
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Variant
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Integer
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Float
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=ImagePNG
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Int64
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=Byte
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=NodeId
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=XmlElement
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=UInt16
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=ImageJPG
- - - ns=4;s=NonUaNodeDataItemType
- - ns=4;s=UInt32
- - - ns=4;s=NonUaNodeDataItemType
- ns=5;s=85/0:Simulation
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - ns=5;s=Counter1
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=63
- - ns=5;s=Expression1
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=63
- - ns=5;s=Random1
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=63
- - ns=5;s=Sawtooth1
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=63
- - ns=5;s=SimulationServerNode11
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=63
- - ns=5;s=Sinusoid1
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=63
- - ns=5;s=Square1
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=63
- - ns=5;s=Triangle1
- - - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=63
- ns=6;s=MyBigNodeManager
- - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=61
- - ns=6;s=DataItem_0000
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0001
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0002
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0003
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0004
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0005
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0006
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0007
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0008
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0009
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0010
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0011
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0012
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0013
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0014
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0015
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0016
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0017
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0018
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0019
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0020
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0021
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0022
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0023
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0024
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0025
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0026
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0027
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0028
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0029
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0030
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0031
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0032
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0033
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0034
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0035
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0036
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0037
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0038
- - - ns=6;s=DataItemType
- - ns=6;s=DataItem_0039
- - - ns=6;s=DataItemType

例外情况:

2017-07-25 18:03:10,189 ERROR [Timer-Driven Process Thread-8] c.k.nifi.nifi_opcua_bundle.GetValue GetValue[id=55c6ac28-015d-1000-076b-844ca709cc40] GetValue[id=55c6ac28-015d-1000-076b-844ca709cc40] failed to process due to java.lang.IllegalArgumentException: Invalid string representation of a nodeId: - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=63; rolling back session: {}
java.lang.IllegalArgumentException: Invalid string representation of a nodeId: - nsu=http%3A%2F%2Fopcfoundation.org%2FUA%2F;i=63
    at org.opcfoundation.ua.builtintypes.NodeId.parseNodeId(NodeId.java:383)
    at com.kentender.nifi.nifi_opcua_services.StandardOPCUAService.getValue(StandardOPCUAService.java:346)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:89)
    at com.sun.proxy.$Proxy78.getValue(Unknown Source)
    at com.kentender.nifi.nifi_opcua_bundle.GetValue$2.process(GetValue.java:160)
    at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2529)
    at com.kentender.nifi.nifi_opcua_bundle.GetValue.onTrigger(GetValue.java:156)
    at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
    at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1120)
    at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
    at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
    at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
9cbw7uwe

9cbw7uwe1#

'nsu=http%3a%2f%2fopcfoundation.org%2fua%2f;i=63'表示expandednodeid,因此nifi代码应该使用expandednodeid.parseexpandednodeid()而不是nodeid.parsenodeid()。
或者,您需要将expandednodeid转换为nodeid,然后再将其传递给getvalue()。不幸的是,我不熟悉nifi,所以我不确定哪种方法是正确的。
这个问题源于opc-ua的“二元论”——一些服务(如browse)提供expandednodeid引用,而其他服务(如read)则希望获得nodeid示例。
expandednodeid可以将名称空间定义为uri(字符串中的“nsu”)或index(字符串中的“ns”),其中as nodeid只能将名称空间定义为索引。

相关问题