Did this behavior start before the update to v5.6.0?
In this update there were many changes about the system. It sounds like something is preventing your main services from starting. If you could run these commands, it would be helpful for us to reproduce the issue:
This will show us what version you were on previous to the update:
sudo ostree admin status
These will hopefully show what is causing the services to fail to start:
pocketnc@pocketnc:~$ cat ~/linuxcnc_*
Can not find -sec DISPLAY -var INTRO_GRAPHIC -num 1
Can not find -sec DISPLAY -var INTRO_TIME -num 1
rtapi_msgd command: /usr/libexec/machinekit/rtapi_msgd --instance=0 --rtmsglevel=1 --usrmsglevel=1 --debug=1 --halsize=524288
rtapi_app command: /usr/libexec/machinekit/rtapi_app --instance=0 --debug=1
3::1714:rt INFO: Picked default flavor 'rt-preempt' automatically
Waiting for component 'spindle_speed' to become ready........
Waiting for component 'hss_sensors' to become ready.....
Waiting for component 'hss_state' to become ready....................................
Waiting for component 'timekeeper' to become ready.........
Waiting for component 'inihal' to become ready...............................................................................................................................................................................................................................................................................................................................................................................................................
Terminated
1698
1874
Stopping realtime threads
Unloading hal components
RUN_IN_PLACE=yes
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/opt/source/pocketnc/emcapplication/bin
LINUXCNC_TCL_DIR=/opt/source/pocketnc/emcapplication/tcl
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/opt/source/pocketnc/emcapplication/src/objects
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/var/opt/pocketnc'
Machine configuration file is 'PocketNC.ini'
INIFILE=/var/opt/pocketnc/PocketNC.ini
VERSION=1.1
check_config: Unchecked: [KINS]KINEMATICS=xyzab-trt-kins
PARAMETER_FILE=pru-stepper.var
TASK=milltask -param_zmq_addr ipc:///tmp/pocketnc_params
HALUI=halui
DISPLAY=dummy.sh
COORDINATES=XYZAB
KINEMATICS=xyzab-trt-kins
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Found file(ABS): /opt/pocketnc/Settings/features/penta/penta.hal
Found file(ABS): /opt/pocketnc/Settings/features/bb_gpio/bb_gpio.hal
Found file(ABS): /opt/pocketnc/Settings/features/v2_limit_switches/v2_limit_switches.hal
Found file(ABS): /opt/pocketnc/Settings/features/v2_spindle_control/v2_spindle_control.hal
Found file(ABS): /opt/pocketnc/Settings/features/v2_motor_control/v2_motor_control.hal
Found file(ABS): /opt/pocketnc/Settings/features/high_speed_spindle/high_speed_spindle.hal
Found file(ABS): /opt/pocketnc/Settings/features/loop_back_estop/loop_back_estop.hal
Found file(ABS): /opt/pocketnc/Settings/features/loop_back_tool_change/loop_back_tool_change.hal
Found file(ABS): /opt/pocketnc/Settings/features/run_time_clock/run_time_clock.hal
Found file(ABS): /opt/pocketnc/Settings/features/timekeeper/timekeeper.hal
Found file(ABS): /opt/pocketnc/Settings/features/v2_delayed_enable/v2_delayed_enable.hal
Found file(ABS): /opt/pocketnc/Settings/features/v2_estop_button/v2_estop_button.hal
Found file(ABS): /opt/pocketnc/Settings/features/v2_feed_rate_calculation/v2_feed_rate_calculation.hal
Found file(ABS): /opt/pocketnc/Settings/features/v2_leds/v2_leds.hal
Found file(ABS): /opt/pocketnc/Settings/features/v2_start_button/v2_start_button.hal
Found file(ABS): /opt/pocketnc/Settings/features/v2_tool_setter/v2_tool_setter.hal
Found file(ABS): /opt/pocketnc/Settings/features/xyzab_kinematics/xyzab_kinematics.hal
Starting TASK program: milltask -param_zmq_addr ipc:///tmp/pocketnc_params
Starting DISPLAY program: dummy.sh
Started dummy display!
task: main loop took 0.166445 seconds
Shutting down and cleaning up LinuxCNC...
task: main loop took 0.128257 seconds
task: main loop took 0.108895 seconds
task: main loop took 0.129063 seconds
task: main loop took 0.137108 seconds
task: main loop took 0.119567 seconds
task: main loop took 0.121761 seconds
task: main loop took 0.138768 seconds
task: main loop took 0.120542 seconds
task: 51915 cycles, min=0.002899, max=0.138768, avg=0.012039, 9 latency excursions (> 10x expected cycle time of 0.010000s)
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
pocketnc@pocketnc:~$ tail -n 50 /var/log/hal.log
May 20 11:17:11 pocketnc msgd:0: hal_lib:1702:rt Joint 4 ==> Axis B
May 20 11:17:42 pocketnc msgd:0: hal_lib:1727:user halui: emcCommandSend: no echo from Task after 5.000 seconds
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc rtapi:0: unload: '' not loaded
May 20 11:20:01 pocketnc msgd:0: rtapi_app exit detected - scheduled shutdown
May 20 11:20:03 pocketnc msgd:0: msgd shutting down
May 21 12:32:25 pocketnc msgd:0: zeroconf: connecting - mDNS server not yet available (avahi-daemon not installed or not runnung?)
May 21 12:32:27 pocketnc msgd:0: hal_lib:1714:rt
May 21 12:32:27 pocketnc msgd:0: hal_lib:1714:rt xyzab-trt-kins coordinates=xyzab assigns:
May 21 12:32:27 pocketnc msgd:0: hal_lib:1714:rt Joint 0 ==> Axis X
May 21 12:32:27 pocketnc msgd:0: hal_lib:1714:rt Joint 1 ==> Axis Y
May 21 12:32:27 pocketnc msgd:0: hal_lib:1714:rt Joint 2 ==> Axis Z
May 21 12:32:27 pocketnc msgd:0: hal_lib:1714:rt Joint 3 ==> Axis A
May 21 12:32:27 pocketnc msgd:0: hal_lib:1714:rt Joint 4 ==> Axis B
May 21 12:32:55 pocketnc msgd:0: hal_lib:1729:user halui: emcCommandSend: no echo from Task after 5.000 seconds
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc rtapi:0: unload: '' not loaded
May 21 12:44:11 pocketnc msgd:0: rtapi_app exit detected - scheduled shutdown
May 21 12:44:13 pocketnc msgd:0: msgd shutting down
May 21 13:03:26 pocketnc msgd:0: hal_lib:1787:rt
May 21 13:03:26 pocketnc msgd:0: hal_lib:1787:rt xyzab-trt-kins coordinates=xyzab assigns:
May 21 13:03:26 pocketnc msgd:0: hal_lib:1787:rt Joint 0 ==> Axis X
May 21 13:03:26 pocketnc msgd:0: hal_lib:1787:rt Joint 1 ==> Axis Y
May 21 13:03:26 pocketnc msgd:0: hal_lib:1787:rt Joint 2 ==> Axis Z
May 21 13:03:26 pocketnc msgd:0: hal_lib:1787:rt Joint 3 ==> Axis A
May 21 13:03:26 pocketnc msgd:0: hal_lib:1787:rt Joint 4 ==> Axis B
May 21 13:03:38 pocketnc msgd:0: hal_lib:1854:user halg_link:264 HAL error: ASSERTION VIOLATED: '*data_ptr_addr != NULL'
May 21 13:04:02 pocketnc msgd:0: hal_lib:1804:user halui: emcCommandSend: no echo from Task after 5.000 seconds
One thing: Since the last time I installed new network switches (between web UI and machine). I’m not quite sure how the PocketNC behaves on the networking side i.e. is there more than one IP which needs to be connected to from the browser? Maybe my switch is blocking something…?
pocketnc@pocketnc:~$ tail -n 50 /var/log/linuxcnc_webserver.log
Traceback (most recent call last):
File "/opt/source/pocketnc/python/tornado/websocket.py", line 1092, in wrapper
await fut
tornado.iostream.StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/source/pocketnc/python/tornado/websocket.py", line 1094, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
2023-06-05 02:39:40,229Z pid:3109 module:base_events Task exception was never retrieved
future: <Task finished coro=<WebSocketProtocol13.write_message.<locals>.wrapper() done, defined at /opt/source/pocketnc/python/tornado/websocket.py:1090> exception=WebSocketClosedError()>
Traceback (most recent call last):
File "/opt/source/pocketnc/python/tornado/websocket.py", line 1092, in wrapper
await fut
tornado.iostream.StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/source/pocketnc/python/tornado/websocket.py", line 1094, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
2023-06-05 02:39:40,239Z pid:3109 module:base_events Task exception was never retrieved
future: <Task finished coro=<WebSocketProtocol13.write_message.<locals>.wrapper() done, defined at /opt/source/pocketnc/python/tornado/websocket.py:1090> exception=WebSocketClosedError()>
Traceback (most recent call last):
File "/opt/source/pocketnc/python/tornado/websocket.py", line 1092, in wrapper
await fut
tornado.iostream.StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/source/pocketnc/python/tornado/websocket.py", line 1094, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
2023-06-05 02:39:40,252Z pid:3109 module:base_events Task exception was never retrieved
future: <Task finished coro=<WebSocketProtocol13.write_message.<locals>.wrapper() done, defined at /opt/source/pocketnc/python/tornado/websocket.py:1090> exception=WebSocketClosedError()>
Traceback (most recent call last):
File "/opt/source/pocketnc/python/tornado/websocket.py", line 1092, in wrapper
await fut
tornado.iostream.StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/source/pocketnc/python/tornado/websocket.py", line 1094, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
Ok, it looks like everything is starting up ok, but seems like something is causing the connection between the UI and the web socket server to close. I think the easiest test would be to connect with a USB cable and make sure that still works before digging deeper into what’s going on with the network.
Could you attach the full /var/log/linuxcnc_webserver.log file? If you’re able to connect with the USB cable, you should be able to download it from the History tab. If not, you’ll have to copy it over SSH, or cat the file and copy the output from the terminal:
Alternatively, the web socket server does check a list of valid addresses that are allowed to connect. The default list is made up of all of the Pocket NC’s network interfaces. If you’re doing some kind of local DNS to remap your IP address, then you’ll need to explicitly add that address to the Pocket NC so it allows web socket connections from it. To do so, you can run the following command (be sure to replace the <your domain> with what you’ve remapped it as):