• 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.

PM2 Error

Scheduled Pinned Locked Moved Troubleshooting
7 Posts 4 Posters 3.6k Views 4 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.
  • K Offline
    KnottyCord
    last edited by Mar 20, 2017, 2:06 AM

    Ok so I’m following the guide to install the mirror. I’m now at the auto start part. I did the command “sudo npm install -g pm2” as pi user. Next I did “pm2 startup”, I do the command I ask and I get and error. alt text

    Please help!

    P 1 Reply Last reply Mar 20, 2017, 9:13 AM Reply Quote 0
    • P Offline
      Preve @KnottyCord
      last edited by Mar 20, 2017, 9:13 AM

      @KnottyCord Don’t you have to add your mm.sh in the start command? I’m also new at this, so I could be very wrong at this.

      K 1 Reply Last reply Mar 20, 2017, 11:37 AM Reply Quote 0
      • K Offline
        KnottyCord @Preve
        last edited by Mar 20, 2017, 11:37 AM

        @Preve I don’t think so so because if you follow the step on the guide this step of adding the mm.sh is after.

        1 Reply Last reply Reply Quote 0
        • Y Offline
          yawns Moderator
          last edited by Mar 20, 2017, 11:54 AM

          KnottyCord is right. pm2 startup is not used to start the mm2 process but to start and initialize pm2 itself.
          Just to be sure … you ran pm2 startup and that told you to run the command your screenshot shows? There are other users with similar problems: https://github.com/Unitech/pm2/issues/2574

          1 Reply Last reply Reply Quote 0
          • K Offline
            KnottyCord
            last edited by Mar 20, 2017, 7:33 PM

            Yes that’s what i did. Run the command pm2 startup. It gave me a command to enter. When I pressed enter it was not working I keep giving me an error!

            1 Reply Last reply Reply Quote 0
            • K Offline
              KnottyCord
              last edited by yawns Mar 20, 2017, 8:04 PM Mar 20, 2017, 7:48 PM

              Changing the command form this:
              sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi" to this:
              sudo su -c "env PATH=$PATH:/usr/bin pm2 startup systemd -u pi --hp /home/pi"
              seem to work!

              A 1 Reply Last reply Mar 21, 2017, 4:17 AM Reply Quote 0
              • A Offline
                amanzimdwini @KnottyCord
                last edited by Mar 21, 2017, 4:17 AM

                @KnottyCord You are correct - you are running systemd (not plain old linux). PM2 does not seem to “realize” that.

                Note that there is ANOTHER problem with PM2 that is now reported as a bug - read all about it here:

                https://forum.magicmirror.builders/topic/2065/solved-pm2-does-not-start-on-reboot/10

                Best of luck - and don’t hesitate to ask for help!

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