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.

    Error - EADDRINUSE

    Scheduled Pinned Locked Moved Troubleshooting
    6 Posts 2 Posters 2.5k 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.
    • I Offline
      Ice-cream
      last edited by Ice-cream

      Hi everyone, I’m new to MM and coding.

      Situation - when I ran , I received an odd note in my terminal (copied the below from Google).

      Error: listen EADDRINUSE: address already in use :::8080
          at Server.setupListenHandle [as _listen2] (net.js:1258:14)
          at listenInCluster (net.js:1306:12)
          at Server.listen (net.js:1394:7)
      

      I found some instructions online and then KILLED something in the terminal (again copied from Google):

      node 2464 murari 21u IPv6 4392639 0t0 TCP *:http-alt

      So I killed MY PID which was a different number and I’ve sort of fucked up my MM.

      When I run the MM, I receive this error now - could someone please help? Thank you Xx

      code: 'EADDRINUSE',
        errno: 'EADDRINUSE',
        syscall: 'listen',
        address: '[deleted]',
        port: 8080
      }
      [2020-07-26 09:30:22.750] [ERROR]  MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [2020-07-26 09:30:22.750] [ERROR]  If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      [2020-07-26 09:30:22.780] [LOG]    Launching application.
      ^C
      
      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @Ice-cream
        last edited by sdetweil

        @Ice-cream

        if u reboot, does mm start?

        how did u install? the automated script? if so, did u say yes to “use pm2 to autostart”?

        maybe do

        pm2 status
        

        otherwise some other app is using the same port as mm wants to use.

        edit config.js, and change

        port:8080, 
        

        to

        port:8090,
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • I Offline
          Ice-cream
          last edited by Ice-cream

          Sorry, that did not work - error I receive.
          code: ‘EADDRINUSE’,
          errno: ‘EADDRINUSE’,
          syscall: ‘listen’,
          address: ‘[delete]’,
          port: 8090

          Yes MM auto-starts on reboot > yes to automated script > I followed these steps: https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror.

          The current error when I run

          pm2 restart mm
          

          Use --update-env to update environment variables
          [PM2] Applying action restartProcessId on app [mm](ids: 0,1)
          [PM2] mm â
          [PM2] mm â
          ââââââ¬âââââââââââââââââââââ¬âââââââââââ¬âââââââ¬ââââââââââââ¬âââââââââââ¬âââââââââââ
          â id â name â mode â ⺠â status â cpu â memory â
          ââââââ¼âââââââââââââââââââââ¼âââââââââââ¼âââââââ¼ââââââââââââ¼âââââââââââ¼âââââââââââ¤
          â 0 â mm â fork â 0 â errored â 0% â 0b â
          â 1 â mm â fork â 1 â online â 0% â 1.8mb â
          ââââââ´âââââââââââââââââââââ´âââââââââââ´âââââââ´ââââââââââââ´âââââââââââ´âââââââââââ

          I’ve also run

          pm2 logs mm
          

          pi@raspberrypi:~ $ pm2 logs mm
          [TAILING] Tailing last 15 lines for [mm] process (change the value with --lines option)
          /home/pi/.pm2/logs/mm-error.log last 15 lines:
          0|mm | npm ERR! Failed at the magicmirror@2.12.0 start script.
          0|mm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
          0|mm |
          0|mm | npm ERR! A complete log of this run can be found in:
          0|mm | npm ERR! /home/pi/.npm/_logs/2020-07-26T00_13_44_413Z-debug.log
          0|mm | npm ERR! code ELIFECYCLE
          0|mm | npm ERR! errno 1
          0|mm | npm ERR! magicmirror@2.12.0 start: DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
          0|mm | npm ERR! Exit status 1
          0|mm | npm ERR!
          0|mm | npm ERR! Failed at the magicmirror@2.12.0 start script.
          0|mm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
          0|mm |
          0|mm | npm ERR! A complete log of this run can be found in:
          0|mm | npm ERR! /home/pi/.npm/_logs/2020-07-26T00_36_04_600Z-debug.log

          I’ve just checked and I do not have a doc electron.js from this source - ./node_modules/.bin/electron js/electron.js.

          I remember that all I did was type kill in the terminal and killed a number - what mess have I caused!!! I’m so sorry :(

          The instructions I followed - I stopped after I entered kill and the number (I think mine began with a 5 or 9)

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

            @Ice-cream can u show me the top of config.js and show me how u start magic mirror

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            I 1 Reply Last reply Reply Quote 0
            • I Offline
              Ice-cream @sdetweil
              last edited by

              @sdetweil

              config = {
              	address: "localhost", 	// Address to listen on, can be:
              							// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
              							// - another specific IPv4/6 to listen on a specific interface
              							// - "0.0.0.0", "::" to listen on any interface
              							// Default, when address config is left out or empty, is "localhost"
              	port: 8090,
              	basePath: "/", 	// The URL path where MagicMirror is hosted. If you are using a Reverse proxy
              					// you must set the sub path here. basePath must end with a /
              	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], 	// Set [] to allow all IP addresses
              															// or add a specific IPv4 of 192.168.1.5 :
              															// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
              															// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
              															// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
              
              	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
              	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
              	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true
              
              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @Ice-cream
                last edited by

                @Ice-cream ok, all. makes no sense do

                pm2 stop 0
                reboot
                

                now, system should reboot, and mm should not restart.

                then do

                cd ~/MagicMirror
                npm start >somefile 2>&1
                

                if mm does not start press ctr-c to stop the npm start

                edit the somefile

                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