(Solved) PM2 does not start on reboot
xbmcnut last edited by xbmcnut
Hi there. I have MM running but the auto start feature is not working. See below.
PM2 is version 2.4.2 and the MM install was built on Jessie Lite (2017-03-02) on a Pi2. I can start the script with PM2 start mm.sh and use PM2 save when it’s running but PM2 list after a reboot shows nothing running. How do I debug this?
I noted that when following the auto start instructions, chmod +x mm.sh returned a permissions error. Is that normal? Does that have to be run as sudo? I changed the permissions to the ‘Pi’ user using WinSCP but it made no difference.
OK, I started again with a clean install of the full Jessie build now then leaned it out using this guide. As before, once I start going through with the PM2 stuff, everything seems to work OK until a reboot and MM does not start. Surely someone else has seen this? Am I making a simple NOOB mistake here or does it just not work?
@xbmcnut Hey - I’m not the only one any more… Same problem: used to work on an OLD installation, and now - nothing. I am just working on a brand new one tonight.
BTW: does you screensaver stay off? I had to work quite a bit at getting that working in the new distro.
Clean installation onto a Pi3 works… (and I have NO idea why it works on this one: my last pi3 gave me the same problem you had). So you might want to look at a different Pi?
Best of luck!
@amanzimdwini I have resolved it now as I posted a bug. Turns out it’s related to the timeout setting for the PM2 service. Developers are going to remove timeout in next release but for now it can be tweaked. And no, had no joy with screensaver either. Disabled it in GUI and it seems to be gone now.
@xbmcnut Just read your post - now MY installation wont run PM2. Argh. Where do you change the timeout settings?
ps - Re: screensaver: I had to resort to’
sudo apt-get install xscreensaver
and the disable it.
Where do you change the timeout settings?
I changed mine from 8 to 15s using WinSCP with the SCP/Shell set to sudo su -
@xbmcnut took me a good 10 seconds to find pm2-pi.service for the raspberry
And another 5 to change it.
YOU ARE A GENIUS!
rmohsen last edited by
total noob here and i have the same problem , how do i do that ?
ps : i’m not a developer or anything , i’m just a regular user so i kinda need step by step
@rmohsen Do you know how to access your mirror with either PuTTy or WinSCP?