Mavproxy systemd service problem,failed with result code "exit-code"

Hi,
I want to start my mavproxy script whenever rpi3 boots up. I’m trying to use systemd for it but it doesn’t work for some reason. I am attaching my script and journal log file. I will appreciate any help.

It works fine here.

Without any more information from your side… we can not guess the problem.

But why it shows an error? What information do you need?

It tries to connect but after few moments it disconnects. This is the output

what type of systemd process are you running? One of the types exits immediately.

I’m running Systemctl

1 Like

When I add to service script : restart = on-failure it connects then I’m getting an error and then it tries again

Nope, not what I asked you. I asked you which service type. This work fine for me (*.service):

[Service]
Type=forking

I tried to make it forking type but I still run into the same issue

Given all the “unloading module” messages, MAVProxy is encountering an error and exiting.

Can you run it with --moddebug=3? That should give more information.

Could you please try the step in this link?

1 Like

Hello @Arturas_Maziliauskas ,
Did you solve this ? I have run into the very same problem. I am calling a script calling mavproxy using crontab in a raspberry pi 4. When I call the script from the terminal, it works fine. When I perform a reboot, mavproxy starts but almost after a second it unload all modules and exit.
I have placed in the script a loop to wait for network to have access to internet, just in case, but it does not help
The weird thing is that settting --moddebug=3 as suggested by @stephendade
gives no error.
I still have to try the suggested solution based on rc.local, but I am curious what could be the reason for this behaviour.
Thankyou all for your help,
Adolfo.

I actually did. Nothing worked for me properly except systemctl services. I used JeSz post
as a reference.Start Mavproxy as a service - #8 by Pavan

1 Like

Thankyou! will try systemctl