NIfi错误:OPCUA处理器。服务器已停止,无法处理任何请求

时间:2019-06-04 14:02:54

标签: java apache-nifi opc-ua

我已在Nifi中导入了新的OPCUA捆绑包。 Here

此处理器在一天以上的时间内都读取良好,但是随后出现此错误:

2019-06-04 15:09:17,727 ERROR [Timer-Driven Process Thread-7] d.f.fit.processors.opcua.GetOPCData GetOPCData[id=1e5f35cf-3df7-1e7d-1521-5c8fe9fbd8f6] Failed to process session due to org.apache.nifi.processor.exception.ProcessException: java.util.concurrent.ExecutionException: UaServiceFaultException: status=Bad_ServerHalted, message=The server has stopped and cannot process any requests.: org.apache.nifi.processor.exception.ProcessException: java.util.concurrent.ExecutionException: UaServiceFaultException: status=Bad_ServerHalted, message=The server has stopped and cannot process any requests.
org.apache.nifi.processor.exception.ProcessException: java.util.concurrent.ExecutionException: UaServiceFaultException: status=Bad_ServerHalted, message=The server has stopped and cannot process any requests.
        at de.fraunhofer.fit.opcua.StandardOPCUAService.getValue(StandardOPCUAService.java:388)
        at sun.reflect.GeneratedMethodAccessor272.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:87)
        at com.sun.proxy.$Proxy89.getValue(Unknown Source)
        at de.fraunhofer.fit.processors.opcua.GetOPCData.onTrigger(GetOPCData.java:239)
        at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
        at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1162)
        at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:205)
        at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

如果我使用Nifi重新启动StandardOPCUAService,则可以再次接收数据。我该如何解决这个问题?如何自动重新启动服务?

谢谢。

1 个答案:

答案 0 :(得分:0)

代码中的错误是您必须与该捆绑软件的作者一起解决的;它不是社区管理的Apache NiFi核心的一部分。

您可以使用NiFi REST API自动重启处理器。您可以使用浏览器的开发人员工具来“记录”您将使用UI进行的操作,并查看更改处理器对象状态的网络调用。然后使用cron或其他定时脚本方法来调用此操作(如果需要,您甚至可以将其放入NiFi画布上的InvokeHTTP处理器中)。