Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    SOLVED Shutting down/restarting via PM2 not closing server

    Troubleshooting
    1
    2
    1059
    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.
    • bhepler
      bhepler Project Sponsor last edited by

      I’m using PM2 to monitor the MagicMirror2 process as per the Autostarting Magic Mirror tutorial. When I make a change and wish to restart the mirror process, I enter pm2 restart mm and let PM2 do its thing. However, when I do so I get the following error:

      Whoops! There was an uncaught exception...
      0|mm       | { Error: listen EADDRINUSE :::8080
      0|mm       |     at Object.exports._errnoException (util.js:1022:11)
      0|mm       |     at exports._exceptionWithHostPort (util.js:1045:20)
      0|mm       |     at Server._listen2 (net.js:1262:14)
      0|mm       |     at listen (net.js:1298:10)
      0|mm       |     at Server.listen (net.js:1376:9)
      0|mm       |     at new Server (/home/pi/MagicMirror/js/server.js:26:9)
      0|mm       |     at /home/pi/MagicMirror/js/app.js:219:18
      0|mm       |     at loadNextModule (/home/pi/MagicMirror/js/app.js:168:5)
      0|mm       |     at /home/pi/MagicMirror/js/app.js:163:6
      0|mm       |     at Class.loaded (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:19:3)
      0|mm       |   code: 'EADDRINUSE',
      0|mm       |   errno: 'EADDRINUSE',
      0|mm       |   syscall: 'listen',
      0|mm       |   address: '::',
      0|mm       |   port: 8080 }
      

      This normally occurs when you have MM2 running and attempt to start the mirror again. But that’s not the case as far as I can tell. If I use PM2 to stop the MM2 process, netstat -l doesn’t show anything listening on port 8080, but I still get the error above if I start the mirror process.

      This only started after I upgraded to v2.1.2, if that helps. A full reboot will have the mirror start normally. Any ideas?

      1 Reply Last reply Reply Quote 0
      • bhepler
        bhepler Project Sponsor last edited by

        Update: I’ve traced this to the MMM-RTSPStream module. Disabling this module lets PM2 restart the process normally. I’ll take this problem over there. Feel free to close this out.

        1 Reply Last reply Reply Quote 0
        • bhepler
          bhepler Project Sponsor last edited by

          Update: I’ve traced this to the MMM-RTSPStream module. Disabling this module lets PM2 restart the process normally. I’ll take this problem over there. Feel free to close this out.

          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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy