Read the statement by Michael Teeuw here.
Error performing TLS handshake: An unexpected TLS packet was received
-
@Keudn do a
pm2 status
Command. Check the paths and commandsMy setup starts chrome for the browser on pi 0.
For the config, run
npm check:config
From the MagicMirror folder.
If that is ok
Then do npm start to see any node_helper errors -
@sdetweil pm2 status gives me two ids, MagicMirror and mmstart. I’m assuming MagicMirror is the one your script creates. When I try and run pm2 stop I just get “Process not found” error and can’t actually disable it.
Running npm check:config doesn’t seem to be a valid command as it gives me a usage list and asks if I meant “config”.
Doing npm start gives this output
$ npm start > magicmirror@2.10.0-develop start /home/pi/MagicMirror > ./run-start.sh 0 [LOG] Starting MagicMirror: v2.10.0-develop 0 [LOG] Loading config ... [21:27:45.455] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:87 * { ^ SyntaxError: Unexpected token * at Module._compile (internal/modules/cjs/loader.js:721:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at loadConfig (/home/pi/MagicMirror/js/app.js:67:12) at App.start (/home/pi/MagicMirror/js/app.js:208:3) at Object.<anonymous> (/home/pi/MagicMirror/serveronly/index.js:2:5) [21:27:45.484] [LOG] Loading module helpers ... [21:27:45.825] [LOG] Initializing new module helper ... [21:27:45.836] [LOG] Module helper loaded: updatenotification [21:27:45.853] [LOG] No helper found for module: helloworld. 0 [LOG] All module helpers loaded. [21:27:45.871] [LOG] Starting server on port 8080 ... 0 [LOG] Server started ... 0 [LOG] Connecting socket for: updatenotification 0 [LOG] Sockets connected & modules started ... 0 [LOG] Ready to go! Please point your browser to: http://localhost:8080 Starting chromium browser now, have patience, it takes a minute [21:27:46.284] [ERROR] { Error: listen EADDRINUSE: address already in use 127.0.0.1:8080 at Server.setupListenHandle [as _listen2] (net.js:1279:14) at listenInCluster (net.js:1327:12) at GetAddrInfoReqWrap.doListen [as callback] (net.js:1460:7) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:61:10) code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '127.0.0.1', port: 8080 } Created new window in existing browser session.
-
@Keudn pm2 stop 0 or 1 ( or use there name)
pm2 delete 0 or 1Edit the config and fix line 86 with that *
-
@sdetweil Got the mmstart process deleted, but now the mirror hangs at the booting up screen with the command line on the top. I can access it correctly from a browser on another computer, so it looks like it just isn’t opening a web browser locally on the Pi.
-
@Keudn the new run-start.sh script is waiting for the server process to say its ready
then it starts the browseru should be able to test it
~/MagicMirror bash -x run-start.sh
starts mm in serveronly mode (on pi 0)
loops reading console output, waiting for the message
“point\ your\ browser”
then launches chromium-browserbut if that message doesn’t come… it will be hung…
so, try
~/MagicMirror node serveronly
should look like this (with your module list)
~/MagicMirror$ node serveronly [23:31:31.854] [LOG] Starting MagicMirror: v2.10.0-develop [23:31:31.865] [LOG] Loading config ... [23:31:31.871] [LOG] Loading module helpers ... [23:31:31.874] [LOG] No helper found for module: alert. [23:31:31.925] [LOG] Initializing new module helper ... [23:31:31.925] [LOG] Module helper loaded: updatenotification [23:31:31.927] [LOG] No helper found for module: clock. [23:31:31.928] [LOG] No helper found for module: currentweather. [23:31:31.929] [LOG] No helper found for module: weatherforecast. [23:31:32.508] [LOG] Initializing new module helper ... [23:31:32.509] [LOG] Module helper loaded: newsfeed [23:31:32.759] [LOG] Initializing new module helper ... [23:31:32.760] [LOG] Module helper loaded: MMM-CalendarExt2 [23:31:32.771] [LOG] handler helper in init [23:31:32.772] [LOG] Module helper loaded: ImageService [23:31:34.273] [LOG] scheduler helper in init [23:31:34.273] [LOG] Module helper loaded: ImageScheduler [23:31:34.274] [LOG] All module helpers loaded. [23:31:34.275] [LOG] Starting server on port 8080 ... [23:31:34.281] [INFO] You're using a full whitelist configuration to allow for all IPs [23:31:34.288] [LOG] Server started ... [23:31:34.289] [LOG] Connecting socket for: updatenotification [23:31:34.290] [LOG] Connecting socket for: newsfeed [23:31:34.290] [LOG] Starting module: newsfeed [23:31:34.291] [LOG] Connecting socket for: MMM-CalendarExt2 [23:31:34.291] [LOG] Connecting socket for: ImageService [23:31:34.292] [LOG] handler helper in start [23:31:34.292] [LOG] Connecting socket for: ImageScheduler [23:31:34.293] [LOG] scheduler helper in start [23:31:34.293] [LOG] Sockets connected & modules started ... [23:31:34.293] [LOG] Ready to go! Please point your browser to: http://localhost:8080
-
@sdetweil Both commands get it to “Ready to go! Please point your browser…”, but it is immediately followed by
~/MagicMirror $ node serveronly [23:41:39.439] [LOG] Starting MagicMirror: v2.10.0-develop [23:41:39.530] [LOG] Loading config ... [23:41:39.604] [LOG] Loading module helpers ... [23:41:39.617] [LOG] No helper found for module: alert. [23:41:39.624] [LOG] No helper found for module: clock. [23:41:42.789] [LOG] Initializing new module helper ... [23:41:42.795] [LOG] Module helper loaded: calendar [23:41:45.193] [LOG] Initializing new module helper ... [23:41:45.198] [LOG] Module helper loaded: MMM-Weather-Now [23:41:45.224] [LOG] Initializing new module helper ... [23:41:45.236] [LOG] Module helper loaded: MMM-3Day-Forecast [23:41:45.247] [LOG] Initializing new module helper ... [23:41:45.254] [LOG] Module helper loaded: MMM-MoonPhase [23:41:45.269] [LOG] Initializing new module helper ... [23:41:45.274] [LOG] Module helper loaded: MMM-MyScoreboard [23:41:45.279] [LOG] All module helpers loaded. [23:41:45.289] [LOG] Starting server on port 8080 ... [23:41:45.338] [INFO] You're using a full whitelist configuration to allow for all IPs [23:41:45.394] [LOG] Server started ... [23:41:45.401] [LOG] Connecting socket for: calendar [23:41:45.407] [LOG] Starting node helper for: calendar [23:41:45.412] [LOG] Connecting socket for: MMM-Weather-Now [23:41:45.418] [LOG] MMM-Weather-Now helper, started... [23:41:45.424] [LOG] Connecting socket for: MMM-3Day-Forecast [23:41:45.429] [LOG] MMM-3Day-Forecast helper, started... [23:41:45.434] [LOG] Connecting socket for: MMM-MoonPhase [23:41:45.438] [LOG] Starting module helper: MMM-MoonPhase [23:41:45.443] [LOG] Connecting socket for: MMM-MyScoreboard [23:41:45.448] [LOG] Starting node_helper for module [MMM-MyScoreboard] [23:41:50.375] [LOG] Sockets connected & modules started ... [23:41:50.381] [LOG] Ready to go! Please point your browser to: http://0.0.0.0:8080 [23:41:50.456] [LOG] Whoops! There was an uncaught exception... [23:41:50.462] [ERROR] { Error: listen EADDRINUSE: address already in use 0.0.0.0:8080 at Server.setupListenHandle [as _listen2] (net.js:1279:14) at listenInCluster (net.js:1327:12) at doListen (net.js:1460:7) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:832:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '0.0.0.0', port: 8080 } [23:41:50.528] [LOG] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [23:41:50.533] [LOG] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
I’m not sure why there would be the address already in use unless it already started correctly. In that case why would the browser not open?
-
@Keudn because the pm2 instance is running…
-
@sdetweil Yeah, I just don’t understand why running “bash -x run-start.sh” would give the exact same output as “node serveronly” and not open the browser once it sees it is ready. The run-start.sh script doesn’t get to the #start chromium section.
When I run “bash -x run-start.sh” this is the output I get
$ bash -x run-start.sh + ./untrack-css.sh + '[' -z '' ']' + export DISPLAY=:0 + DISPLAY=:0 ++ uname -m + arch=armv6l ++ awk '{print tolower($2)}' ++ tr -d ',"'\''' ++ grep -i serveronly: config/config.js + serveronly= + serveronly=false ++ pgrep Xorg + xorg= ++ uname + mac=Linux + '[' false. '!=' false. -o armv6l == armv6l ']' + '[' false. == true. -o . == . ']' + node serveronly [23:50:08.974] [LOG] Starting MagicMirror: v2.10.0-develop [23:50:09.097] [LOG] Loading config ... [23:50:09.217] [LOG] Loading module helpers ... [23:50:09.236] [LOG] No helper found for module: alert. [23:50:09.245] [LOG] No helper found for module: clock. [23:50:13.447] [LOG] Initializing new module helper ... [23:50:13.458] [LOG] Module helper loaded: calendar [23:50:16.551] [LOG] Initializing new module helper ... [23:50:16.568] [LOG] Module helper loaded: MMM-Weather-Now [23:50:16.610] [LOG] Initializing new module helper ... [23:50:16.649] [LOG] Module helper loaded: MMM-3Day-Forecast [23:50:16.685] [LOG] Initializing new module helper ... [23:50:16.694] [LOG] Module helper loaded: MMM-MoonPhase [23:50:16.725] [LOG] Initializing new module helper ... [23:50:16.734] [LOG] Module helper loaded: MMM-MyScoreboard [23:50:16.740] [LOG] All module helpers loaded. [23:50:16.754] [LOG] Starting server on port 8080 ... [23:50:16.822] [INFO] You're using a full whitelist configuration to allow for all IPs [23:50:16.899] [LOG] Server started ... [23:50:16.910] [LOG] Connecting socket for: calendar [23:50:16.918] [LOG] Starting node helper for: calendar [23:50:16.924] [LOG] Connecting socket for: MMM-Weather-Now [23:50:16.932] [LOG] MMM-Weather-Now helper, started... [23:50:16.937] [LOG] Connecting socket for: MMM-3Day-Forecast [23:50:16.944] [LOG] MMM-3Day-Forecast helper, started... [23:50:16.951] [LOG] Connecting socket for: MMM-MoonPhase [23:50:16.956] [LOG] Starting module helper: MMM-MoonPhase [23:50:16.965] [LOG] Connecting socket for: MMM-MyScoreboard [23:50:16.970] [LOG] Starting node_helper for module [MMM-MyScoreboard] [23:50:23.495] [LOG] Sockets connected & modules started ... [23:50:23.506] [LOG] Ready to go! Please point your browser to: http://0.0.0.0:8080 [23:50:23.607] [LOG] Whoops! There was an uncaught exception... [23:50:23.615] [ERROR] { Error: listen EADDRINUSE: address already in use 0.0.0.0:8080 at Server.setupListenHandle [as _listen2] (net.js:1279:14) at listenInCluster (net.js:1327:12) at doListen (net.js:1460:7) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:832:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '0.0.0.0', port: 8080 } [23:50:23.702] [LOG] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [23:50:23.706] [LOG] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
-
@Keudn right, but the run failed, cause of the address in use problem… need to stop the other instance to test…
pm2 stop MagicMirror
-