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.

    Problems restarting MagicMirror (Port 8080 in use ...)

    Troubleshooting
    7
    20
    8236
    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.
    • MichMich
      MichMich Admin last edited by

      I’ve recently reinstalled my Pi and installed the latest built of the develop branch.
      I have a small update script which eventually restarts MagicMirror using pm2 restart mm.
      Unfortunately, it won’t restart because it says port 8080 is already in use.

      The only solution is rebooting the Pi.

      Before I spend some time on solving this, I’m curious: does restarting work on your pi? And are you running the latest develop branch as well?

      1 Reply Last reply Reply Quote 1
      • Snille
        Snille Module Developer last edited by

        Hi! Yes, restarting works. This usually happens when a module has failed to work (have some error in it). Even though you fix the problem, as long as you have not restarted it seems the port still is “in use”.

        By the way, thank you for this GREAT project! 🙂

        Best regards Snille

        1 Reply Last reply Reply Quote 0
        • cowboysdude
          cowboysdude Project Sponsor Module Developer last edited by

          Here I was thinking it was just me LOL No biggie restarting seems to solve it.
          So until it gets figured out we’ll live with it 🙂

          MichMich 1 Reply Last reply Reply Quote 0
          • MichMich
            MichMich Admin @cowboysdude last edited by

            @cowboysdude Ah, so you’re experiencing the same? In that case it’s worth diving into …

            P 1 Reply Last reply Reply Quote 2
            • P
              PindaPower @MichMich last edited by

              @MichMich I’m not running the develop branch, but I do know the background off the feedback (port 8080 is use). I’m not sure if your looking for this information, other ways let me know.

              1 Reply Last reply Reply Quote 0
              • binderth
                binderth last edited by binderth

                Same for me, if you mean this Messages (I’m using the main 2.1):

                pi@MagicMirror:~/MagicMirror $ DISPLAY=:0 npm restart &
                [1] 29215
                
                > magicmirror@2.1.0 start /home/pi/MagicMirror
                > electron js/electron.js
                
                Starting MagicMirror: v2.1.0
                Loading config ...
                Loading module helpers ...
                No helper found for module: MMM-Globe.
                Initializing new module helper ...
                No helper found for module: alert.
                No helper found for module: clock.
                Initializing new module helper ...
                Initializing new module helper ...
                No helper found for module: compliments.
                Initializing new module helper ...
                No helper found for module: MMM-Callmonitor-Current-Call.
                No helper found for module: currentweather.
                No helper found for module: weatherforecast.
                Initializing new module helper ...
                Initializing new module helper ...
                Initializing new module helper ...
                All module helpers loaded.
                Starting server op port 8080 ...
                Server started ...
                Connecting socket for: MMM-PIR-Sensor
                Staring module helper: MMM-PIR-Sensor
                Connecting socket for: calendar
                Starting node helper for: calendar
                Connecting socket for: MMM-Wunderlist
                Connecting socket for: MMM-FRITZ-Box-Callmonitor
                Starting module: MMM-FRITZ-Box-Callmonitor
                Connecting socket for: MMM-DWD-WarnWeather
                MMM-DWD-WarnWeather helper started...
                Connecting socket for: MMM-NetworkScanner
                Starting module: MMM-NetworkScanner
                Connecting socket for: newsfeed
                Starting module: newsfeed
                Sockets connected & modules started ...
                Whoops! There was an uncaught exception...
                { Error: listen EADDRINUSE :::8080
                    at Object.exports._errnoException (util.js:1026:11)
                    at exports._exceptionWithHostPort (util.js:1049:20)
                    at Server._listen2 (net.js:1253:14)
                    at listen (net.js:1289:10)
                    at net.js:1399:9
                    at _combinedTickCallback (internal/process/next_tick.js:77:11)
                    at process._tickCallback (internal/process/next_tick.js:98:9)
                    at Module.runMain (module.js:592:11)
                    at run (bootstrap_node.js:402:7)
                    at startup (bootstrap_node.js:157:9)
                  code: 'EADDRINUSE',
                  errno: 'EADDRINUSE',
                  syscall: 'listen',
                  address: '::',
                  port: 8080 }
                MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
                If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
                Launching application.
                
                1 Reply Last reply Reply Quote 0
                • R
                  roramirez Core Contributors last edited by

                  Ups, there a bug for pm2 config. I pushed a fix
                  https://github.com/MichMich/MagicMirror/pull/640

                  The restart is work for me. Are you try stop/start?

                  pi@raspberrypi:~/MagicMirror $ pm2 status MagicMirror
                  ┌─────────────┬────┬──────┬──────┬────────┬─────────┬────────┬─────┬──────────┬──────────┐
                  │ App name    │ id │ mode │ pid  │ status │ restart │ uptime │ cpu │ mem      │ watching │
                  ├─────────────┼────┼──────┼──────┼────────┼─────────┼────────┼─────┼──────────┼──────────┤
                  │ MagicMirror │ 0  │ fork │ 7689 │ online │ 1       │ 3h     │ 0%  │ 2.4 MB   │  enabled │
                  └─────────────┴────┴──────┴──────┴────────┴─────────┴────────┴─────┴──────────┴──────────┘
                   Use `pm2 show ` to get more details about an app
                  pi@raspberrypi:~/MagicMirror $ pm2 restart MagicMirror
                  Restarts are now immutable, to update environment or conf use --update-env
                  [PM2] Applying action restartProcessId on app [MagicMirror](ids: 0)
                  [PM2] [MagicMirror](0) ✓
                  ┌─────────────┬────┬──────┬──────┬────────┬─────────┬────────┬─────┬──────────┬──────────┐
                  │ App name    │ id │ mode │ pid  │ status │ restart │ uptime │ cpu │ mem      │ watching │
                  ├─────────────┼────┼──────┼──────┼────────┼─────────┼────────┼─────┼──────────┼──────────┤
                  │ MagicMirror │ 0  │ fork │ 6447 │ online │ 2       │ 0s     │ 7%  │ 2.3 MB   │  enabled │
                  └─────────────┴────┴──────┴──────┴────────┴─────────┴────────┴─────┴──────────┴──────────┘
                   Use `pm2 show ` to get more details about an app
                  
                  

                  By the way, there a interesting notice in restart process by pm2

                  Restarts are now immutable, to update environment or conf use --update-env
                  

                  Here I’m using 2.1.5 version

                  pi@raspberrypi:~/MagicMirror $ pm2 -version
                  2.1.5
                  
                  binderth O 2 Replies Last reply Reply Quote 0
                  • binderth
                    binderth @roramirez last edited by

                    @roramirez said in Problems restarting MagicMirror (Port 8080 in use ...):

                    pi@raspberrypi:~/MagicMirror $ pm2 -version
                    2.1.5

                    Do I need pm2?

                    pi@MagicMirror:~ $ pm2 -version
                    -bash: pm2: Kommando nicht gefunden.
                    

                    (translates: command not found)

                    R 1 Reply Last reply Reply Quote 0
                    • O
                      ostfilinchen @roramirez last edited by

                      @roramirez what i have to do to get the fix from github? I have installed MM v2.1.0

                      R 1 Reply Last reply Reply Quote 0
                      • MichMich
                        MichMich Admin last edited by

                        This seem to have fixed the issue. Thanks @roramirez!

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • 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