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

Problems with starting pm2 start mm.sh

Scheduled Pinned Locked Moved Unsolved Troubleshooting
27 Posts 7 Posters 11.2k Views 7 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 @Gomalley
    last edited by Jul 27, 2019, 1:32 AM

    @Gomalley pm2 runs a script,
    installers/mm.sh

    It should read

    cd /home/pi/MagicMirror
    ...etc
    

    Change it if not.

    Then

    pm2 restart 0
    

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • G Offline
      Gomalley
      last edited by Jul 27, 2019, 2:26 AM

      I tried it but I do not think that it worked. My code before I touched it read

      cd ~/MagicMirror
      

      Now i tried two things both gave same output

      cd ~/home/pi/MagicMirror
      

      and

      cd /home/pi/MagicMirror
      

      It now says
      [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2
      [PM2] PM2 Successfully daemonized
      Use --update-env to update environment variables
      [PM2] Applying action restartProcessId on app [0](ids: [ ‘0’ ])
      [PM2] [ERROR] Process 0 not found

      In my mm.sh the file currently reads this:
      cd /home/pi/MagicMirror
      DISPLAY=:0 npm start

      1 Reply Last reply Reply Quote 0
      • G Offline
        Gomalley
        last edited by Jul 27, 2019, 2:28 AM

        And I tried restarting the pi and the “Booting up” MagicMirror2 showed but it never actually loaded.

        S 1 Reply Last reply Jul 27, 2019, 3:30 AM Reply Quote 0
        • S Offline
          sdetweil @Gomalley
          last edited by Jul 27, 2019, 3:30 AM

          @Gomalley ok

          pm2 list
          

          If nothing

          pm2 start installers/mm.sh
          pm2 save
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • D Offline
            Detto65 @madoXX
            last edited by Jul 27, 2019, 12:18 PM

            @madoXX
            just did a fresh install of my magicmirror, because the sd card went corrupt.
            during the install procedure it somehwere asked me if i want to autostart MagicMirror.
            after that it started automatically after booting into the desktop first.
            When trying to use pm2, it shows me the process is already running, but it’s name is MagicMirror , not mm.
            MagicMirror version 2.8.0

            S 1 Reply Last reply Jul 27, 2019, 1:27 PM Reply Quote 0
            • S Offline
              sdetweil @Detto65
              last edited by Jul 27, 2019, 1:27 PM

              @Detto65 yes, the install script uses a json file to configure the pm2 process

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • G Offline
                Gomalley
                last edited by Jul 27, 2019, 9:32 PM

                When i do

                pm2 list
                

                The "name, id, mode, status, cpu, and memory chart shows up. It is all in blue.
                Below it, it says “use ‘pm2 show <id/name>~ to get more details about an app.’”

                When i type in

                pm2 start
                

                The same chart above displays along with a message saying
                [PM2] [ERROR] File ecosystem.config.js is not found

                What does this mean?

                1 Reply Last reply Reply Quote 0
                • R Offline
                  Raksasas
                  last edited by Raksasas Jul 29, 2019, 2:10 AM Jul 29, 2019, 2:05 AM

                  I am having the same problem: I did what was mentioned above and after the reboot it stll did not start automaticly. Running “pm2 list” after the reboot shows mm.sh is not runnning.

                  permitted by applicable law.
                  Last login: Sun Jul 28 20:48:49 2019
                  pi@magicmirror:~ $ pm2 list
                  [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2
                  [PM2] PM2 Successfully daemonized
                  ┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬─────┬──────┬──────────┐
                  │ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
                  └──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴─────┴──────┴──────────┘
                   Use `pm2 show <id|name>` to get more details about an app
                  pi@magicmirror:~ $ pm2 start installers/mm.sh
                  [PM2][ERROR] script not found : /home/pi/installers/mm.sh
                  script not found : /home/pi/installers/mm.sh
                  ┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬─────┬──────┬──────────┐
                  │ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
                  └──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴─────┴──────┴──────────┘
                   Use `pm2 show <id|name>` to get more details about an app
                  pi@magicmirror:~ $ pm2 start mm.sh
                  [PM2] Starting /home/pi/mm.sh in fork_mode (1 instance)
                  [PM2] Done.
                  ┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐
                  │ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem      │ user │ watching │
                  ├──────────┼────┼─────────┼──────┼─────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤
                  │ mm       │ 0  │ N/A     │ fork │ 718 │ online │ 0       │ 0s     │ 0%  │ 2.6 MB   │ pi   │ disabled │
                  └──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘
                   Use `pm2 show <id|name>` to get more details about an app
                  pi@magicmirror:~ $ pm2 save
                  [PM2] Saving current process list...
                  [PM2] Successfully saved in /home/pi/.pm2/dump.pm2
                  pi@magicmirror:~ $ pm2 list
                  ┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐
                  │ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem      │ user │ watching │
                  ├──────────┼────┼─────────┼──────┼─────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤
                  │ mm       │ 0  │ N/A     │ fork │ 718 │ online │ 0       │ 44s    │ 0%  │ 2.6 MB   │ pi   │ disabled │
                  └──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘
                   Use `pm2 show <id|name>` to get more details about an app
                  pi@magicmirror:~ $ pm2 save
                  [PM2] Saving current process list...
                  [PM2] Successfully saved in /home/pi/.pm2/dump.pm2
                  pi@magicmirror:~ $ sudo reboot
                  Connection to 192.168.138.28 closed by remote host.
                  Connection to 192.168.138.28 closed.
                  
                  
                  pi@magicmirror:~ $ cat mm.sh
                  cd /home/pi/MagicMirror
                  DISPLAY=:0 npm start
                  pi@magicmirror:~ $ ls -lha mm.sh
                  -rwxr-xr-x 1 pi pi 45 Jul 28 20:14 mm.sh
                  pi@magicmirror:~ $ 
                  
                  
                  S 1 Reply Last reply Jul 29, 2019, 2:52 AM Reply Quote 0
                  • S Offline
                    sdetweil @Raksasas
                    last edited by sdetweil Jul 29, 2019, 2:53 AM Jul 29, 2019, 2:52 AM

                    @Raksasas should be executing those while in the MagicMirror folder

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    R 1 Reply Last reply Jul 30, 2019, 1:07 PM Reply Quote 0
                    • R Offline
                      Raksasas @sdetweil
                      last edited by Jul 30, 2019, 1:07 PM

                      @sdetweil

                      Looking over the “Auto Start” page I do not see where it states that the pm2 commands are to be run while inside the MagicMirror folder.

                      With you stating that it seems to be saying that the “mm.sh” script needs to be ran from inside the “MagicMirror” too. Again the “Auto Start” page shows that it was created inside the ‘home’ (~) folder. So one would think/presume it can be ran from inside the “home” folder also.

                      Either way I will give it a go.

                      M S 2 Replies Last reply Jul 30, 2019, 1:12 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      2 / 3
                      • First post
                        17/27
                        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