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.

    Modules stop work over time

    Scheduled Pinned Locked Moved Troubleshooting
    20 Posts 4 Posters 15.0k 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.
    • L Offline
      lali
      last edited by

      Hi

      My setup works at first but gradually some modules stop working.

      I use newsfeed and clock from the default modules and MMM-Scrobler and MMM-RandomPhoto from third part.

      The scrobbler can work for hours and then stop and then start again. The RandomPhoto seems to work but on the morning it has frozen and does not circle pictures anymore.

      Everything works again if I restart through SSH.

      Everything is updated.

      Any thoughts what could be the solution?

      1 Reply Last reply Reply Quote 0
      • M Offline
        McSorley
        last edited by

        Sounds to me like a hiccup on your network.

        1 Reply Last reply Reply Quote 0
        • L Offline
          lali
          last edited by

          Well… nothing else on my network is hiccupy. Just those modules…

          1 Reply Last reply Reply Quote 0
          • K Offline
            kckndrgn
            last edited by

            Is there anything in the logs? That would be first place I would start, maybe turning up the log level to get more detail.

            1 Reply Last reply Reply Quote 0
            • L Offline
              lali
              last edited by

              I made a npm debug, if thats what you mean… Heres is some error, but I don’t know how to fix or if it is this making the troubles…

              0 info it worked if it ends with ok
              1 verbose cli [ ‘/usr/bin/nodejs’, ‘/usr/bin/npm’, ‘start’, ‘dev’ ]
              2 info using npm@3.10.6
              3 info using node@v6.4.0
              4 verbose config Skipping project config: /home/pi/.npmrc. (matches userconfig)
              5 verbose stack Error: ENOENT: no such file or directory, open ‘/home/pi/package.json’
              5 verbose stack at Error (native)
              6 verbose cwd /home/pi
              7 error Linux 4.4.19-v7+
              8 error argv “/usr/bin/nodejs” “/usr/bin/npm” “start” “dev”
              9 error node v6.4.0
              10 error npm v3.10.6
              11 error path /home/pi/package.json
              12 error code ENOENT
              13 error errno -2
              14 error syscall open
              15 error enoent ENOENT: no such file or directory, open ‘/home/pi/package.json’
              16 error enoent ENOENT: no such file or directory, open ‘/home/pi/package.json’
              16 error enoent This is most likely not a problem with npm itself
              16 error enoent and is related to npm not being able to find a file.
              17 verbose exit [ -2, true ]

              KirAsh4K 1 Reply Last reply Reply Quote 0
              • L Offline
                lali
                last edited by

                In mm-out.log I find this

                Whoops! There was an uncaught exception…
                MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
                If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues

                1 Reply Last reply Reply Quote 0
                • KirAsh4K Offline
                  KirAsh4 Moderator @lali
                  last edited by

                  @lali said in Modules stop work over time:

                  15 error enoent ENOENT: no such file or directory, open ‘/home/pi/package.json’
                  16 error enoent ENOENT: no such file or directory, open ‘/home/pi/package.json’

                  You are attempting to run it from the /home/pi folder instead of /home/pi/MagicMirror/ …

                  A Life? Cool! Where can I download one of those from?

                  L 1 Reply Last reply Reply Quote 0
                  • L Offline
                    lali @KirAsh4
                    last edited by

                    @KirAsh4 But why does it work at first and then not?

                    My mm.sh looks like this:

                    cd ~/MagicMirror
                    DISPLAY=:0 npm start

                    Where and how must I make a change?

                    1 Reply Last reply Reply Quote 0
                    • KirAsh4K Offline
                      KirAsh4 Moderator
                      last edited by

                      Thing is, once it’s up and running, things just remain in memory and run. The only time it will restart is if the entire thing crashes. But you can check on that by typing in 'pm2 list' and look at the restarts column. If you are seeing a lot of restarts, then something else is going on that’s causing it to crash. Mine’s been running stable for the past almost 30 days now (I haven’t been active on my mirror with coding nor updates, life took over.)

                      How things stop, specifically data being requested, is if there is a momentary network issue that the task could not reach the internet. However, even that will rectify itself at the next poll … If I disconnect my rpi from the network, eventually things like the calendar, newsfeed, and weather will all stop responding. When I reconnect it, they will all eventually refresh and start working again. So I don’t know what could be causing yours to simply quit.

                      A Life? Cool! Where can I download one of those from?

                      L 1 Reply Last reply Reply Quote 0
                      • L Offline
                        lali @KirAsh4
                        last edited by

                        @KirAsh4 The only restarts it shows is my manual restarts with pm2 restart mm command. Otherwise it does not crash. The modules just stop answer. And at the same time the news-ticker still works…

                        Could it be so that the memory is overflooded somehow?

                        1 Reply Last reply Reply Quote 0
                        • KirAsh4K Offline
                          KirAsh4 Moderator
                          last edited by

                          Not unless you have a bunch of other stuff running on your rpi. What happens if you run only the default configuration and modules? Do any of those stop responding after a while, and what exactly happens, what does the display say or do?

                          A Life? Cool! Where can I download one of those from?

                          L 1 Reply Last reply Reply Quote 0
                          • L Offline
                            lali @KirAsh4
                            last edited by

                            @KirAsh4 The only thing i run besides MM is Pi-hole.

                            The Scrobbler-plugin has never lived for a longer time. It works for a few songs, maybe an album and when a song ends it just disappears. No error messages or something on the screen. If i pm2 restart mm it again, it works for a few songs again.

                            When RandomPhoto stops working, it freezes on an image, like it comes to an end of a stack. (Maybe it does?)

                            Clock and news seems to work all the time.

                            Could it be that file package.json?

                            1 Reply Last reply Reply Quote 0
                            • KirAsh4K Offline
                              KirAsh4 Moderator
                              last edited by

                              Yeah, neither of those are default packages (that I could help you with.) Perhaps this is something you need to take to the respective authors and have them help you track down what the problem could be. It sounds like MM and its default modules are working just fine, so this is something that happens outside of it (specifically with those modules you mentioned.)

                              As a side query: why do you need pi-hole on the rpi? None of the default modules display ads, unless you’re actively using the rpi as a desktop computer and browse the internet with it.

                              A Life? Cool! Where can I download one of those from?

                              L 1 Reply Last reply Reply Quote 0
                              • L Offline
                                lali @KirAsh4
                                last edited by

                                @KirAsh4 Well, I suppose that is my next step then…

                                I use it to block out ads throughout my network. I set it as a dns in the router. It filters ads quiet nice. From web and in apps.

                                The MM install was to make use of my display I bought with some nifty information.

                                1 Reply Last reply Reply Quote 0
                                • KirAsh4K Offline
                                  KirAsh4 Moderator
                                  last edited by

                                  Is it possible that pi-hole is seeing those network queries (from those modules) and actively blocking them till you reset the whole thing again?

                                  A Life? Cool! Where can I download one of those from?

                                  L 1 Reply Last reply Reply Quote 0
                                  • L Offline
                                    lali @KirAsh4
                                    last edited by

                                    @KirAsh4 I dont think so, I do not reset the pi-hole, i only reset MM.

                                    If the pi-hole were to blame, I should not be able to reach last.fm or the source where I load images from. And it should not work for at first and then all of a sudden not…

                                    Maybe something just times out…?

                                    1 Reply Last reply Reply Quote 0
                                    • KirAsh4K Offline
                                      KirAsh4 Moderator
                                      last edited by

                                      Those are questions for the authors. If it were me though, I would disable everything from running on the rpi, or start with a completely clean setup (including a reformat and reload of the Raspbian image), and see where that takes you. But that’s me. I like to eliminate any and all possible causes. It’s also why I have multiple rpis sitting on my desk … I can easily and quickly spin one up from scratch.

                                      A Life? Cool! Where can I download one of those from?

                                      L 1 Reply Last reply Reply Quote 0
                                      • L Offline
                                        lali @KirAsh4
                                        last edited by

                                        @KirAsh4 I only have one at home. And one at work… But I will soon lay my hands on some more.

                                        Well, thanks for your input. I’ll dig deeper…

                                        1 Reply Last reply Reply Quote 0
                                        • L Offline
                                          lali
                                          last edited by

                                          Fresh error log

                                          { Error: socket hang up
                                          at TLSSocket.onHangUp (_tls_wrap.js:1087:19)
                                          at TLSSocket.g (events.js:286:16)
                                          at emitNone (events.js:91:20)
                                          at TLSSocket.emit (events.js:185:7)
                                          at endReadableNT (_stream_readable.js:926:12)
                                          at _combinedTickCallback (internal/process/next_tick.js:74:11)
                                          at process._tickDomainCallback (internal/process/next_tick.js:122:9) code: ‘ECONNRESET’ }

                                          1 Reply Last reply Reply Quote 0
                                          • L Offline
                                            lali
                                            last edited by lali

                                            I think i resolved the issue… It was related to my use of Pi-hole.
                                            I was using OpenDNS and according to logs in my router some connections were timed out or was unreachable. I changed it first to Google DNS and later to my ISPs DNS-severs. And, behold, no error in my pm2-logs (at least not at the moment) and the modules are up and running

                                            So, you were all on to something; @KirAsh4, @McSorley and @kckndrgn!

                                            1 Reply Last reply Reply Quote 1

                                            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