Read the statement by Michael Teeuw here.
Every few hours I get "ERROR:network_service_instance_impl.cc(916)] Network service crashed, restarting service"
-
Hi,
My second post here - I found MagicMirror2 [MM]and think it’s awsome, hence I am trying to get it up and running.I have installed it (manually as descriped on GH) on a PI3 and it works - well only for some (4-10’ish) hours, then MM it stops and I see this as the root cause:
[5932:0227/150019.172517:ERROR:network_service_instance_impl.cc(916)] Network service crashed, restarting service.
I consider my setup really plain vanilla - as all I have done is
- Install latest version (as of a few days ago)
- NOT added any modules (yet)
- Only configured the out-of-the-box modules (so they present relevant data)
Is this a normal/expected behavior?
Meaning that one needs to also make a watchdog script that keeps relauncing MM in case it aborts like this or…?Searching for this error I see a lot of electron related hits, but only one hit in MM forum (which appears to be related to an added module, thus a different case than mine)
I launch MM manually via SSH
cd MagicMirror npm run start 1 > logs/log-stdout.log 2 > logs/log-err.log &
STDOUT LOG:
> magicmirror@2.18.0 start > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js [27.02.2022 10:41.09.077] [LOG] Starting MagicMirror: v2.18.0 [27.02.2022 10:41.09.095] [LOG] Loading config ... [27.02.2022 10:41.09.106] [LOG] Loading module helpers ... [27.02.2022 10:41.09.110] [LOG] No helper found for module: alert. [27.02.2022 10:41.09.144] [LOG] Initializing new module helper ... [27.02.2022 10:41.09.146] [LOG] Module helper loaded: updatenotification [27.02.2022 10:41.09.148] [LOG] No helper found for module: clock. [27.02.2022 10:41.09.460] [LOG] Initializing new module helper ... [27.02.2022 10:41.09.463] [LOG] Module helper loaded: calendar [27.02.2022 10:41.09.465] [LOG] No helper found for module: compliments. [27.02.2022 10:41.09.467] [LOG] No helper found for module: weather. [27.02.2022 10:41.09.530] [LOG] Initializing new module helper ... [27.02.2022 10:41.09.531] [LOG] Module helper loaded: newsfeed [27.02.2022 10:41.09.532] [LOG] All module helpers loaded. [27.02.2022 10:41.09.734] [LOG] Starting server on port 8080 ... [27.02.2022 10:41.09.763] [LOG] Server started ... [27.02.2022 10:41.09.765] [LOG] Connecting socket for: updatenotification [27.02.2022 10:41.09.766] [LOG] Starting module helper: updatenotification [27.02.2022 10:41.09.767] [LOG] Connecting socket for: calendar [27.02.2022 10:41.09.769] [LOG] Starting node helper for: calendar [27.02.2022 10:41.09.770] [LOG] Connecting socket for: newsfeed [27.02.2022 10:41.09.772] [LOG] Starting node helper for: newsfeed [27.02.2022 10:41.09.772] [LOG] Sockets connected & modules started ... [27.02.2022 10:41.10.311] [LOG] Launching application. [27.02.2022 10:41.13.786] [LOG] Create new calendarfetcher for url: http://calendars.icloud.com/holidays/dk_da.ics - Interval: 300000 [27.02.2022 10:41.13.863] [LOG] Create new newsfetcher for url: https://www.dr.dk/nyheder/service/feeds/senestenyt - Interval: 300000 [27.02.2022 10:41.13.941] [INFO] Checking git for module: default [27.02.2022 10:41.14.335] [INFO] Newsfeed-Fetcher: Broadcasting 20 items. ... [27.02.2022 14:57.47.128] [INFO] Calendar-Fetcher: Broadcasting 10 events. [27.02.2022 15:00.19.100] [LOG] Shutting down server... [27.02.2022 15:00.19.128] [LOG] Stopping module helper: updatenotification [27.02.2022 15:00.19.130] [LOG] Stopping module helper: calendar [27.02.2022 15:00.19.132] [LOG] Stopping module helper: newsfeed
STDERR LOG:
[27.02.2022 10:41.09.749] [WARN] ^[[33mYou're using a full whitelist configuration to allow for all IPs^[[39m [5963:0227/104111.264996:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization [6009:0227/104111.601233:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process. [5932:0227/150019.172517:ERROR:network_service_instance_impl.cc(916)] Network service crashed, restarting service. [5932:0227/150019.198860:ERROR:zygote_communication_linux.cc(276)] Failed to send GetTerminationStatus message to zygote [5932:0227/150019.210928:ERROR:zygote_communication_linux.cc(276)] Failed to send GetTerminationStatus message to zygote
The version I am using:
pi@magicmirror:~/MagicMirror $ git log -1 commit a6cbc9f0ef46e4ba45e58e17f64f74410d8fe0b5 (HEAD -> master, tag: v2.18.0, origin/master, origin/HEAD) Merge: 222a5f37 be073daa Author: Michael Teeuw <michael@xonaymedia.nl> Date: Sat Jan 1 19:31:41 2022 +0100 Merge pull request #2761 from MichMich/develop release v2.18.0 pi@magicmirror:~/MagicMirror $ npm -v 8.3.1 pi@magicmirror:~/MagicMirror $ node -v v16.14.0 pi@magicmirror:~/MagicMirror $ ./node_modules/.bin/electron --version v16.0.5 pi@magicmirror:~/MagicMirror $
The config I’m using:
pi@magicmirror:~/MagicMirror $ npm run config:check > magicmirror@2.18.0 config:check > node js/check_config.js [28.02.2022 08:37.10.501] [INFO] Checking file... /home/pi/MagicMirror/config/config.js [28.02.2022 08:37.10.639] [INFO] Your configuration file doesn't contain syntax errors :)
pi@magicmirror:~/MagicMirror $ diff --suppress-common-lines config/config.js.sample config/config.js 11c11,12 < address: "localhost", // Address to listen on, can be: --- > //address: "localhost", // Address to listen on, can be: > address: "0.0.0.0", // Address to listen on, can be: 19c20,21 < ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses --- > //ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses > ipWhitelist: [], // Set [] to allow all IP addresses 29,30c31,34 < language: "en", < locale: "en-US", --- > //language: "en", > language: "da", > //locale: "en-US", > locale: "da-DK", 54c58 < header: "US Holidays", --- > header: "Helligdage", 60c64,65 < url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" --- > //url: "webcal://www.calendarlabs.com/ical-calendar/ics/43/denmark-holidays.ics" > url: "webcal://calendars.icloud.com/holidays/dk_da.ics" 75,77c80,82 < location: "New York", < locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city < apiKey: "YOUR_OPENWEATHER_API_KEY" --- > location: "Copenhagen", > locationID: "2618425", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city > apiKey: "REDACTED" 83c88 < header: "Weather Forecast", --- > header: "Vejret", 87,89c92,94 < location: "New York", < locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city < apiKey: "YOUR_OPENWEATHER_API_KEY" --- > location: "Copenhagen", > locationID: "2618425", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city > apiKey: "REDACTED" 98,99c103,104 < title: "New York Times", < url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml" --- > title: "Seneste nyt fra DR", > url: "https://www.dr.dk/nyheder/service/feeds/senestenyt"
-
I initially posted this in the wrong categori (Modules -> Troubleshooting)
So if it looks familiar that’s why (sorry for the confusion…) -
@tve the 1st two errors in the stderr log are shown as a bug in electron.
nothing we can do.
no idea on the rest.
which os image did u use?
lsb_release -a
I am using the legacy release on a pi3b and it has been running mm for 2 weeks now, uninterrupted.
-
@sdetweil Sorry - I forgot that (latest OS :-))
pi@magicmirror:~/MagicMirror/logs $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye pi@magicmirror:~/MagicMirror/logs $
I was not worried about the two first errors as they are always there (if they were serious I suspect that I would not have been able to launch MM at all)
The legacy release - what’s that (I should try that release and see if I can get the same positive results as you)
…googled…
It must be this you’re referring to?
https://www.tomshardware.com/news/raspberry-pi-releases-legacy-osI gotta try that OS tomorow and se if that’s better
-
-
@sdetweil
Test is now started on legacy PI OS - so by tomorrow I’ll know if I have a stable setup- Goal 1 = 4 h (my shortest runtime with bullseye)
- Goal 2 = 16 h (my longest runtime with bullseye)
- Goal 3 = 24 h (if I get here I can expect that it’ll continue for ever :-) )
-
Hmm - still unstable
After just 1,5 hours I get the same error
[1229:0301/105243.836236:ERROR:network_service_instance_impl.cc(916)] Network service crashed, restarting service.
Start test at 08:28 [01.03.2022 08:28.26.868] [LOG] Starting MagicMirror: v2.18.0 ... Problem kicks in at 10:52 [01.03.2022 10:52.43.788] [LOG] Shutting down server...
Could it really be problematic that I have configured both wlan as well as the eth interface??? (that would be hard to accept…)
Currently I am using eth, but prepared wlan as that’s what I’ll use when I “go to production”.
-
@tve well, address:“0.0.0.0”
means listen on ALL interfaces.
I use it on my pi w both enabled, but only Ethernet connected. ( and wifi not configured)
never has ‘crashed’
you could change to just the ethernet address
address:“192.168.?.?”
whatever that address is.
ifconfig
will show u
or
ip addr -
@sdetweil OK - good point, that’s worth trying
New test has started only listening on one IP :-) -
Hmm crashed after 6,5h with the same error…
NB.: My symptom is the same as being reported here (though I’m not using a docker container)
https://github.com/electron/electron/issues/31675Is there any way of increasing the verbosity in any logs to get more debugging info?
I’m now perforing a new test:
- Reverting to the default MM config
- And tcpdump’ing the network traffic so I can correlate and maybe identify what triggers the network service crash
If it no longer crashes I’ll revert to my own config and retest (as it then must be related to that specific network traffic [no matter how unfair that seems]