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

MM stuck on boot up - cant connect via remote

Scheduled Pinned Locked Moved Solved Troubleshooting
11 Posts 2 Posters 2.1k Views 2 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
    Kastore
    last edited by Kastore Jan 19, 2020, 4:09 PM Jan 19, 2020, 10:33 AM

    Hello everyone,

    as a heads up. This post contains 3 UPDATE: 2 Update: no problems which I am not sure if they are connected or not. Thus I decided to just make one post - if these should be seperated please let me know.
    I am also completly new to coding. So please bear with me if some “stupid” questions arise or I cant follow along right away.

    The Problems:
    I am currently stuck with my MM. Since a couple of days the mirror forced me to “log in” while showing the main desktop.

    I tried connecting via remote (name and pw are correct [direct console loggin works]) but couldnt get any access Update: I forgot the case sensivity… remote works

    :::

    connecting to sesman ip 127.0.0.1 port 3550 
    sesman connect ok~~
    sending login info to session manager, please wait ...
    login failed for display 0
    

    :::

    After some research the SD card was said to be the issue.

    I plugged my keyboard into the Pi and ran the CTRL+ALT+F2 to enter the console, logged in (name/pw work!), checked if my SD card was full (… it was) and ran:

    pm2 flush
    trash-empty
    

    That solved the storage issue.

    The screen now just showed the mirror (update: the splash screen) being stuck on “booting” and the bottom left had “rc-local.service” on display. Other modules are however working (such as MMM-PIRSensor).

    The mirror is however still not accessable via remote and the MM is also stuck on the booting.

    So I ran updates via the commands, restarted and hoped it would work

    git pull
    npm install
    

    The mirror is still stuck on the same spot and still not accessable.

    So my three issues are
    1) Getting the mirror running again
    Solution: dont know what fixed it.
    First: My SD card was full and I cleared some space via “pm2 flush” and “trash-empty”.
    Second: I ran the “git pull” - “npm install”
    Third: After having remote access again I did “npm install” in the modules folders
    Fourth: I entered “pm2 list” in the console and saw no instance of the mm.sh. So I redid the pm2 shell script, restarted and it worked. The Pi now goes past the splash screen, shows the desktop and then starts the MM2.

    2) Getting the remote access back
    Solution: apparently I entered the user wrong… Classic case of "the problem is in front of the keyboard.

    3) exiting the console display (CTRL+ALT+F1)?
    Solution: It wasnt the key-combination. I changed the “sudo raspi-config”. Swaped it back to console and the display went

    S 1 Reply Last reply Jan 19, 2020, 1:05 PM Reply Quote 0
    • S Away
      sdetweil @Kastore
      last edited by Jan 19, 2020, 1:05 PM

      @Kastore can u show us the address: value in config.js, there was a security fix which changed the default

      address: “” means localhost, ONLY stuff ON the same machine(localhost) can access the mirror app
      u need to change to
      address:“0.0.0.0” (or some other specific address if u want tighter control (this means anyone, and was the accidental default before)

      if u got enough storage from pm2 flush, you are in big trouble. you should examine and clear whatever u don’t need.

      So I ran updates via the commands, restarted and hoped it would work
      

      git pull
      npm install

      
      if u have modules installed that contain a 'package.json' file, then THEY TOO need 
      an npm install done in each such module folder..
      
      the new upgrade script handles all that for future updates 
      see https://github.com/sdetweil/MagicMirror_scripts

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      K 1 Reply Last reply Jan 19, 2020, 3:12 PM Reply Quote 0
      • K Offline
        Kastore @sdetweil
        last edited by Kastore Jan 19, 2020, 3:18 PM Jan 19, 2020, 3:12 PM

        @sdetweil

        ~~

        @Kastore can u show us the address: value in config.js, there was a security fix which changed the default

        address: “” means localhost, ONLY stuff ON the same machine(localhost) can access the mirror app
        u need to change to
        address:“0.0.0.0” (or some other specific address if u want tighter control (this means anyone, and was the accidental default before)

        Not really sure how that connect to the problem with the remote? (just being curious)
        The Pi is included in the network and I access it via the remotedesktop app from Windows. Just entering the name of the Pi and then name + password.

        For some reason I now got access to the remote again… Not really sure why. BUT I may have entered the user name in capital letters and not lower case. ._.

        Well… one problem down at least

        if u got enough storage from pm2 flush, you are in big trouble. you should examine and clear whatever u don’t need.

        Well I think I never cleared the logs in about 2y time or so. So… that was a bit of a problem. Plus i had 3 previous versions of the MM in the trashbin… those where the bigger problem. The pm2 flush made about 2gb, the trash-empty about 6gb

        if u have modules installed that contain a ‘package.json’ file, then THEY TOO need
        an npm install done in each such module folder…

        But the problem had already been even prior to updating anything. (MM being stuck on booting)

        S 1 Reply Last reply Jan 19, 2020, 3:21 PM Reply Quote 0
        • S Away
          sdetweil @Kastore
          last edited by Jan 19, 2020, 3:21 PM

          @Kastore said in MM stuck on boot up - cant connect via remote:

          Not really sure how that connect to the problem with the remote? (just being curious)

          there are two remote access…

          you can ssh to the console, independent of any app
          and u can connect to an app (MagicMirror), independent of using ssh.

          I was responding to this statement

          The mirror is however still not accessable via remote and the MM is also stuck on the booting.

          there are two things there that aren’t quite clear

          mirror and MM

          I just worked on my pi4 which had hung, and would not boot to the graphical desktop
          I had run out of space. I could ssh and boot to the commandline (console mode)

          it turns out two /var/log files (kern.log and syslog) had consumed all the space
          even after erasing them…

          this command showed me that the two files were being held open,

          sudo lsof +L1
          

          so I rebooted and disk space usage dropped from 100% to 25%

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          K 1 Reply Last reply Jan 19, 2020, 3:29 PM Reply Quote 0
          • K Offline
            Kastore @sdetweil
            last edited by Jan 19, 2020, 3:29 PM

            @sdetweil said in MM stuck on boot up - cant connect via remote:

            @Kastore said in MM stuck on boot up - cant connect via remote:

            Not really sure how that connect to the problem with the remote? (just being curious)

            there are two remote access…

            you can ssh to the console, independent of any app
            and u can connect to an app (MagicMirror), independent of using ssh.

            I was responding to this statement

            The mirror is however still not accessable via remote and the MM is also stuck on the booting.

            there are two things there that aren’t quite clear

            mirror and MM

            Sorry for causing a confussion. What I meant was: I want to remotly access the Raspberry Pi via the remotedestop app from w10.

            That issue has been resolved since - of course - the problem sat infront of the keyboard… like ever other problem always does ^^’

            I now got access to the Pi again.

            Did that clear it up?

            I just worked on my pi4 which had hung, and would not boot to the graphical desktop
            I had run out of space. I could ssh and boot to the commandline (console mode)

            I did the same and plugged in my keyboard to the Pi directly. Pressed CTRL ALT F2 and logged in there. That is how I gained access and realized that the SD card was full.

            That issue has also been resolved. I had the bin still full and the pm2 flush command.

            So the remaining two are

            1. The software MagicMirror 2 is stuck in “Booting” and has rc-services.local on the bottom right
            2. the console is still showing and i cant exit it (The CTRL+ALT+F1)
            S 1 Reply Last reply Jan 19, 2020, 3:33 PM Reply Quote 0
            • S Away
              sdetweil @Kastore
              last edited by Jan 19, 2020, 3:33 PM

              @Kastore said in MM stuck on boot up - cant connect via remote:

              The software MagicMirror 2 is stuck in “Booting” and has rc-services.local on the bottom right
              the console is still showing and i cant exit it (The CTRL+ALT+F1)

              ‘booting’ is another word… that means from hardware power on…

              so, it sounds like the hardware boot is failing, but u say u can access…

              rc-services.local that has nothing to do with MagicMirror, it is an OS file…

              the console is still shown?

              so, are you booting your pi in console mode? use raspi-config to change that back to Desktop mode

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              K 1 Reply Last reply Jan 19, 2020, 3:40 PM Reply Quote 0
              • K Offline
                Kastore @sdetweil
                last edited by Jan 19, 2020, 3:40 PM

                @sdetweil said in MM stuck on boot up - cant connect via remote:

                @Kastore said in MM stuck on boot up - cant connect via remote:

                The software MagicMirror 2 is stuck in “Booting” and has rc-services.local on the bottom right
                the console is still showing and i cant exit it (The CTRL+ALT+F1)

                ‘booting’ is another word… that means from hardware power on…

                Just quoting what it says on the screen. The Pi is starting and running (sub 5% on idle - 40% on npm installs). After restarting the 4 berries show, the starting screen shows (“desktop”) quick and then the MagicMirror 2 application launches.

                The APP however displays “MagicMirror 2 - booting” and keeps being stuck in this state

                (did that clear it up?)

                so, it sounds like the hardware boot is failing, but u say u can access…

                rc-services.local that has nothing to do with MagicMirror, it is an OS file…

                Again - just citing what it shows

                the console is still shown?

                so, are you booting your pi in console mode? use raspi-config to change that back to Desktop mode

                Aaaaaah! And I thought I need to press some fancy combinations -.-’

                Went to
                sudo raspi-config and changed the setting.


                So only the “booting” issue is still active

                S 1 Reply Last reply Jan 19, 2020, 3:45 PM Reply Quote 0
                • S Away
                  sdetweil @Kastore
                  last edited by sdetweil Jan 19, 2020, 3:51 PM Jan 19, 2020, 3:45 PM

                  @Kastore said in MM stuck on boot up - cant connect via remote:

                  The APP however displays “MagicMirror 2 - booting” and keeps being stuck in this state

                  how does MM start at boot? from using pm2? or some other mechanism?

                  mine use pm2, and I have never seen that message

                  a search on google shows that its probably a bad edit of /etc/rc.local (my guess is to add start at boot)
                  https://www.raspberrypi.org/forums/viewtopic.php?t=246236
                  restore the rc.local and use the pm2 setup script here https://github.com/sdetweil/MagicMirror_scripts

                  I have seen the splash screen that says booting, but the desktop hasn’t started yet…

                  splash.png

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  K 1 Reply Last reply Jan 19, 2020, 3:51 PM Reply Quote 0
                  • K Offline
                    Kastore @sdetweil
                    last edited by Jan 19, 2020, 3:51 PM

                    @sdetweil Yes excatly that one shows up and didnt go anywhere.

                    HOWEVER - Problems resolved.

                    –

                    I am using pm2 so i went and redid the autostart file (mm.sh and so on) [the shell script?]

                    After that I restarted and the Pi

                    1. started
                    2. showed the splash (see above)
                    3. showed the desktop
                      [I got that wrong apparently]
                    4. loaded the MagicMirror 2 app [bit slow but it loaded]

                    I really got no idea as to why it now works again :D

                    –

                    regarding the pm2-flush. You said that is a big issue? Any idea how i can maintain the Pi properly?

                    S 1 Reply Last reply Jan 19, 2020, 3:55 PM Reply Quote 0
                    • S Away
                      sdetweil @Kastore
                      last edited by sdetweil Jan 19, 2020, 3:57 PM Jan 19, 2020, 3:55 PM

                      @Kastore said in MM stuck on boot up - cant connect via remote:

                      I really got no idea as to why it now works again

                      i bet it was because you were in console mode… raspi-config fixed that

                      I would build a regular set of steps to logon and check where disk is used
                      this will give u top 5

                      du -a / 2>/dev/null | sort -n -r | head -n 5
                      

                      but if the pm2 logs are the disk space consumer, u need a bigger memory card

                      u should generally not run all the time over 75-80% usage

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      K 1 Reply Last reply Jan 19, 2020, 4:05 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        2/11
                        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