MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Pm2 dont start my scripts on startup

    Scheduled Pinned Locked Moved Troubleshooting
    10 Posts 4 Posters 5.8k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      theusu5k
      last edited by

      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

      R 1 Reply Last reply Reply Quote 0
      • R Offline
        roramirez Core Contributors @theusu5k
        last edited by

        @theusu5k What said when you run ?

        pm2 list
        

        Easy module development with MagicMirror Module Template

        T 1 Reply Last reply Reply Quote 1
        • michael24hM Offline
          michael24h
          last edited by

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

          yawnsY 1 Reply Last reply Reply Quote 0
          • yawnsY Offline
            yawns Moderator @michael24h
            last edited by

            @michael24h
            and what is pm2 logs mm saying?

            1 Reply Last reply Reply Quote 0
            • michael24hM Offline
              michael24h
              last edited by michael24h

              That all, after pm2 show mm

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

              1 Reply Last reply Reply Quote 0
              • michael24hM Offline
                michael24h
                last edited by michael24h

                pm2 logs mm

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

                1 Reply Last reply Reply Quote 0
                • michael24hM Offline
                  michael24h
                  last edited by

                  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

                  1 Reply Last reply Reply Quote 0
                  • yawnsY Offline
                    yawns Moderator
                    last edited by

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

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      theusu5k @roramirez
                      last edited by

                      @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

                      1 Reply Last reply Reply Quote 0
                      • michael24hM Offline
                        michael24h
                        last edited by

                        @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

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy