Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    SOLVED pm2 Error auto starting

    Troubleshooting
    3
    5
    901
    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.
    • Q
      qqqqqqqq last edited by qqqqqqqq

      I’ve followed all the instructions mentioned here

      This is the error that I’m facing

      pi@raspberrypi:~ $ pm2 start mm.sh
      [PM2] Applying action restartProcessId on app [mm](ids: 0)
      [PM2] [mm](0) ✓
      [PM2] Process successfully started
      ┌──────┬────┬──────┬─────────┬─────┬─────┬────────┐
      │ Name │ id │ mode │ status  │ ↺   │ cpu │ memory │
      ├──────┼────┼──────┼─────────┼─────┼─────┼────────┤
      │ mm   │ 0  │ fork │ stopped │ 136 │ 0%  │ 0 B    │
      └──────┴────┴──────┴─────────┴─────┴─────┴────────┘
       Use `pm2 show <id|name>` to get more details about an app
      pi@raspberrypi:~ $ pm2 logs mm
      [TAILING] Tailing last 15 lines for [mm] process (change the value with --lines option)
      /home/pi/.pm2/logs/mm-out.log last 15 lines:
      /home/pi/.pm2/logs/mm-error.log last 15 lines:
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      0|mm       | bash: /home/pi/mm.sh: Permission denied
      
      ^C
      pi@raspberrypi:~ $
      
      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @qqqqqqqq last edited by

        @qqqqqqqq
        mm.sh is not marked executable at all or for the user trying to execute it…

        to make it executable for the user… but not any other user
        use the command

        chmod 766  /home/pi/mm.sh 
        

        to make it executable by ANY user (root/pi/…)
        do

        chmod +x /home/pi/mm.sh
        
        Q 1 Reply Last reply Reply Quote 0
        • S
          sdetweil @qqqqqqqq last edited by

          @qqqqqqqq
          mm.sh is not marked executable at all or for the user trying to execute it…

          to make it executable for the user… but not any other user
          use the command

          chmod 766  /home/pi/mm.sh 
          

          to make it executable by ANY user (root/pi/…)
          do

          chmod +x /home/pi/mm.sh
          
          Q 1 Reply Last reply Reply Quote 0
          • Q
            qqqqqqqq @sdetweil last edited by

            @sdetweil said in pm2 Error auto starting:

            @qqqqqqqq
            mm.sh is not marked executable at all or for the user trying to execute it…

            to make it executable for the user… but not any other user
            use the command

            chmod 766  /home/pi/mm.sh 
            

            to make it executable by ANY user (root/pi/…)
            do

            chmod +x /home/pi/mm.sh
            

            Thanks! Worked perfectly.
            But I wonder why it didn’t give mm.sh the permission when i used the command.

            chmod +x mm.sh
            
            S 1 Reply Last reply Reply Quote 0
            • S
              sdetweil @qqqqqqqq last edited by

              @qqqqqqqq said in pm2 Error auto starting:

              But I wonder why it didn’t give mm.sh the permission when i used the command.

              what folder where u in at the time you issued the chmod +x mm.sh?

              if MagicMirror , then it would have failed… should have given and error

              1 Reply Last reply Reply Quote 0
              • ejay-ibm
                ejay-ibm Project Sponsor Module Developer last edited by

                I would say is more ‘sure’ when you are in the right folder to do :

                sudo chmod +x ./mm.sh

                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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy