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 restarts magicmirror every few seconds

    Scheduled Pinned Locked Moved Solved Troubleshooting
    6 Posts 3 Posters 2.7k Views 3 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.
    • P Offline
      panos
      last edited by

      Hello.
      I fresh install Magicmirror on raspbian buster.
      when I reboot the system to see if everything work like it should I notice that magicmirror does not start at all.
      pm2 shows this:
      0_1565094216661_Screenshot 2019-08-06 at 15.19.17.png

      Id is constantly changing and restart count is increasing.
      It seems that magicmirror is trying to start but for some reason, can’t
      Any suggestions?

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @panos
        last edited by

        @panos do

        pm2 logs
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • P Offline
          panos
          last edited by

          PM2            | App [MagicMirror:0] exited with code [1] via signal [SIGINT]
          PM2            | App [MagicMirror:0] starting in -fork mode-
          PM2            | App [MagicMirror:0] online
          0|MagicMirror  | { Error: ENOENT: no such file or directory, open 'package.json'
          0|MagicMirror  |     at Object.openSync (fs.js:443:3)
          0|MagicMirror  |     at Object.readFileSync (fs.js:343:35)
          0|MagicMirror  |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:15:32)
          0|MagicMirror  |     at Module._compile (internal/modules/cjs/loader.js:778:30)
          0|MagicMirror  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
          0|MagicMirror  |     at Module.load (internal/modules/cjs/loader.js:653:32)
          0|MagicMirror  |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
          0|MagicMirror  |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
          0|MagicMirror  |     at Module.require (internal/modules/cjs/loader.js:692:17)
          0|MagicMirror  |     at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:70:37)
          0|MagicMirror  |   errno: -2,
          0|MagicMirror  |   syscall: 'open',
          0|MagicMirror  |   code: 'ENOENT',
          0|MagicMirror  |   path: 'package.json' }
          PM2            | App [MagicMirror:0] exited with code [1] via signal [SIGINT]
          PM2            | App [MagicMirror:0] starting in -fork mode-
          PM2            | App [MagicMirror:0] online
          
          
          0|MagicMirror  | { Error: ENOENT: no such file or directory, open 'package.json'
          0|MagicMirror  |     at Object.openSync (fs.js:443:3)
          0|MagicMirror  |     at Object.readFileSync (fs.js:343:35)
          0|MagicMirror  |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:15:32)
          0|MagicMirror  |     at Module._compile (internal/modules/cjs/loader.js:778:30)
          0|MagicMirror  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
          0|MagicMirror  |     at Module.load (internal/modules/cjs/loader.js:653:32)
          0|MagicMirror  |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
          0|MagicMirror  |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
          0|MagicMirror  |     at Module.require (internal/modules/cjs/loader.js:692:17)
          0|MagicMirror  |     at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:70:37)
          0|MagicMirror  |   errno: -2,
          0|MagicMirror  |   syscall: 'open',
          0|MagicMirror  |   code: 'ENOENT',
          0|MagicMirror  |   path: 'package.json' }
          
          1 Reply Last reply Reply Quote 0
          • bheplerB Offline
            bhepler Module Developer
            last edited by

            PM2 is restarting the mirror because the mirror process keeps crashing. Let’s try a rebuild. Try this:

            pm2 stop all
            cd /home/pi/MagicMirror
            npm install
            pm2 start 0
            
            1 Reply Last reply Reply Quote 0
            • P Offline
              panos
              last edited by panos

              I tried this with no luck:(
              The issue persists…

              -EDIT-
              I manage to resolve the issue:

              • pm2 delete MagicMirror
              • pm2 start /home/pi/MagicMirror/installers/mm.sh
              • pm2 save

              pm2 process name is now ‘mm’ instead of ‘MagicMirror’
              so
              “pm2 start|stop|restart mm” is now the command that I will use
              Thanks for your help!!
              Cheers:)

              S 1 Reply Last reply Reply Quote 1
              • S Do not disturb
                sdetweil @panos
                last edited by sdetweil

                @panos yes, when doing install, it uses a config file which supplies a title. It’s in the installers folder

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 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