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.

    EADDRINUSE: address already in use

    Scheduled Pinned Locked Moved Troubleshooting
    9 Posts 2 Posters 2.1k Views 2 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.
    • ebolisaE Offline
      ebolisa
      last edited by

      Hi,

      No matter what addr/port I use, I get the msg below.

      Any help is appreciated.
      TIA

      pi@magicmirror:~/MagicMirror $ npm run restart
      
      > magicmirror@2.14.0 start /home/pi/MagicMirror
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      
      [13.02.2021 16:42.34.745] [LOG]   Starting MagicMirror: v2.14.0
      [13.02.2021 16:42.34.754] [LOG]   Loading config ...
      [13.02.2021 16:42.34.762] [LOG]   Loading module helpers ...
      [13.02.2021 16:42.34.765] [LOG]   No helper found for module: alert.
      [13.02.2021 16:42.34.931] [LOG]   Initializing new module helper ...
      [13.02.2021 16:42.34.932] [LOG]   Module helper loaded: updatenotification
      [13.02.2021 16:42.34.933] [LOG]   No helper found for module: clock.
      [13.02.2021 16:42.34.935] [LOG]   No helper found for module: currentweather.
      [13.02.2021 16:42.34.936] [LOG]   No helper found for module: weatherforecast.
      [13.02.2021 16:42.35.134] [LOG]   Initializing new module helper ...
      [13.02.2021 16:42.35.135] [LOG]   Module helper loaded: MMM-Remote-Control
      [13.02.2021 16:42.35.431] [LOG]   Initializing new module helper ...
      [13.02.2021 16:42.35.432] [LOG]   Module helper loaded: newsfeed
      [13.02.2021 16:42.35.434] [LOG]   Initializing new module helper ...
      [13.02.2021 16:42.35.435] [LOG]   Module helper loaded: MMM-MoonPhase
      [13.02.2021 16:42.35.438] [LOG]   Initializing new module helper ...
      [13.02.2021 16:42.35.438] [LOG]   Module helper loaded: MMM-PiTemp
      [13.02.2021 16:42.35.730] [LOG]   Initializing new module helper ...
      [13.02.2021 16:42.35.731] [LOG]   Module helper loaded: MMM-iFrame-Ping
      [13.02.2021 16:42.35.732] [LOG]   All module helpers loaded.
      [13.02.2021 16:42.35.825] [LOG]   Starting server on port 8181 ...
      [13.02.2021 16:42.35.832] [WARN]  You're using a full whitelist configuration to allow for all IPs
      [13.02.2021 16:42.35.841] [LOG]   Server started ...
      [13.02.2021 16:42.35.842] [LOG]   Connecting socket for: updatenotification
      [13.02.2021 16:42.35.843] [LOG]   Connecting socket for: MMM-Remote-Control
      [13.02.2021 16:42.35.845] [LOG]   Starting node helper for: MMM-Remote-Control
      [13.02.2021 16:42.35.868] [LOG]   Connecting socket for: newsfeed
      [13.02.2021 16:42.35.869] [LOG]   Starting node helper for: newsfeed
      [13.02.2021 16:42.35.870] [LOG]   Connecting socket for: MMM-MoonPhase
      [13.02.2021 16:42.35.871] [LOG]   Starting module helper: MMM-MoonPhase
      [13.02.2021 16:42.35.872] [LOG]   Connecting socket for: MMM-PiTemp
      [13.02.2021 16:42.35.873] [LOG]   Starting module helper: MMM-PiTemp
      [13.02.2021 16:42.35.873] [LOG]   Connecting socket for: MMM-iFrame-Ping
      [13.02.2021 16:42.35.874] [LOG]   MMM-iFrame-Ping helper started ...
      [13.02.2021 16:42.35.875] [LOG]   Sockets connected & modules started ...
      [13.02.2021 16:42.35.883] [ERROR] Whoops! There was an uncaught exception...
      [13.02.2021 16:42.35.888] [ERROR] Error: listen EADDRINUSE: address already in use 0.0.0.0:8181
          at Server.setupListenHandle [as _listen2] (net.js:1300:14)
          at listenInCluster (net.js:1348:12)
          at doListen (net.js:1487:7)
          at processTicksAndRejections (internal/process/task_queues.js:81:21) {
        code: 'EADDRINUSE',
        errno: 'EADDRINUSE',
        syscall: 'listen',
        address: '0.0.0.0',
        port: 8181
      }
      [13.02.2021 16:42.35.890] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [13.02.2021 16:42.35.891] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      [13.02.2021 16:42.36.145] [LOG]   Launching application.
      [13.02.2021 16:42.36.173] [WARN]  (electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false".  It will change to be "true" in Electron 9.  For more information please check https://github.com/electron/electron/issues/18397
      
      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @ebolisa
        last edited by

        @ebolisa probably have pm2 running mm.
        it is supposed yo autostart mm on boot, and keep it running

        if using pm2 do not use npm commands until u stop pm2 instance

        pm2 status
        pm2 stop all

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        ebolisaE 1 Reply Last reply Reply Quote 0
        • ebolisaE Offline
          ebolisa @sdetweil
          last edited by ebolisa

          @sdetweil actually, I use npm trhrough service to autostart it.
          This’ what I get in the log. I know the app is talking to me, but I just cannot interpret it :confused_face:

          0 info it worked if it ends with ok
          1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'stop' ]
          2 info using npm@6.14.11
          3 info using node@v10.23.3
          4 verbose stack Error: missing script: stop
          4 verbose stack     at run (/usr/lib/node_modules/npm/lib/run-script.js:155:19)
          4 verbose stack     at /usr/lib/node_modules/npm/lib/run-script.js:63:5
          4 verbose stack     at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:116:5
          4 verbose stack     at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:436:5
          4 verbose stack     at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:391:45)
          4 verbose stack     at final (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:434:3)
          4 verbose stack     at then (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:161:5)
          4 verbose stack     at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:382:12
          4 verbose stack     at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:123:16
          4 verbose stack     at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
          5 verbose cwd /home/pi/MagicMirror
          6 verbose Linux 5.10.11-v7l+
          7 verbose argv "/usr/bin/node" "/usr/bin/npm" "stop"
          8 verbose node v10.23.3
          9 verbose npm  v6.14.11
          10 error missing script: stop
          11 verbose exit [ 1, true ]
          
          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @ebolisa
            last edited by

            @ebolisa there are no nom commands stop.

            u have to hit ctrl-c in the window where u started it or use sudo kill to kill the process running detached

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            ebolisaE 1 Reply Last reply Reply Quote 0
            • ebolisaE Offline
              ebolisa @sdetweil
              last edited by

              @sdetweil Not sure I’m following you. The MM boot is done via the service and it works. Meaning, MM app is booting and the display looks as designed.
              What I showed in my last post is the content of the last log file. There’s an error but I don’t know how to interpret it.

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

                @ebolisa it says therenis no npm stop function

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                ebolisaE 1 Reply Last reply Reply Quote 0
                • ebolisaE Offline
                  ebolisa @sdetweil
                  last edited by

                  @sdetweil Thanks, I’m probably looking into a non existing problem. Will check.

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

                    @ebolisa if u started it as a service, then u need to stop it as a sevice

                    you can remove the service and use pm2 to auto start and give u commands to stop

                    run the fixuppm2 script from my scripts

                    https://github.com/sdetweil/MagicMirror_scripts

                    pm2 --help for all the things u can do

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    ebolisaE 1 Reply Last reply Reply Quote 0
                    • ebolisaE Offline
                      ebolisa @sdetweil
                      last edited by

                      @sdetweil thank you. That explains my error shown in the first post.
                      I’m using npm and a service because I used this procedure to install MM https://docs.magicmirror.builders/getting-started/installation.html#manual-installation

                      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