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 auto starting

    Scheduled Pinned Locked Moved Solved Troubleshooting
    5 Posts 3 Posters 1.6k 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.
    • Q Offline
      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 Offline
        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
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        Q 1 Reply Last reply Reply Quote 0
        • Q Offline
          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 Offline
            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

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • ejay-ibmE Offline
              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 Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy