Read the statement by Michael Teeuw here.
Error performing TLS handshake: An unexpected TLS packet was received
-
@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
-
-
its stuck cause the script didn’t find xorg running
pgrep Xorg returned ‘’
edit the run-start.sh script and change line
if [ "$serveronly." == "true." -o "$xorg." == "." ]; then
to
if [ "$serveronly." == "true." -a "$xorg." == "." ]; then
-
@sdetweil are u running in text mode on the pi 0? no… cause u expect browser to open
can u post output of
ps -efthx
-
@sdetweil Stopping the magic mirror process before running bash -x run-start.sh just hangs on the line “Ready to go…” and never goes further.
grep -i serveronly: config/config.js does in fact return nothing.
I edited the line, stopped the MagicMirror process, and re-ran run-start.sh. It now gives this output
$ bash -x run-start.sh + ./untrack-css.sh + '[' -z '' ']' + export DISPLAY=:0 + DISPLAY=:0 ++ uname -m + arch=armv6l ++ awk '{print tolower($2)}' ++ grep -i serveronly: config/config.js ++ tr -d ',"'\''' + serveronly= + serveronly=false ++ pgrep Xorg + xorg= ++ uname + mac=Linux + '[' false. '!=' false. -o armv6l == armv6l ']' + '[' false. == true. -a . == . ']' + exec + read line ++ node serveronly + case "$line" in + echo 0 '[LOG]' Starting MagicMirror: v2.10.0-develop 0 [LOG] Starting MagicMirror: v2.10.0-develop + read line + case "$line" in + echo 0 '[LOG]' Loading config ... 0 [LOG] Loading config ... + read line + case "$line" in + echo 0 '[LOG]' Loading module helpers ... 0 [LOG] Loading module helpers ... + read line + case "$line" in + echo 0 '[LOG]' No helper found for module: alert. 0 [LOG] No helper found for module: alert. + read line + case "$line" in + echo 0 '[LOG]' No helper found for module: clock. 0 [LOG] No helper found for module: clock. + read line + case "$line" in + echo 0 '[LOG]' Initializing new module helper ... 0 [LOG] Initializing new module helper ... + read line + case "$line" in + echo 0 '[LOG]' Module helper loaded: calendar 0 [LOG] Module helper loaded: calendar + read line + case "$line" in + echo 0 '[LOG]' Initializing new module helper ... 0 [LOG] Initializing new module helper ... + read line + case "$line" in + echo 0 '[LOG]' Module helper loaded: MMM-Weather-Now 0 [LOG] Module helper loaded: MMM-Weather-Now + read line + case "$line" in + echo 0 '[LOG]' Initializing new module helper ... 0 [LOG] Initializing new module helper ... + read line + case "$line" in + echo 0 '[LOG]' Module helper loaded: MMM-3Day-Forecast 0 [LOG] Module helper loaded: MMM-3Day-Forecast + read line + case "$line" in + echo 0 '[LOG]' Initializing new module helper ... 0 [LOG] Initializing new module helper ... + read line + case "$line" in + echo 0 '[LOG]' Module helper loaded: MMM-MoonPhase 0 [LOG] Module helper loaded: MMM-MoonPhase + read line + case "$line" in + echo 0 '[LOG]' Initializing new module helper ... 0 [LOG] Initializing new module helper ... + read line + case "$line" in + echo 0 '[LOG]' Module helper loaded: MMM-MyScoreboard 0 [LOG] Module helper loaded: MMM-MyScoreboard + read line + case "$line" in + echo 0 '[LOG]' All module helpers loaded. 0 [LOG] All module helpers loaded. + read line + case "$line" in + echo 0 '[LOG]' Starting server on port 8080 ... 0 [LOG] Starting server on port 8080 ... + read line + case "$line" in + echo 0 '[INFO]' 'You'\''re' using a full whitelist configuration to allow for all IPs 0 [INFO] You're using a full whitelist configuration to allow for all IPs + read line + case "$line" in + echo 0 '[LOG]' Server started ... 0 [LOG] Server started ... + read line + case "$line" in + echo 0 '[LOG]' Connecting socket for: calendar 0 [LOG] Connecting socket for: calendar + read line + case "$line" in + echo 0 '[LOG]' Starting node helper for: calendar 0 [LOG] Starting node helper for: calendar + read line + case "$line" in + echo 0 '[LOG]' Connecting socket for: MMM-Weather-Now 0 [LOG] Connecting socket for: MMM-Weather-Now + read line + case "$line" in + echo 0 '[LOG]' MMM-Weather-Now helper, started... 0 [LOG] MMM-Weather-Now helper, started... + read line + case "$line" in + echo 0 '[LOG]' Connecting socket for: MMM-3Day-Forecast 0 [LOG] Connecting socket for: MMM-3Day-Forecast + read line + case "$line" in + echo 0 '[LOG]' MMM-3Day-Forecast helper, started... 0 [LOG] MMM-3Day-Forecast helper, started... + read line + case "$line" in + echo 0 '[LOG]' Connecting socket for: MMM-MoonPhase 0 [LOG] Connecting socket for: MMM-MoonPhase + read line + case "$line" in + echo 0 '[LOG]' Starting module helper: MMM-MoonPhase 0 [LOG] Starting module helper: MMM-MoonPhase + read line + case "$line" in + echo 0 '[LOG]' Connecting socket for: MMM-MyScoreboard 0 [LOG] Connecting socket for: MMM-MyScoreboard + read line + case "$line" in + echo 0 '[LOG]' Starting node_helper for module '[MMM-MyScoreboard]' 0 [LOG] Starting node_helper for module [MMM-MyScoreboard] + read line + case "$line" in + echo 0 '[LOG]' Sockets connected '&' modules started ... 0 [LOG] Sockets connected & modules started ... + read line + case "$line" in + echo 0 '[LOG]' 0 [LOG] + read line + case "$line" in + echo Ready to 'go!' Please point your browser to: http://0.0.0.0:8080 Ready to go! Please point your browser to: http://0.0.0.0:8080 + break + exec ++ echo Ready to 'go!' Please point your browser to: http://0.0.0.0:8080 ++ awk -F: '{print $4}' + port=8080 + echo 'Starting chromium browser now, have patience, it takes a minute' Starting chromium browser now, have patience, it takes a minute + chromium-browser -noerrdialogs -kiosk -start_maximized --disable-infobars --app=http://localhost:8080 --ignore-certificate-errors-spki-list --ignore-ssl-errors --ignore-certificate-errors + exit
however it doesn’t actually open the chromium browser.
ps -ef returns
ps -ef UID PID PPID C STIME TTY TIME CMD root 1 0 0 Dec16 ? 00:00:05 /sbin/init splash root 2 0 0 Dec16 ? 00:00:00 [kthreadd] root 3 2 0 Dec16 ? 00:00:00 [ksoftirqd/0] root 5 2 0 Dec16 ? 00:00:00 [kworker/0:0H] root 7 2 0 Dec16 ? 00:00:00 [lru-add-drain] root 8 2 0 Dec16 ? 00:00:00 [kdevtmpfs] root 9 2 0 Dec16 ? 00:00:00 [netns] root 10 2 0 Dec16 ? 00:00:00 [khungtaskd] root 11 2 0 Dec16 ? 00:00:00 [oom_reaper] root 12 2 0 Dec16 ? 00:00:00 [writeback] root 13 2 0 Dec16 ? 00:00:00 [kcompactd0] root 14 2 0 Dec16 ? 00:00:00 [crypto] root 15 2 0 Dec16 ? 00:00:00 [bioset] root 16 2 0 Dec16 ? 00:00:00 [kblockd] root 17 2 0 Dec16 ? 00:00:00 [watchdogd] root 19 2 0 Dec16 ? 00:00:00 [rpciod] root 20 2 0 Dec16 ? 00:00:00 [xprtiod] root 21 2 0 Dec16 ? 00:00:00 [kswapd0] root 22 2 0 Dec16 ? 00:00:00 [nfsiod] root 32 2 0 Dec16 ? 00:00:00 [kthrotld] root 33 2 0 Dec16 ? 00:00:00 [bioset] root 34 2 0 Dec16 ? 00:00:00 [bioset] root 35 2 0 Dec16 ? 00:00:00 [bioset] root 36 2 0 Dec16 ? 00:00:00 [bioset] root 37 2 0 Dec16 ? 00:00:00 [bioset] root 38 2 0 Dec16 ? 00:00:00 [bioset] root 39 2 0 Dec16 ? 00:00:00 [bioset] root 40 2 0 Dec16 ? 00:00:00 [bioset] root 41 2 0 Dec16 ? 00:00:00 [bioset] root 42 2 0 Dec16 ? 00:00:00 [bioset] root 43 2 0 Dec16 ? 00:00:00 [bioset] root 44 2 0 Dec16 ? 00:00:00 [bioset] root 45 2 0 Dec16 ? 00:00:00 [bioset] root 46 2 0 Dec16 ? 00:00:00 [bioset] root 47 2 0 Dec16 ? 00:00:00 [bioset] root 48 2 0 Dec16 ? 00:00:00 [bioset] root 49 2 0 Dec16 ? 00:00:00 [bioset] root 50 2 0 Dec16 ? 00:00:00 [bioset] root 51 2 0 Dec16 ? 00:00:00 [bioset] root 52 2 0 Dec16 ? 00:00:00 [bioset] root 53 2 0 Dec16 ? 00:00:00 [bioset] root 54 2 0 Dec16 ? 00:00:00 [bioset] root 55 2 0 Dec16 ? 00:00:00 [bioset] root 56 2 0 Dec16 ? 00:00:00 [bioset] root 57 2 0 Dec16 ? 00:00:00 [iscsi_eh] root 58 2 0 Dec16 ? 00:00:00 [dwc_otg] root 59 2 0 Dec16 ? 00:00:00 [DWC Notificatio] root 60 2 0 Dec16 ? 00:00:00 [VCHIQ-0] root 61 2 0 Dec16 ? 00:00:00 [VCHIQr-0] root 62 2 0 Dec16 ? 00:00:00 [VCHIQs-0] root 63 2 0 Dec16 ? 00:00:00 [VCHIQka-0] root 64 2 0 Dec16 ? 00:00:00 [SMIO] root 65 2 0 Dec16 ? 00:00:00 [kworker/0:2] root 66 2 0 Dec16 ? 00:00:00 [irq/86-mmc1] root 68 2 0 Dec16 ? 00:00:00 [bioset] root 69 2 0 Dec16 ? 00:00:02 [mmcqd/0] root 70 2 0 Dec16 ? 00:00:00 [jbd2/mmcblk0p2-] root 71 2 0 Dec16 ? 00:00:00 [ext4-rsv-conver] root 72 2 0 Dec16 ? 00:00:00 [ipv6_addrconf] root 89 2 0 Dec16 ? 00:00:00 [kworker/u2:1] root 105 2 0 Dec16 ? 00:00:00 [kworker/u2:2] root 118 1 0 Dec16 ? 00:00:01 /lib/systemd/systemd-journald root 120 1 0 Dec16 ? 00:00:00 /lib/systemd/systemd-udevd root 187 2 0 Dec16 ? 00:00:00 [cfg80211] root 191 2 0 Dec16 ? 00:00:00 [brcmf_wq/mmc1:0] root 192 2 0 Dec16 ? 00:00:00 [brcmf_wdog/mmc1] root 273 2 0 Dec16 ? 00:00:00 [kworker/0:1H] root 356 1 0 Dec16 ? 00:00:00 /usr/sbin/ModemManager avahi 357 1 0 Dec16 ? 00:00:01 avahi-daemon: running [raspberrypi.local] root 367 1 0 Dec16 ? 00:00:00 /usr/sbin/rsyslogd -n avahi 368 357 0 Dec16 ? 00:00:00 avahi-daemon: chroot helper root 370 1 0 Dec16 ? 00:00:00 /usr/sbin/cron -f message+ 375 1 0 Dec16 ? 00:00:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation root 382 1 0 Dec16 ? 00:00:00 /sbin/dhcpcd -q -b root 410 1 0 Dec16 ? 00:00:00 /lib/systemd/systemd-logind root 441 1 0 Dec16 ? 00:00:00 /usr/lib/policykit-1/polkitd --no-debug root 442 1 0 Dec16 ? 00:00:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf root 495 1 0 Dec16 ? 00:00:00 /usr/sbin/sshd -D root 525 2 0 Dec16 ? 00:00:00 [kworker/u3:0] root 526 2 0 Dec16 ? 00:00:00 [hci0] root 527 2 0 Dec16 ? 00:00:00 [hci0] root 528 1 0 Dec16 ? 00:00:00 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow - b8:27:eb:b2:57:5c root 530 2 0 Dec16 ? 00:00:00 [kworker/u3:2] nobody 536 1 0 Dec16 ? 00:00:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/inpu root 550 1 0 Dec16 ? 00:00:00 /usr/lib/bluetooth/bluetoothd ntp 577 1 0 Dec16 ? 00:00:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:111 xrdp 583 1 0 Dec16 ? 00:00:00 /usr/sbin/xrdp root 586 1 0 Dec16 ? 00:00:00 /usr/sbin/xrdp-sesman root 607 1 0 Dec16 tty1 00:00:00 /bin/login -f pi 651 1 0 Dec16 ? 00:00:00 /lib/systemd/systemd --user pi 666 651 0 Dec16 ? 00:00:00 (sd-pam) pi 694 607 0 Dec16 tty1 00:00:01 -bash pi 735 1 2 Dec16 ? 00:00:24 PM2 v4.2.1: God Daemon (/home/pi/.pm2) root 792 495 0 Dec16 ? 00:00:00 sshd: pi [priv] pi 798 792 0 Dec16 ? 00:00:00 sshd: pi@pts/0 pi 800 798 0 Dec16 pts/0 00:00:01 -bash root 905 2 0 Dec16 ? 00:00:00 [kworker/0:0] root 922 2 0 Dec16 ? 00:00:00 [kworker/0:1] root 923 2 0 00:00 ? 00:00:00 [kworker/u2:0] pi 957 1 0 00:01 pts/0 00:00:00 bash -x run-start.sh pi 958 957 19 00:01 pts/0 00:00:16 node serveronly pi 995 800 0 00:03 pts/0 00:00:00 ps -ef
I am running these commands from SSH, and I have the Pi configured to boot to Console Autologin (Boot Options -> B1 Desktop/CLI -> B2 Console Autologin).
-
@Keudn what desktop are u running?
mine shows
root 481 1 0 Dec01 ? 00:00:00 /usr/sbin/lightdm ntp 490 1 0 Dec01 ? 00:03:51 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:111 root 517 1 0 Dec01 tty1 00:00:00 /bin/login -f root 538 481 1 Dec01 tty7 04:07:42 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lig root 589 2 0 Dec01 ? 00:00:00 [kworker/u3:0]
chromium won’t open over ssh
-
@Keudn said in Error performing TLS handshake: An unexpected TLS packet was received:
boot to Console
ah… thats why no Xorg…
then it can’t start a browser as browser requires graphical mode
it must run serveronly text mode and access from a remote system…so the script was correct, pi 0 running in console (text) mode.