hadoop - Apache Nifi and OPC integration issue (GetValue processor) -


i have integrated nifi opc ua [https://github.com/wadesalazar/nifi-opcua] process apache knife 1.3.i following url [https://community.hortonworks.com/articles/90355/collect-data-from-opc-ua-protocol.html] started. have installed simulation opc server press on windows.

i able pull messages getnodeids processor on nifi, , splittext processor being used reading messages line line , sending getvalue processor shown in example, getvalue processor continuously throwing below error.

i tried set "starting node" property in getnodeids processor, not able make out node property should set, please find below sample data simulation server.

sample data received simulation opc server:

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 

exception:

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 process due java.lang.illegalargumentexception: invalid string representation of nodeid: - nsu=http%3a%2f%2fopcfoundation.org%2fua%2f;i=63; rolling session: {} java.lang.illegalargumentexception: invalid string representation of nodeid: - nsu=http%3a%2f%2fopcfoundation.org%2fua%2f;i=63     @ org.opcfoundation.ua.builtintypes.nodeid.parsenodeid(nodeid.java:383)     @ com.kentender.nifi.nifi_opcua_services.standardopcuaservice.getvalue(standardopcuaservice.java:346)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:497)     @ org.apache.nifi.controller.service.standardcontrollerserviceinvocationhandler.invoke(standardcontrollerserviceinvocationhandler.java:89)     @ com.sun.proxy.$proxy78.getvalue(unknown source)     @ com.kentender.nifi.nifi_opcua_bundle.getvalue$2.process(getvalue.java:160)     @ org.apache.nifi.controller.repository.standardprocesssession.write(standardprocesssession.java:2529)     @ com.kentender.nifi.nifi_opcua_bundle.getvalue.ontrigger(getvalue.java:156)     @ org.apache.nifi.processor.abstractprocessor.ontrigger(abstractprocessor.java:27)     @ org.apache.nifi.controller.standardprocessornode.ontrigger(standardprocessornode.java:1120)     @ org.apache.nifi.controller.tasks.continuallyrunprocessortask.call(continuallyrunprocessortask.java:147)     @ org.apache.nifi.controller.tasks.continuallyrunprocessortask.call(continuallyrunprocessortask.java:47)     @ org.apache.nifi.controller.scheduling.timerdrivenschedulingagent$1.run(timerdrivenschedulingagent.java:132)     @ java.util.concurrent.executors$runnableadapter.call(executors.java:511)     @ java.util.concurrent.futuretask.runandreset(futuretask.java:308)     @ java.util.concurrent.scheduledthreadpoolexecutor$scheduledfuturetask.access$301(scheduledthreadpoolexecutor.java:180)     @ java.util.concurrent.scheduledthreadpoolexecutor$scheduledfuturetask.run(scheduledthreadpoolexecutor.java:294)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) 

'nsu=http%3a%2f%2fopcfoundation.org%2fua%2f;i=63' represents expandednodeid, nifi code should use expandednodeid.parseexpandednodeid() instead of nodeid.parsenodeid().

or alternatively, need convert expandednodeid nodeid before pass getvalue(). unfortunately, not familiar nifi, not sure correct approach here.

the problem arises opc ua "dualism" - services browse, provide expandednodeid references, whereas other services read, expect nodeid instances.

expandednodeid may define namespace uri ('nsu' in string) or index ('ns' in string), nodeid may define namespace index.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -