Pm2 dont start my scripts on startup



  • i install the pm2 to run the magicmirror on startup.
    If i manually run pm2 start mm.sh,the magicmirror start working,but it doesn´t do it on startup
    Im on a R pi3


  • Core Contributors

    @theusu5k What said when you run ?

    pm2 list
    


  • same problem I have
    0_1488812086004_Screen Shot 2017-03-06 at 14.53.20.png


  • Moderator

    @michael24h
    and what is pm2 logs mm saying?



  • That all, after pm2 show mm

    0_1488812320040_Screen Shot 2017-03-06 at 14.57.44.png



  • pm2 logs mm

    0_1488812842768_Screen Shot 2017-03-06 at 15.06.31.png



  • This is my log pm2

    2017-03-03 17:07:49: Starting execution sequence in -fork mode- for app name:mm id:0
    2017-03-03 17:07:49: App name:mm id:0 online
    2017-03-04 14:31:00: Stopping app:mm id:0
    2017-03-04 14:31:01: App [mm] with id [0] and pid [1239], exited with code [0] via signal [SIGINT]
    2017-03-04 14:31:01: pid=1239 msg=process killed
    2017-03-04 14:31:01: Starting execution sequence in -fork mode- for app name:mm id:0
    2017-03-04 14:31:01: App name:mm id:0 online
    2017-03-04 14:32:40: Stopping app:mm id:0
    2017-03-04 14:32:40: App [mm] with id [0] and pid [32472], exited with code [0] via signal [SIGINT]
    2017-03-04 14:32:40: pid=32472 msg=process killed
    2017-03-04 14:32:40: Starting execution sequence in -fork mode- for app name:mm id:0
    2017-03-04 14:32:40: App name:mm id:0 online
    2017-03-04 14:34:13: Stopping app:mm id:0
    2017-03-04 14:34:14: App [mm] with id [0] and pid [32720], exited with code [0] via signal [SIGINT]
    2017-03-04 14:34:14: pid=32720 msg=process killed
    2017-03-04 14:34:14: Starting execution sequence in -fork mode- for app name:mm id:0
    2017-03-04 14:34:14: App name:mm id:0 online
    2017-03-06 14:49:55: ===============================================================================
    2017-03-06 14:49:55: — New PM2 Daemon started ----------------------------------------------------
    2017-03-06 14:49:55: Time : Mon Mar 06 2017 14:49:55 GMT+0000 (UTC)
    2017-03-06 14:49:55: PM2 version : 2.4.2
    2017-03-06 14:49:55: Node.js version : 6.10.0
    2017-03-06 14:49:55: Current arch : arm
    2017-03-06 14:49:55: PM2 home : /home/pi/.pm2
    2017-03-06 14:49:55: PM2 PID file : /home/pi/.pm2/pm2.pid
    2017-03-06 14:49:55: RPC socket file : /home/pi/.pm2/rpc.sock
    2017-03-06 14:49:55: BUS socket file : /home/pi/.pm2/pub.sock
    2017-03-06 14:49:55: Application log path : /home/pi/.pm2/logs
    2017-03-06 14:49:55: Process dump file : /home/pi/.pm2/dump.pm2
    2017-03-06 14:49:55: Concurrent actions : 2
    2017-03-06 14:49:55: SIGTERM timeout : 1600
    2017-03-06 14:49:55: ===============================================================================
    2017-03-06 14:49:56: Starting execution sequence in -fork mode- for app name:mm id:0
    2017-03-06 14:49:56: App name:mm id:0 online
    2017-03-06 15:07:51: Stopping app:mm id:0
    2017-03-06 15:07:51: App [mm] with id [0] and pid [1137], exited with code [0] via signal [SIGINT]
    2017-03-06 15:07:51: pid=1137 msg=process killed
    2017-03-06 15:07:51: Starting execution sequence in -fork mode- for app name:mm id:0
    2017-03-06 15:07:51: App name:mm id:0 online


  • Moderator

    ok, please run pm2 logs mm --lines 50
    MagicMirror found an error, maybe due to a broken module or missing dependencies.



  • @roramirez said in Pm2 dont start my scripts on startup:

    @theusu5k What said when you run ?

    pm2 list
    

    nothing,if i manually run it,it appears



  • @yawns said in Pm2 dont start my scripts on startup:

    pm2 logs mm --lines 50

    /home/pi/.pm2/logs/mm-error-0.log last 50 lines:
    0|mm | at Module.load (module.js:473:32)
    0|mm | at tryModuleLoad (module.js:432:12)
    0|mm | at Function.Module._load (module.js:424:3)
    0|mm | at Module.require (module.js:483:17)
    0|mm | at require (internal/module.js:20:19)
    0|mm | at Object. (/home/pi/MagicMirror/modules/magic-mirror-voice/node_modules/java/lib/nodeJavaBridge.js:21:16)
    0|mm | at Module._compile (module.js:556:32)
    0|mm | at Object.Module._extensions…js (module.js:565:10)
    0|mm | at Module.load (module.js:473:32)
    0|mm | at tryModuleLoad (module.js:432:12)
    0|mm | at Function.Module._load (module.js:424:3)
    0|mm | at Module.require (module.js:483:17)
    0|mm | ERROR! Could not find main module js file.
    0|mm | ERROR! Could not find main module js file.
    0|mm | Error: Module version mismatch. Expected 50, got 48.
    0|mm | at Error (native)
    0|mm | at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    0|mm | at Object.Module._extensions…node (module.js:583:18)
    0|mm | at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    0|mm | at Module.load (module.js:473:32)
    0|mm | at tryModuleLoad (module.js:432:12)
    0|mm | at Function.Module._load (module.js:424:3)
    0|mm | at Module.require (module.js:483:17)
    0|mm | at require (internal/module.js:20:19)
    0|mm | at Object. (/home/pi/MagicMirror/modules/magic-mirror-voice/node_modules/java/lib/nodeJavaBridge.js:21:16)
    0|mm | at Module._compile (module.js:556:32)
    0|mm | at Object.Module._extensions…js (module.js:565:10)
    0|mm | at Module.load (module.js:473:32)
    0|mm | at tryModuleLoad (module.js:432:12)
    0|mm | at Function.Module._load (module.js:424:3)
    0|mm | at Module.require (module.js:483:17)
    0|mm | ERROR! Could not find main module js file.
    0|mm | ERROR! Could not find main module js file.
    0|mm | Error: Module version mismatch. Expected 50, got 48.
    0|mm | at Error (native)
    0|mm | at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    0|mm | at Object.Module._extensions…node (module.js:583:18)
    0|mm | at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    0|mm | at Module.load (module.js:473:32)
    0|mm | at tryModuleLoad (module.js:432:12)
    0|mm | at Function.Module._load (module.js:424:3)
    0|mm | at Module.require (module.js:483:17)
    0|mm | at require (internal/module.js:20:19)
    0|mm | at Object. (/home/pi/MagicMirror/modules/magic-mirror-voice/node_modules/java/lib/nodeJavaBridge.js:21:16)
    0|mm | at Module._compile (module.js:556:32)
    0|mm | at Object.Module._extensions…js (module.js:565:10)
    0|mm | at Module.load (module.js:473:32)
    0|mm | at tryModuleLoad (module.js:432:12)
    0|mm | at Function.Module._load (module.js:424:3)
    0|mm | at Module.require (module.js:483:17)

    [STREAMING] Now streaming realtime logs for [mm] process


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.