giaever-online-iot / zwave-js-ui

Fully configurable Z-wave JS Control Panel and Z-Wave to MQTT Gateway
MIT License
10 stars 1 forks source link

Upgrade fails with ENOENT: no such file or directory, mkdir '/tmp/xfs-e5c9517e' #2

Closed bwarden closed 1 year ago

bwarden commented 1 year ago

I caught another occurrence of this issue that I alluded to in #1. Logs:

Feb 28 00:00:00 snafu zwave-js-ui.zwave-js-ui[191180]: Logging to file:
Feb 28 00:00:00 snafu zwave-js-ui.zwave-js-ui[191180]:         /var/snap/zwave-js-ui/125/logs/zwavejs/zwavejs_2023-02-28.log
Feb 28 04:57:51 snafu systemd[1]: Stopping Service for snap application zwave-js-ui.zwave-js-ui...
Feb 28 04:57:53 snafu zwave-js-ui.zwave-js-ui[191180]: 2023-02-28 04:57:53.865 INFO Z-WAVE-SERVER: Client disconnected
Feb 28 04:57:54 snafu zwave-js-ui.zwave-js-ui[191180]: 2023-02-28 04:57:54.641 INFO Z-WAVE-SERVER: Server closed
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: State 'stop-sigterm' timed out. Killing.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191077 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191169 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191170 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191171 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191172 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191173 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191174 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191175 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191176 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191177 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Killing process 191178 (node) with signal SIGKILL.
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=killed, status=9/KILL
Feb 28 04:58:21 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'timeout'.
Feb 28 04:58:21 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:01:56 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:02:29 snafu zwave-js-ui.zwave-js-ui[2994894]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-18e98167'
Feb 28 05:02:29 snafu zwave-js-ui.zwave-js-ui[2994894]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-18e98167'
Feb 28 05:02:29 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 05:02:29 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 05:02:29 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 1.
Feb 28 05:02:29 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:02:29 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:02:34 snafu zwave-js-ui.zwave-js-ui[2995151]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-755944b7'
Feb 28 05:02:34 snafu zwave-js-ui.zwave-js-ui[2995151]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-755944b7'
Feb 28 05:02:34 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 05:02:34 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 05:02:34 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 2.
Feb 28 05:02:34 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:02:34 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:02:37 snafu zwave-js-ui.zwave-js-ui[2995265]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-08dbd52d'
Feb 28 05:02:37 snafu zwave-js-ui.zwave-js-ui[2995265]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-08dbd52d'
Feb 28 05:02:37 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 05:02:37 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 05:02:38 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 3.
Feb 28 05:02:38 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:02:38 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:02:39 snafu zwave-js-ui.zwave-js-ui[2995364]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-cbb5581f'
Feb 28 05:02:39 snafu zwave-js-ui.zwave-js-ui[2995364]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-cbb5581f'
Feb 28 05:02:39 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 05:02:39 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 05:02:40 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 4.
Feb 28 05:02:40 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:02:40 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:02:49 snafu zwave-js-ui.zwave-js-ui[2995466]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-d0738902'
Feb 28 05:02:49 snafu zwave-js-ui.zwave-js-ui[2995466]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-d0738902'
Feb 28 05:02:49 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 05:02:49 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 05:02:49 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 5.
Feb 28 05:02:49 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:02:49 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:03:11 snafu zwave-js-ui.zwave-js-ui[2995593]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-3a26b993'
Feb 28 05:03:11 snafu zwave-js-ui.zwave-js-ui[2995593]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-3a26b993'
Feb 28 05:03:11 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 05:03:11 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 05:03:11 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 6.
Feb 28 05:03:11 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:03:11 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 05:03:13 snafu zwave-js-ui.zwave-js-ui[2995745]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-e5c9517e'
Feb 28 05:03:13 snafu zwave-js-ui.zwave-js-ui[2995745]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-e5c9517e'

It continues like this until systemd disabled the service due to frequent restarts, of course.

This was on stable, but even refreshing to edge, it continued to fail.

bwarden commented 1 year ago

I see a new version number as stable, so refreshing again, I caught an additional message from yarn in the logs:

$ sudo snap refresh zwave-js-ui

Handling re-refresh of "zwave-js-ui" as needed                                                                                                                                                                                                                                -Feb 28 08:26:31 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Handling re-refresh of "zwave-js-ui" as needed                                                                                                                                                                                                                                -Feb 28 08:26:34 snafu zwave-js-ui.zwave-js-ui[3030075]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-5342c688'
Feb 28 08:26:34 snafu zwave-js-ui.zwave-js-ui[3030075]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-5342c688'
Feb 28 08:26:34 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 08:26:34 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 08:26:34 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 1.
Feb 28 08:26:34 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 08:26:34 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
error: cannot perform the following tasks:
- Setup snap "zwave-js-ui" (131) security profiles (cannot update mount namespace of snap "zwave-js-ui": cannot update preserved namespace of snap "zwave-js-ui": cannot update snap namespace: remove /usr/local/share/.yarn: no such file or directory)
Feb 28 08:26:36 snafu zwave-js-ui.zwave-js-ui[3030273]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-e9495692'
Feb 28 08:26:36 snafu zwave-js-ui.zwave-js-ui[3030273]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-e9495692'
Feb 28 08:26:36 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 08:26:36 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 08:26:36 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 2.
Feb 28 08:26:36 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 08:26:36 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 08:26:37 snafu zwave-js-ui.zwave-js-ui[3030372]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-c16db2cd'
Feb 28 08:26:37 snafu zwave-js-ui.zwave-js-ui[3030372]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-c16db2cd'
Feb 28 08:26:37 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 08:26:37 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 08:26:37 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 3.
Feb 28 08:26:37 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 08:26:37 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 08:26:38 snafu zwave-js-ui.zwave-js-ui[3030473]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-430d6429'
Feb 28 08:26:38 snafu zwave-js-ui.zwave-js-ui[3030473]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-430d6429'
Feb 28 08:26:38 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 08:26:38 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 08:26:38 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 4.
Feb 28 08:26:38 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 08:26:38 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 08:26:39 snafu zwave-js-ui.zwave-js-ui[3030578]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-2c92c9b5'
Feb 28 08:26:39 snafu zwave-js-ui.zwave-js-ui[3030578]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-2c92c9b5'
Feb 28 08:26:39 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 08:26:39 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 08:26:39 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 5.
Feb 28 08:26:39 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 08:26:39 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 08:26:41 snafu zwave-js-ui.zwave-js-ui[3030678]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-8a3e6ed9'
Feb 28 08:26:41 snafu zwave-js-ui.zwave-js-ui[3030678]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-8a3e6ed9'
Feb 28 08:26:41 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 08:26:41 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 08:26:41 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 6.
Feb 28 08:26:41 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Feb 28 08:26:41 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Start request repeated too quickly.
Feb 28 08:26:41 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Feb 28 08:26:41 snafu systemd[1]: Failed to start Service for snap application zwave-js-ui.zwave-js-ui.
jmgiaever commented 1 year ago

Hi,

This sounds like an issue with snapd, and not the snap package of zwave-js-ui. Have you tried to shutdown (not just a restart) of your system.

bwarden commented 1 year ago

Normal restart didn't help -- what are you expecting would be different about a power-down?

Additional logs from the restart:

-- The job identifier is 176.
Feb 28 10:45:17 snafu zwave-js-ui.zwave-js-ui[1722]: sanity timeout expired: Interrupted system call
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[1820]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[1576]: snap-update-ns failed with code 1
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2034]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2074]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2010]: snap-update-ns failed with code 1
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2167]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2053]: snap-update-ns failed with code 1
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2084]: snap-update-ns failed with code 1
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2239]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2293]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2217]: snap-update-ns failed with code 1
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2251]: snap-update-ns failed with code 1
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2333]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2307]: snap-update-ns failed with code 1
Feb 28 10:45:21 snafu zwave-js-ui.zwave-js-ui[2362]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 10:44:36 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
bwarden commented 1 year ago

Still broken after full shutdown/power-on.

Feb 28 11:35:08 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
-- Subject: A start job for unit snap.zwave-js-ui.zwave-js-ui.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit snap.zwave-js-ui.zwave-js-ui.service has finished successfully.
--
-- The job identifier is 1326.
Feb 28 11:36:39 snafu zwave-js-ui.zwave-js-ui[2337]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 11:36:39 snafu zwave-js-ui.zwave-js-ui[2314]: snap-update-ns failed with code 1
Feb 28 11:36:39 snafu zwave-js-ui.zwave-js-ui[2368]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 11:36:39 snafu zwave-js-ui.zwave-js-ui[2347]: snap-update-ns failed with code 1
Feb 28 11:36:39 snafu zwave-js-ui.zwave-js-ui[2408]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 11:36:39 snafu zwave-js-ui.zwave-js-ui[2375]: snap-update-ns failed with code 1
Feb 28 11:36:39 snafu zwave-js-ui.zwave-js-ui[2441]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 11:36:39 snafu zwave-js-ui.zwave-js-ui[2475]: cannot update snap namespace: cannot create directory "/snap/zwave-js-ui/131": permission denied
Feb 28 11:36:39 snafu zwave-js-ui.zwave-js-ui[2414]: snap-update-ns failed with code 1
Feb 28 11:36:40 snafu zwave-js-ui.zwave-js-ui[2448]: snap-update-ns failed with code 1
Feb 28 11:36:18 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit snap.zwave-js-ui.zwave-js-ui.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Feb 28 11:36:18 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit snap.zwave-js-ui.zwave-js-ui.service has entered the 'failed' state with result 'exit-code'.
Feb 28 11:36:18 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 3.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit snap.zwave-js-ui.zwave-js-ui.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Feb 28 11:36:18 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
-- Subject: A stop job for unit snap.zwave-js-ui.zwave-js-ui.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit snap.zwave-js-ui.zwave-js-ui.service has finished.
--
-- The job identifier is 1417 and the job result is done.
Feb 28 11:36:18 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
-- Subject: A start job for unit snap.zwave-js-ui.zwave-js-ui.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit snap.zwave-js-ui.zwave-js-ui.service has finished successfully.
--
-- The job identifier is 1417.
Feb 28 11:36:19 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
jmgiaever commented 1 year ago

Everything here is outside of the «scope» of the snap package, such as creating revision directories (e.g in /snap/..., /var/snap...) etc is not handled by the snap itself. That is part of snapd. Seems like you have a permission issue in your OS.

I suggest that you check with the Snapcraft forum for help.

what are you expecting would be different about a power-down?

It might have helped with the tmp-issue; which isn't handled by the snap package either. You can read here about how that works.

bwarden commented 1 year ago

For what it's worth, I haven't seen this issue again since I updated the affected system from Ubuntu 20.04 LTS to 22.04 LTS.

bwarden commented 1 year ago

It happened again, but I was able to see that apparmor was causing the problem. These steps resolved it, for the sake of anyone who stumbles on this by searching:

sudo apt reinstall --purge apparmor
sudo apt reinstall --purge snapd

Must have been some cruft left over from the 20.04 to 22.04 upgrade.

jmgiaever commented 1 year ago

Hi, Thanks for sharing. These issues is, as said before, typically a snapd (not this package, but the environment) issue.

Great to have this as a reference :)

bwarden commented 1 year ago

Failing again after latest/edge v18.4.1 was released (aka snap 159):

$ sudo snap refresh --edge zwave-js-ui
Handling re-refresh of "zwave-js-ui" as needed                                                                                                                                                                                                                                |
Apr 19 14:36:34 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
error: cannot perform the following tasks:
- Setup snap "zwave-js-ui" (159) security profiles (cannot update mount namespace of snap "zwave-js-ui": cannot update preserved namespace of snap "zwave-js-ui": cannot update snap namespace: remove /usr/local/share/.yarn: no such file or directory)
Apr 19 14:36:36 snafu zwave-js-ui.zwave-js-ui[2692062]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-6cd1099a'
Apr 19 14:36:36 snafu zwave-js-ui.zwave-js-ui[2692062]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-6cd1099a'
Apr 19 14:36:36 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Apr 19 14:36:36 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Apr 19 14:36:36 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.619s CPU time.
Apr 19 14:36:36 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 1.
Apr 19 14:36:36 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:36 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.619s CPU time.
Apr 19 14:36:36 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:37 snafu zwave-js-ui.zwave-js-ui[2692206]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-448435c0'
Apr 19 14:36:37 snafu zwave-js-ui.zwave-js-ui[2692206]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-448435c0'
Apr 19 14:36:37 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Apr 19 14:36:37 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Apr 19 14:36:37 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.350s CPU time.
Apr 19 14:36:38 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 2.
Apr 19 14:36:38 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:38 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.350s CPU time.
Apr 19 14:36:38 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:39 snafu zwave-js-ui.zwave-js-ui[2692301]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-c8567c5f'
Apr 19 14:36:39 snafu zwave-js-ui.zwave-js-ui[2692301]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-c8567c5f'
Apr 19 14:36:39 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Apr 19 14:36:39 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Apr 19 14:36:39 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.358s CPU time.
Apr 19 14:36:39 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 3.
Apr 19 14:36:39 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:39 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.358s CPU time.
Apr 19 14:36:39 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:40 snafu zwave-js-ui.zwave-js-ui[2692401]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-806710c6'
Apr 19 14:36:40 snafu zwave-js-ui.zwave-js-ui[2692401]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-806710c6'
Apr 19 14:36:40 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Apr 19 14:36:40 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Apr 19 14:36:40 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.364s CPU time.
Apr 19 14:36:41 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 4.
Apr 19 14:36:41 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:41 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.364s CPU time.
Apr 19 14:36:41 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:42 snafu zwave-js-ui.zwave-js-ui[2692495]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-8cc9f558'
Apr 19 14:36:42 snafu zwave-js-ui.zwave-js-ui[2692495]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-8cc9f558'
Apr 19 14:36:42 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Apr 19 14:36:42 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Apr 19 14:36:42 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.359s CPU time.
Apr 19 14:36:42 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 5.
Apr 19 14:36:42 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:42 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.359s CPU time.
Apr 19 14:36:42 snafu systemd[1]: Started Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:43 snafu zwave-js-ui.zwave-js-ui[2692591]: Internal Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-0f6a055e'
Apr 19 14:36:43 snafu zwave-js-ui.zwave-js-ui[2692591]: Error: ENOENT: no such file or directory, mkdir '/tmp/xfs-0f6a055e'
Apr 19 14:36:43 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
Apr 19 14:36:43 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Apr 19 14:36:43 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.310s CPU time.
Apr 19 14:36:43 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Scheduled restart job, restart counter is at 6.
Apr 19 14:36:43 snafu systemd[1]: Stopped Service for snap application zwave-js-ui.zwave-js-ui.
Apr 19 14:36:43 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Consumed 1.310s CPU time.
Apr 19 14:36:43 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Start request repeated too quickly.
Apr 19 14:36:43 snafu systemd[1]: snap.zwave-js-ui.zwave-js-ui.service: Failed with result 'exit-code'.
Apr 19 14:36:43 snafu systemd[1]: Failed to start Service for snap application zwave-js-ui.zwave-js-ui.

I tried purging/reinstalling snapd and apparmor again, but that didn't help. Next up is a reboot, I guess.

bwarden commented 1 year ago

Lots and lots of pain between apparmor and snap. Maybe this will be useful to anyone else stumbling upon this. I could see in dmesg that apparmor was causing issues:

[ 2538.058787] audit: type=1400 audit(1681946326.362:240): apparmor="DENIED" operation="open" profile="snap-update-ns.zwave-js-ui" name="/snap/zwave-js-ui/159/" pid=24714 comm="5" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

The config for apparmor for that profile is /var/lib/snapd/apparmor/profiles/snap-update-ns.zwave-js-ui. I couldn't see anything obviously wrong with it, but profiles in that directory appear to be generated dynamically by snap, not installed from a package. So, I ended up doing this (how-to-reinstall-a-snap-package):

$ sudo snap remove zwave-js-ui
$ snap saved   ## make a note of the snapshot ID where the config has been saved
$ sudo snap install zwave-js-ui
$ sudo snap restore 7  ## '7' was the ID from `snap saved` above
$ sudo snap start zwave-js-ui
bwarden commented 1 year ago

Another place to check that was clashing with apparmor -- in /var/snap/zwave-js-ui/current/settings.json, I found:

"deviceConfigPriorityDir":"/var/snap/zwave-js-ui/162/config"

I changed it to /var/snap/zwave-js-ui/current/config via the UI, but you could edit the file directly while zwave-js-ui isn't running.

This was causing these apparmor events found in dmesg:

[1559185.112968] audit: type=1400 audit(1689786522.546:1064): apparmor="DENIED" operation="mkdir" profile="snap.zwave-js-ui.zwave-js-ui" name="/var/snap/zwave-js-ui/162/" pid=3753546 comm="node" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
[1559188.305998] audit: type=1400 audit(1689786525.738:1065): apparmor="DENIED" operation="mkdir" profile="snap.zwave-js-ui.zwave-js-ui" name="/var/snap/zwave-js-ui/162/config/" pid=3753669 comm="node" requested_mask="c" denied_mask="c" fsuid=0 ouid=0