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 1.9k 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.
    • S Offline
      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 Offline
          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 Offline
              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
              • 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