Debug 'Arp::System::Commons::InvalidOperationException'
Hi, i'm trying to run the runtime sample example from the github repository.
I'm facing an error code.
If I reboot the plc I got : "[code type="markup"]
21.03.21 15:25:25.493 CommonRemoting INFO - Accepted connection #0: connectionId=AFCF3747, IPC
21.03.21 15:25:25.523 Arp.System.Acf.Internal.ApplicationBase INFO - Application 'LocalIoProcess' was setup successfully.
21.03.21 15:25:25.621 Arp.System.Acf.Internal.Sm.ProcessesController INFO - Process 'LocalIoProcess' started successfully.
21.03.21 15:25:30.432 Arp.System.Acf.Internal.Sm.ProcessesController ERROR - Could not start process 'runtime'.
21.03.21 15:25:30.437 Arp.System.Acf.Internal.ApplicationBase FATAL - Fatal error occurs in application 'MainProcess':
21.03.21 15:25:30.439 Arp.System.Acf.Internal.ApplicationBase FATAL - Exception occurs: Exception of type 'Arp::System::Commons::InvalidOperationException' was thrown
Could not start all processes
at Arp::System::Acf::Internal::Sm::ProcessesController::StartProcesses()
at Arp::System::Acf::Internal::Sm::SystemManager::SetupSystemSettings()
at Arp::System::Acf::Internal::Sm::SystemManager::SetupSystem()
at Arp::System::Acf::Internal::MainApplicationBase::SetupInternal()
at Arp::System::Acf::Internal::ApplicationBase::Setup(Arp::System::Commons::Diagnostics::Logging::LogLevel, char const*)
at Arp::System::Acf::Internal::ApplicationBase::Main(int, char**, Arp::System::Commons::Diagnostics::Logging::LogLevel)
at Arp.System.Application(+0x1c0dc) [0x4b40dc]
at /lib/libc.so.6(__libc_start_main+0x97) [0xb69f6964]
[/code]
If I do a simple sudo /etc/init.d/plcnext restart, I got :[code type="markup"]
21.03.21 15:19:59.394 CommonRemoting ERROR - Could not bind IpcListener to address 'MainProcess'
21.03.21 15:19:59.394 CommonRemoting ERROR - Starting listener 'ipc://MainProcess' failed
21.03.21 15:19:59.395 CommonRemoting ERROR - Starting listener 'ipc://MainProcess' failed
21.03.21 15:19:59.401 Arp.System.Acf.Internal.ApplicationBase FATAL - Fatal error occurs in application 'MainProcess':
21.03.21 15:19:59.402 Arp.System.Acf.Internal.ApplicationBase FATAL - Exception occurs: Exception of type 'Arp::System::Commons::InvalidOperationException' was thrown
Could not start remoting server
at Arp::System::Rsc::Internal::RscComponent::Setup()
at Arp::System::Rsc::RscManager::RscManager(Arp::BasicString > const&, int, Arp::BasicString > const&, bool)
at Arp::System::Rsc::RscManager::CreateInstance(Arp::BasicString > const&, int, Arp::BasicString > const&, bool)
at Arp::System::Acf::Internal::ApplicationBase::SetupRemoting(bool)
at Arp::System::Acf::Internal::ApplicationBase::SetupBasicComponents(Arp::System::Acf::Internal::ApplicationSetupKind, Arp::System::Acf::Internal::ProcessKind)
at Arp::System::Acf::Internal::MainApplicationBase::SetupInternal()
at Arp::System::Acf::Internal::ApplicationBase::Setup(Arp::System::Commons::Diagnostics::Logging::LogLevel, char const*)
at Arp::System::Acf::Internal::ApplicationBase::Main(int, char**, Arp::System::Commons::Diagnostics::Logging::LogLevel)
at Arp.System.Application(+0x1c0dc) [0x4560dc]
at /lib/libc.so.6(__libc_start_main+0x97) [0xb691d964]
[/code]
Also tried with FW 2021.0.2 LTS and 2020.0.1 LTS, still have the issue.
Any one know what's the cause ?
I'm facing an error code.
If I reboot the plc I got : "[code type="markup"]
21.03.21 15:25:25.493 CommonRemoting INFO - Accepted connection #0: connectionId=AFCF3747, IPC
21.03.21 15:25:25.523 Arp.System.Acf.Internal.ApplicationBase INFO - Application 'LocalIoProcess' was setup successfully.
21.03.21 15:25:25.621 Arp.System.Acf.Internal.Sm.ProcessesController INFO - Process 'LocalIoProcess' started successfully.
21.03.21 15:25:30.432 Arp.System.Acf.Internal.Sm.ProcessesController ERROR - Could not start process 'runtime'.
21.03.21 15:25:30.437 Arp.System.Acf.Internal.ApplicationBase FATAL - Fatal error occurs in application 'MainProcess':
21.03.21 15:25:30.439 Arp.System.Acf.Internal.ApplicationBase FATAL - Exception occurs: Exception of type 'Arp::System::Commons::InvalidOperationException' was thrown
Could not start all processes
at Arp::System::Acf::Internal::Sm::ProcessesController::StartProcesses()
at Arp::System::Acf::Internal::Sm::SystemManager::SetupSystemSettings()
at Arp::System::Acf::Internal::Sm::SystemManager::SetupSystem()
at Arp::System::Acf::Internal::MainApplicationBase::SetupInternal()
at Arp::System::Acf::Internal::ApplicationBase::Setup(Arp::System::Commons::Diagnostics::Logging::LogLevel, char const*)
at Arp::System::Acf::Internal::ApplicationBase::Main(int, char**, Arp::System::Commons::Diagnostics::Logging::LogLevel)
at Arp.System.Application(+0x1c0dc) [0x4b40dc]
at /lib/libc.so.6(__libc_start_main+0x97) [0xb69f6964]
[/code]
If I do a simple sudo /etc/init.d/plcnext restart, I got :[code type="markup"]
21.03.21 15:19:59.394 CommonRemoting ERROR - Could not bind IpcListener to address 'MainProcess'
21.03.21 15:19:59.394 CommonRemoting ERROR - Starting listener 'ipc://MainProcess' failed
21.03.21 15:19:59.395 CommonRemoting ERROR - Starting listener 'ipc://MainProcess' failed
21.03.21 15:19:59.401 Arp.System.Acf.Internal.ApplicationBase FATAL - Fatal error occurs in application 'MainProcess':
21.03.21 15:19:59.402 Arp.System.Acf.Internal.ApplicationBase FATAL - Exception occurs: Exception of type 'Arp::System::Commons::InvalidOperationException' was thrown
Could not start remoting server
at Arp::System::Rsc::Internal::RscComponent::Setup()
at Arp::System::Rsc::RscManager::RscManager(Arp::BasicString > const&, int, Arp::BasicString > const&, bool)
at Arp::System::Rsc::RscManager::CreateInstance(Arp::BasicString > const&, int, Arp::BasicString > const&, bool)
at Arp::System::Acf::Internal::ApplicationBase::SetupRemoting(bool)
at Arp::System::Acf::Internal::ApplicationBase::SetupBasicComponents(Arp::System::Acf::Internal::ApplicationSetupKind, Arp::System::Acf::Internal::ProcessKind)
at Arp::System::Acf::Internal::MainApplicationBase::SetupInternal()
at Arp::System::Acf::Internal::ApplicationBase::Setup(Arp::System::Commons::Diagnostics::Logging::LogLevel, char const*)
at Arp::System::Acf::Internal::ApplicationBase::Main(int, char**, Arp::System::Commons::Diagnostics::Logging::LogLevel)
at Arp.System.Application(+0x1c0dc) [0x4560dc]
at /lib/libc.so.6(__libc_start_main+0x97) [0xb691d964]
[/code]
Also tried with FW 2021.0.2 LTS and 2020.0.1 LTS, still have the issue.
Any one know what's the cause ?
Comments
My guess is that you have multiple services additional Services installed that are started synchronouly to the PLCnext Runtime with higher or the Same priorty.
These daemons must be blocking the startup of your Application and triggering a timeout while starting the PLcnext runtime.
To fix this please add a Sleep to the daemons or reorder them to start after the PLcnext Runtime.
Related Issue:
https://github.com/PLCnext/SampleRuntime/issues/13
I Did a fresh factory reset and still have the issue. How can I find which daemon is blocking ?
Or maybe there is a way to delay the start of my application ?
it could also be caused by some missing dependency (check that all symlincs are found)
ldd projects/runtime/runtime
What is the runtime app linking agains?
It could also still be a program error of your part.
Or due to loading a very large external library x00MB. (try building dependencies optimized, or without debug options...)
For debugging you can also try to delaying the start of the PLCnext Runtime by adding a" sleep 10" in the /etc/init.d/plcnext script.
Check with "htop + t" what processes are started.
Also read the logs at /var/log/boot etc.
docker / balena for example tends to block while loading some containers..
kind regards,
Oliver
With delay, my apps links to the axioline bus and send periodically data using ZMQ lib.
I checked the size of my lib (1,4Mb).
Using delay didn't solve my problem. Still looking for a solution
I guess that the ZMQ Lib is quite large? (even if your lib is small)
Can you give me more details about your application or maybe provide me with a sample that reproduces this problem?
If it is okay for you I will contact you via Mail.
You are running your own runtime I guess you followed the github Sample Runtime?
If it realy is just caused by the ZMQ lib you can try using a optimized version of the lib or we might have to wait for FW 2021.3, there we have possibility to edit the PLCnext Boot timeout.
I don't think the issue is related with the size of ZMQ lib. Seem like the problem is resolve now with the latest FW. Thanks for the help.