• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Autostart woes

Scheduled Pinned Locked Moved Unsolved Troubleshooting
7 Posts 3 Posters 2.3k Views 3 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
    last edited by Jul 10, 2018, 2:54 PM

    i have a 2.4.1 instance of MM running just fine… now to set to start on boot…

    install pm2…

    the doc for ‘pm2 startup’ doesn’t help me…
    ‘will give you the command u need to execute’

    execute when, how? if unattended, who is ‘you’?

    anyhow…from the pi home directory

    pm2 start mm.sh
    

    doesn’t

    now what?

    i have a startup script, which checks for and starts other dependencies…
    called run
    it doesn’t work either

    and, so… IF I wanted pm2 to start at boot… how do I do THAT??
    execute that ‘command’…

    done that too… and well, pm2 doesn’t start at boot… (no running process with pm2 in it anywhere)

    now what?

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • S Offline
      sdetweil
      last edited by Jul 10, 2018, 3:38 PM

      I see this in the pi/.pm2/pm2.log, after service pm2-pi start

      internal/modules/cjs/loader.js:583
          throw err;
          ^
      
      Error: Cannot find module './lib/eventemitter2'
      

      and the systemctl status pm2-pi.service command produces

      ● pm2-pi.service - PM2 process manager
         Loaded: loaded (/etc/systemd/system/pm2-pi.service; enabled; vendor preset: enabled)
         Active: failed (Result: resources) since Tue 2018-07-10 10:36:25 CDT; 7s ago
           Docs: https://pm2.keymetrics.io/
        Process: 2899 ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect (code=exited, status=0/SUCCESS)
      
      Jul 10 10:36:23 raspberrypi systemd[1]: Starting PM2 process manager...
      Jul 10 10:36:24 raspberrypi pm2[2899]: [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2
      Jul 10 10:36:25 raspberrypi systemd[1]: pm2-pi.service: PID file /home/pi/.pm2/pm2.pid not readable (yet?) after start: No such file or directory
      Jul 10 10:36:25 raspberrypi systemd[1]: Failed to start PM2 process manager.
      Jul 10 10:36:25 raspberrypi systemd[1]: pm2-pi.service: Unit entered failed state.
      Jul 10 10:36:25 raspberrypi systemd[1]: pm2-pi.service: Failed with result 'resources'.
      

      so, it looks like some pm2 install problem

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil
        last edited by Jul 10, 2018, 3:48 PM

        I see this error/warning during

        sudo npm pm2 install -g

        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/pm2/node_modules/fsevents):
        npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“arm”})

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil
          last edited by Jul 10, 2018, 5:37 PM

          i gave up on pm2, edited /etc/rc.local

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          M 1 Reply Last reply Jul 11, 2018, 12:06 AM Reply Quote 0
          • M Offline
            Mykle1 Project Sponsor Module Developer @sdetweil
            last edited by Jul 11, 2018, 12:06 AM

            @sdetweil

            Did you try installing it without sudo? Just a guess

            Create a working config
            How to add modules

            S 1 Reply Last reply Jul 11, 2018, 1:01 AM Reply Quote 0
            • S Offline
              sdetweil @Mykle1
              last edited by Jul 11, 2018, 1:01 AM

              @mykle1 yes, cut and paste from the mm doc

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • L Offline
                lavolp3 Module Developer
                last edited by Jul 11, 2018, 12:35 PM

                I’d recommend trying to do it again using the description by MichMich
                https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror

                It is crystal clear from what I see, also describes what to do.

                "the doc for ‘pm2 startup’ doesn’t help me…
                ‘will give you the command u need to execute’

                execute when, how? if unattended, who is ‘you’?"

                No offense, but btoh the doc and your terminal will show you exactly what to do. Copy a line of text the terminal throws out and execute it again.

                That’s the reason I’d suggest to do it again with a bit more patience. :-)

                How to troubleshoot modules
                MMM-soccer v2, MMM-AVStock

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