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 dosn`t start mm.sh after reboot

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    29 Posts 3 Posters 11.9k 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
      Skorpionbird @sdetweil
      last edited by Skorpionbird

      @sdetweil when i copy paste ~/MagicMirror/installers/pm2_setup.log

      Then i recive

      Connecting to 192.168.1.174 port 22, please wait…
      login as: 
      pi@192.168.1.174’s password: 
      Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l

      The programs included with the Debian GNU/Linux system are free software;
      the exact distribution terms for each program are described in the
      individual files in /usr/share/doc/*/copyright.

      Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
      permitted by applicable law.
      Last login: Sun Nov  3 20:42:57 2019 from 192.168.1.9

      pi@raspberrypi:~ $ ~/MagicMirror/installers/pm2_setup.log
      -bash: /home/pi/MagicMirror/installers/pm2_setup.log: Keine Berechtigung access denied
      pi@raspberrypi:~ $

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Skorpionbird
        last edited by sdetweil

        @Skorpionbird I want to see the output of the command

        pm2 logs 
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          Skorpionbird @sdetweil
          last edited by

          @sdetweil oh sry here is it
          pm2 logs
          [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2
          [PM2] PM2 Successfully daemonized
          [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
          /home/pi/.pm2/pm2.log last 15 lines:
          PM2        | 2019-11-05T19:12:24: PM2 log: ===============================================================================
          PM2        | 2019-11-05T19:12:24: PM2 log: — New PM2 Daemon started ----------------------------------------------------
          PM2        | 2019-11-05T19:12:24: PM2 log: Time                 : Tue Nov 05 2019 19:12:24 GMT+0100 (GMT+01:00)
          PM2        | 2019-11-05T19:12:24: PM2 log: PM2 version          : 4.1.2
          PM2        | 2019-11-05T19:12:24: PM2 log: Node.js version      : 10.17.0
          PM2        | 2019-11-05T19:12:24: PM2 log: Current arch         : arm
          PM2        | 2019-11-05T19:12:24: PM2 log: PM2 home             : /home/pi/.pm2
          PM2        | 2019-11-05T19:12:24: PM2 log: PM2 PID file         : /home/pi/.pm2/pm2.pid
          PM2        | 2019-11-05T19:12:24: PM2 log: RPC socket file      : /home/pi/.pm2/rpc.sock
          PM2        | 2019-11-05T19:12:24: PM2 log: BUS socket file      : /home/pi/.pm2/pub.sock
          PM2        | 2019-11-05T19:12:24: PM2 log: Application log path : /home/pi/.pm2/logs
          PM2        | 2019-11-05T19:12:24: PM2 log: Process dump file    : /home/pi/.pm2/dump.pm2
          PM2        | 2019-11-05T19:12:24: PM2 log: Concurrent actions   : 2
          PM2        | 2019-11-05T19:12:24: PM2 log: SIGTERM timeout      : 1600
          PM2        | 2019-11-05T19:12:24: PM2 log: ===============================================================================

          1 Reply Last reply Reply Quote 0
          • S Offline
            Skorpionbird
            last edited by

            any news?

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @Skorpionbird
              last edited by

              @Skorpionbird what system is this? hardware/os?

              i have seen a similar problem recently on macOs Catalina…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S T 2 Replies Last reply Reply Quote 0
              • S Offline
                Skorpionbird @sdetweil
                last edited by

                @sdetweil its a Rpi 2 with Noobs Rasbian GNU Linux 10

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @Skorpionbird
                  last edited by sdetweil

                  @Skorpionbird in the pm2_setup.log, could you show me the rest of this line

                  command = sudo env PATH=$PATH:/usr/bin:/bin /usr/lib/node_modules/pm2/bin/pm2 startup sys$
                  

                  and try this

                  sudo env PATH=$PATH:/usr/local/bin pm2 startup systemd -u pi --hp /home/pi
                  

                  then , make sure MagicMirror is not running

                  cd ~/MagicMirror
                  pm2 start installers/pm2_MagicMirror.json
                  pm2 save
                  

                  then reboot

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    Skorpionbird
                    last edited by

                    @sdetweil said in pm2 dosn`t start mm.sh after reboot:

                    sudo env PATH=$PATH:/usr/local/bin pm2 startup systemd -u pi --hp /home/pi

                    thx with this it works fine

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      trividar @sdetweil
                      last edited by

                      @sdetweil Have you a solution for mac osx catalina? THX

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @trividar
                        last edited by

                        @trividar sure, just use the updated install script, which will be in the next release

                        see
                        https://forum.magicmirror.builders/topic/10171/anyone-want-to-try-updated-installer

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        T 1 Reply Last reply Reply Quote 0
                        • T Offline
                          trividar @sdetweil
                          last edited by

                          @sdetweil how can I execute this script?

                          S 1 Reply Last reply Reply Quote 0
                          • S Offline
                            sdetweil @trividar
                            last edited by sdetweil

                            @trividar read the instructions at the link I gave,
                            in a terminal window , use finder to find ‘terminal’

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            T 1 Reply Last reply Reply Quote 0
                            • T Offline
                              trividar @sdetweil
                              last edited by

                              @sdetweil OK I found the link…

                              bash -c "$(curl -sL https://www.dropbox.com/s/rlh710ng0zwv3vp/raspberry.sh?dl=0)"
                              

                              just a question, I have set up the magicmirror with all my settings etc. can I just execute this without loosing my stuff??

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                sdetweil @trividar
                                last edited by

                                @trividar no… if u have it running, why do you need to install again?

                                if you don’t have it running, then u need to install…

                                you can copy the config.js to the new system, but you will have to install the modules and make sure to handle the dependencies they require

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                T 1 Reply Last reply Reply Quote 0
                                • T Offline
                                  trividar @sdetweil
                                  last edited by

                                  @sdetweil because I can’t get pm2 to work on my mac mini catalina

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    sdetweil @trividar
                                    last edited by sdetweil

                                    @trividar oh, pm2… then use the new script for that
                                    see here
                                    https://forum.magicmirror.builders/topic/10907/new-script-to-install-fix-pm2-config-for-start-on-boot

                                    sometimes it doesn’t restart on boot like I think it should (on catalina, worked great on sierra an high sierra). haven’t found the problem yet

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    T 1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      trividar @sdetweil
                                      last edited by

                                      @sdetweil oooh perfect… I will try it… do i see this right, I should execute it outside from MM?

                                      cd
                                      bash -c  "$(curl -sL  https://www.dropbox.com/s/cy2z7lbkpifcbrk/fixuppm2.sh?dl=0)"
                                      
                                      S 2 Replies Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @trividar
                                        last edited by

                                        @trividar execute anywhere, it figures it out

                                        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 @trividar
                                          last edited by sdetweil

                                          @trividar thanks for asking about catalina… I have found the ‘problem’ with pm2 restart…

                                          do

                                          sudo nano /Users/$USER/Library/LaunchAgents/pm2.$USER.plist
                                          

                                          right at the top there is a string ‘UserName’ shown below
                                          the space after the < is because this forum sees the < as a special formatting tag…

                                                < key>UserName< /key>
                                                < string>?????< /string>
                                          

                                          anyhow, delete those two lines
                                          save the file (ctrl-o,enter), and exit, (ctrl-x)

                                          then restart (via shell),

                                          sudo shutdown -r now
                                          

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            sdetweil @sdetweil
                                            last edited by sdetweil

                                            @trividar I’ve added all that to the fixup script… (and the updated install script)

                                            so, if u haven’t done this manually, run then script, then restart your mac

                                            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
                                            • 2
                                            • 2 / 2
                                            • 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