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.

    Upgraded, failed back, now mirror constantly restarts

    Scheduled Pinned Locked Moved Solved Troubleshooting
    17 Posts 2 Posters 4.7k 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.
    • E Offline
      ember1205
      last edited by

      My MM install has been running reasonably well for a while and I have not pushed any updates to it in probably 18 months. I recently applied the most recent updates for Raspbian and things were still running correctly for maybe around a week.

      Yesterday, I decided I was going to attempt an upgrade using one of the scripts. So, I did an rsync of the running directory to a second directory on the local device then ran the upgrade script.

      Upon starting the mirror, it started complaining about an out-of-date module (MMM-ImagesPhotos). That module wasn’t installed from the original source, so updating it was not going to be something I could do without a bunch of research. So, I stopped the mirror, did an rm-rf on the MM directory, then renamed the backup directory back to its original name.

      I -thought- it was running properly, but today it keeps restarting Chromium browser every minute or two. Where do I even begin?

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

        After a LOT of different attempts at upgrades, fail-backs, new installs, etc., I believe I finally corrected the issue…

        It appears that PM2 was either somehow corrupted during an update attempt or just simply too far out of date. Attempting to run PM2 with certain command options (like stop or even status) was resulting in errors indicating some sort of circular reference. After doing a forced upgrade to the latest version, it stopped showing these errors and the mirror is to running as expected.

        I did make some additional changes that include copying the core MM directory off to another linux host where I now run the mirror as a server. The RPi is now purely a client and it loads noticeably quicker as a result.

        S 1 Reply Last reply Reply Quote 0
        • S Do not disturb
          sdetweil @ember1205
          last edited by sdetweil

          @ember1205

          look for the messages output from npm start
          if using pm2 then pm2 logs --lines will show them

          restart likely means pm2, as thats its job. keep app running
          you could have kept the new folder too…

          i would have liked to see the upgrade log…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • E Offline
            ember1205
            last edited by

            Error on my part… I still have the upgraded directory.

            There is no info from the logs that I can tell that shows any sort of crash or anything. And the line from the npm logs just shows the run-start.sh command.

            S 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @ember1205
              last edited by

              @ember1205 what device is this? p0?

              the upgrade log is MagicMirror/installers/upgrade.log

              also show output of
              uname -a

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • E Offline
                ember1205
                last edited by

                pi 3B+

                uname -a output

                Linux raspberrypi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
                

                How do I post the log? Far too large to go into a post, and isn’t a support file type to attach.

                S 1 Reply Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @ember1205
                  last edited by

                  @ember1205 email to me…

                  same userid at gmail

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • E Offline
                    ember1205
                    last edited by

                    Email sent…

                    S 1 Reply Last reply Reply Quote 0
                    • S Do not disturb
                      sdetweil @ember1205
                      last edited by

                      @ember1205 how did u restore the changes to package.json? the script stashed the old package.json file so that the upgrade could continue

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • E Offline
                        ember1205
                        last edited by

                        Umm… git stash pop?

                        I renamed the upgraded install to “MM-Upgraded” and then renamed my copied directory back to “MagicMirror”. Neither of them works properly at this point and the copied directory was never touched during the upgrade process.

                        S 1 Reply Last reply Reply Quote 0
                        • S Do not disturb
                          sdetweil @ember1205
                          last edited by

                          @ember1205 ok, can’t do that… poackage.json is version specific

                          u might not need it as that run-start.sh was for older configs…
                          restore with
                          git checkout package.json

                          MMM-ImagesPhotos update was because of the missing request lib… removed in 2.16 (you were on 2.13)

                          I dont see anything else in the upgrade that should be problematic…

                          try with the default package.json

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          1 Reply Last reply Reply Quote 0
                          • E Offline
                            ember1205
                            last edited by

                            Forgive me, but “can’t do” what, exactly?

                            I have reverted to the exact software, install, and configuration that was in place before running the upgrade by renaming the upgraded directory and then renaming the backed up directory back to the original name. Unless there are files downloaded and stored -outside- of the MagicMirror directory, this should have ensured a complete reversion to the working files.

                            S 1 Reply Last reply Reply Quote 0
                            • S Do not disturb
                              sdetweil @ember1205
                              last edited by

                              @ember1205 but I see a current version of node and npm, which would not have been available in 2.13 timeframe…

                              the old install will not run on the new node and npm , and a new npm install on the old folder

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              1 Reply Last reply Reply Quote 0
                              • E Offline
                                ember1205
                                last edited by

                                The device is restarting for what appears to be out of memory / swap space issues. Every time the system crashes and restarts, /dev/shm is at zero available space.

                                This location appears to be where the processes are storing content from the image files that are being loaded and it’s apparently causing something to overrun the available space. I have added images, but that was a couple of weeks ago (before even applying the OS updates) and everything ran perfectly fine.

                                S 1 Reply Last reply Reply Quote 0
                                • S Do not disturb
                                  sdetweil @ember1205
                                  last edited by

                                  @ember1205 df -k will show you what is used

                                  the top looks like this

                                  Filesystem      1K-blocks       Used  Available Use% Mounted on
                                  udev             24555800          0   24555800   0% /dev
                                  tmpfs             4931772       4108    4927664   1% /run
                                  /dev/nvme0n1p1 1921217360  889131676  944193092  49% /
                                  tmpfs            24658844    1769768   22889076   8% /dev/shm
                                  tmpfs                5120          4       5116   1% /run/lock
                                  tmpfs            24658844          0   24658844   0% /sys/fs/cgroup
                                  

                                  with appropriate names for your system

                                  free -m will show u memory and swap space

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  1 Reply Last reply Reply Quote 0
                                  • E Offline
                                    ember1205
                                    last edited by

                                    Pretty sure it’s an out of memory issue. Once it crashes, the free memory jumps way up then trends back down once it restarts.

                                    I’ve also discovered that this seems to be purely a “client” problem as I can connect to the Pi from a remote machine using a web browser and it will run just fine without any hiccups while the local client on the Pi crashes about every 60-70 seconds which correlates to two load intervals for photos. Maybe the MMM-ImagesPhotos module isn’t releasing memory properly?

                                    1 Reply Last reply Reply Quote 0
                                    • E Offline
                                      ember1205
                                      last edited by

                                      After a LOT of different attempts at upgrades, fail-backs, new installs, etc., I believe I finally corrected the issue…

                                      It appears that PM2 was either somehow corrupted during an update attempt or just simply too far out of date. Attempting to run PM2 with certain command options (like stop or even status) was resulting in errors indicating some sort of circular reference. After doing a forced upgrade to the latest version, it stopped showing these errors and the mirror is to running as expected.

                                      I did make some additional changes that include copying the core MM directory off to another linux host where I now run the mirror as a server. The RPi is now purely a client and it loads noticeably quicker as a result.

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Do not disturb
                                        sdetweil @ember1205
                                        last edited by

                                        @ember1205 thx. I will add checking pm2 to the upgrade script

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