Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

The server has stopped and cannot process any requests #1

Open
laurafernandezdiaz opened this issue Jun 5, 2019 · 5 comments
Open

Comments

@laurafernandezdiaz
Copy link

I have imported the OPCUA bundle in Nifi and the GetOPCData processor reads well for more than a day, but then I get this error:

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)

If I restart the StandardOPCUAService using Nifi, I can receive the data again. How can I solve this issue? How can I restart the service automatically?

@dschowta
Copy link
Member

dschowta commented Jun 5, 2019

@gariammariag , Are you using the latest version of code? If not, which version were you using?
Can you easily reproduce this issue?

@laurafernandezdiaz
Copy link
Author

@dschowta Yes, now I'm using the latest version of the code but before I had a previous version and I kept getting the same error.

I cloned the repository and I added the .nar in the Nifi library. I am using the GetOPCData processor that uses the StandardOPCUAService to connect to the OPC-UA server. But after a few hours, I get this error and I have to restart the StandardOPCUAService again in order to receive the data again. The OPC-UA server is running all the time because I subscribed with an opcua-client to some variables and I checked that it is activated.

@dschowta
Copy link
Member

dschowta commented Jun 5, 2019

@gariammariag , So far I could not find a reason for this issue. I could see that the line number of the exception did not match the latest line number (even in the history). Do you have some custom changes?
Only place for causing exception is this line . It is strange that it never recovers.
If you find a way to solve it, feel free to create a pull request.

@laurafernandezdiaz
Copy link
Author

@dschowta Yes, I did some custom changes because this processor only lists the ids of the variables, not the names of the variables, so I changed the service code (StandardOPCUAService class) to add the names of the variables in the file of the list of variables (browseNodeIteratively method) and then I read the names of the variables in this list changing the "writeCsv" method of the StandardOPCUAService class.

I will try this bundle without any custom change to check if I receive the same error.

@laurafernandezdiaz
Copy link
Author

I tried to read data with the bundle without any custom changes and after some time I still get the same error. So the changes can't be the cause of the error.

Now I have a Nifi docker with the modified bundle (A) and another unmodified Nifi docker (B). I discovered that the error appears at the same time in each Nifi (A and B). If I restart one of them I get the data in that Nifi but not in the other one. What could be going on?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants