Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon will not stay running #666

Closed
holdestmade opened this issue Jun 28, 2023 · 23 comments · Fixed by #669
Closed

Addon will not stay running #666

holdestmade opened this issue Jun 28, 2023 · 23 comments · Fixed by #669

Comments

@holdestmade
Copy link

holdestmade commented Jun 28, 2023

Problem/Motivation

When trying to access the webui, I get a popup stating Add-on is not running. Please start it first
When I check the add-on it is indeed stopped. Clicking on start seems to make it start (green dot, webui button appears) but clicking on web ui gets the pop up again and the add-on is stopped

I have tried restarting and reinstalling

Logs seem to indicate its running

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Studio Code Server
 Fully featured Visual Studio Code (VSCode) experience integrated in the Home Assistant frontend.
-----------------------------------------------------------
 Add-on version: 5.8.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.2  (aarch64 / odroid-n2)
 Home Assistant Core: 2023.6.2
 Home Assistant Supervisor: 2023.06.4
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[09:03:33] INFO: Configuring timezone (Europe/London)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-user: starting
s6-rc: info: service init-mysql: starting
s6-rc: info: service init-mosquitto: starting
s6-rc: info: service init-code-server: starting
s6-rc: info: service init-code-server successfully started
s6-rc: info: service init-mysql successfully started
s6-rc: info: service init-user successfully started
s6-rc: info: service code-server: starting
s6-rc: info: service code-server successfully started
[09:03:34] INFO: Starting code-server...
s6-rc: info: service init-mosquitto successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[2023-06-28T08:03:36.202Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2023-06-28T08:03:37.161Z] info  code-server 4.14.1 5c199629305a0b935b4388b7db549f77eae82b5a
[2023-06-28T08:03:37.163Z] info  Using user-data-dir /data/vscode
[2023-06-28T08:03:37.206Z] info  Using config file ~/.config/code-server/config.yaml
[2023-06-28T08:03:37.206Z] info  HTTP server listening on http://0.0.0.0:1337/
[2023-06-28T08:03:37.207Z] info    - Authentication is disabled
[2023-06-28T08:03:37.207Z] info    - Not serving HTTPS
[2023-06-28T08:03:37.207Z] info  Session server listening on /data/vscode/code-server-ipc.sock
[09:05:08] 
[09:05:08] Extension host agent started.
File not found: /usr/local/lib/code-server/lib/vscode/out/vsda_bg.wasm
File not found: /usr/local/lib/code-server/lib/vscode/out/vsda.js
[09:05:09] [172.30.32.2][76debc08][ManagementConnection] New connection established.
[09:05:09] Using the in-memory credential store as the operating system's credential store could not be accessed. Please see https://aka.ms/vscode-server-keyring on how to set this up. Details: Cannot find module '../build/Release/keytar.node'
Require stack:
- /usr/local/lib/code-server/lib/vscode/node_modules/keytar/lib/keytar.js
- /usr/local/lib/code-server/lib/vscode/out/bootstrap-amd.js
- /usr/local/lib/code-server/out/node/util.js
- /usr/local/lib/code-server/out/node/cli.js
- /usr/local/lib/code-server/out/node/entry.js
[09:05:10] [172.30.32.2][7a6876b6][ExtensionHostConnection] New connection established.
[09:05:12] [172.30.32.2][7a6876b6][ExtensionHostConnection] <568> Launched Extension Host Process.
[09:05:20] [172.30.32.2][76debc08][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[09:05:20] [172.30.32.2][7a6876b6][ExtensionHostConnection] <568> Extension Host Process exited with code: 0, signal: null.
File not found: /usr/local/lib/code-server/lib/vscode/out/vsda_bg.wasm
File not found: /usr/local/lib/code-server/lib/vscode/out/vsda.js
[09:05:49] [172.30.32.2][fe0b8dd8][ManagementConnection] New connection established.
[09:05:50] [172.30.32.2][015b725d][ExtensionHostConnection] New connection established.
[09:05:50] [172.30.32.2][015b725d][ExtensionHostConnection] <652> Launched Extension Host Process.
[09:06:19] [172.30.32.2][fe0b8dd8][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[09:06:19] [172.30.32.2][015b725d][ExtensionHostConnection] <652> Extension Host Process exited with code: 0, signal: null.
File not found: /usr/local/lib/code-server/lib/vscode/out/vsda_bg.wasm
File not found: /usr/local/lib/code-server/lib/vscode/out/vsda.js
[09:06:21] [172.30.32.2][e13b5298][ManagementConnection] New connection established.
[09:06:22] [172.30.32.2][8a09b850][ExtensionHostConnection] New connection established.
[09:06:22] [172.30.32.2][8a09b850][ExtensionHostConnection] <814> Launched Extension Host Process.
[09:06:34] [172.30.32.2][e13b5298][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[09:06:34] [172.30.32.2][8a09b850][ExtensionHostConnection] <814> Extension Host Process exited with code: 0, signal: null.
File not found: /usr/local/lib/code-server/lib/vscode/out/vsda_bg.wasm
File not found: /usr/local/lib/code-server/lib/vscode/out/vsda.js
[09:06:36] [172.30.32.2][23eba89e][ManagementConnection] New connection established.
[09:06:36] [172.30.32.2][99d32f03][ExtensionHostConnection] New connection established.
[09:06:36] [172.30.32.2][99d32f03][ExtensionHostConnection] <922> Launched Extension Host Process.

Expected behavior

VSCode accessible when clicking on webui button (or the sidebar button)

Actual behavior

As above

Steps to reproduce

Click on webui button (or the sidebar button)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

@jweston2112
Copy link

I too am having this issue after upgrading Supervisor to 2023.06.4
the Supervisor Log States:

23-06-28 04:14:37 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Studio Code Server is unhealthy, restarting...
23-06-28 04:14:37 INFO (SyncWorker_0) [supervisor.docker.interface] Stopping addon_a0d7b954_vscode application
23-06-28 04:14:41 INFO (SyncWorker_0) [supervisor.docker.interface] Cleaning addon_a0d7b954_vscode application
23-06-28 04:14:42 INFO (SyncWorker_3) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/vscode/aarch64 with version 5.8.0

@holdestmade
Copy link
Author

Good spot, in my Supervisor logs:

23-06-28 08:47:56 WARNING (MainThread) [supervisor.addons.addon] a0d7b954_vscode is already running!
23-06-28 08:47:57 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
23-06-28 08:48:06 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Studio Code Server is unhealthy, restarting...
23-06-28 08:48:06 INFO (SyncWorker_8) [supervisor.docker.interface] Stopping addon_a0d7b954_vscode application
23-06-28 08:48:11 INFO (SyncWorker_8) [supervisor.docker.interface] Cleaning addon_a0d7b954_vscode application
23-06-28 08:48:11 INFO (SyncWorker_9) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/vscode/aarch64 with version 5.8.0
23-06-28 08:48:16 WARNING (MainThread) [supervisor.addons.addon] a0d7b954_vscode is already running!
23-06-28 08:49:42 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Studio Code Server is unhealthy, restarting...
23-06-28 08:49:42 INFO (SyncWorker_2) [supervisor.docker.interface] Stopping addon_a0d7b954_vscode application
23-06-28 08:49:47 INFO (SyncWorker_2) [supervisor.docker.interface] Cleaning addon_a0d7b954_vscode application

23-06-28 08:51:18 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-222543' coro=<Addon.watchdog_container() done, defined at /usr/src/supervisor/supervisor/addons/addon.py:1042> exception=AddonsJobError('Rate limit exceeded, more then 10 calls in 0:30:00')>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/addons/addon.py", line 1056, in watchdog_container
    await self._restart_after_problem(self, event.state)
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 144, in wrapper
    raise on_condition(
supervisor.exceptions.AddonsJobError: Rate limit exceeded, more then 10 calls in 0:30:00

@jweston2112
Copy link

jweston2112 commented Jun 28, 2023

I did

ha su repair

in the SSH Advance Terminal Add-on and my VS Studio Add-on started Working .... but I have not restarted Supervisor Yet

--- Oops Spoke too soon... looping again... 😦
probably related to this change in Supervisor (in 2023.06.4)

home-assistant/supervisor#4409

Update:

I believe what is happening is the container is reporting unhealthy and Watch dog is restarting it over and over till it has done it 10 times in < 30 minutes... and at some point after that the last start finally starts up and works... just my observations

@jverlaan
Copy link

jverlaan commented Jun 29, 2023

I can confirm that the add-on is constantly stopped running—all on the latest versions and after upgrade to the latest version from the previous version.

`s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

Add-on: Studio Code Server
Fully featured Visual Studio Code (VSCode) experience integrated in the Home Assistant frontend.

Add-on version: 5.8.0
You are running the latest version of this add-on.
System: Home Assistant OS 10.3 (amd64 / generic-x86-64)
Home Assistant Core: 2023.6.3
Home Assistant Supervisor: 2023.06.4

s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[10:44:44] INFO: Configuring timezone (Europe/Amsterdam)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-user: starting
s6-rc: info: service init-mysql: starting
s6-rc: info: service init-mosquitto: starting
s6-rc: info: service init-code-server: starting
s6-rc: info: service init-code-server successfully started
s6-rc: info: service init-mosquitto successfully started
s6-rc: info: service init-user successfully started
s6-rc: info: service code-server: starting
s6-rc: info: service code-server successfully started
[10:44:46] INFO: Starting code-server...
s6-rc: info: service init-mysql successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[2023-06-29T08:44:47.838Z] info Wrote default config file to ~/.config/code-server/config.yaml
[2023-06-29T08:44:49.382Z] info code-server 4.14.1 5c199629305a0b935b4388b7db549f77eae82b5a
[2023-06-29T08:44:49.385Z] info Using user-data-dir /data/vscode
[2023-06-29T08:44:49.442Z] info Using config file ~/.config/code-server/config.yaml
[2023-06-29T08:44:49.443Z] info HTTP server listening on http://0.0.0.0:1337/
[2023-06-29T08:44:49.443Z] info - Authentication is disabled
[2023-06-29T08:44:49.443Z] info - Not serving HTTPS
[2023-06-29T08:44:49.444Z] info Session server listening on /data/vscode/code-server-ipc.sock`

@wilfredktlr
Copy link

I have the same problem. The workaround I used (for now) is to disable the watchdog.

@jprasm
Copy link

jprasm commented Jun 29, 2023

I can't even get the addon to start!

@charlas
Copy link

charlas commented Jun 29, 2023

Same issue here, disable the watchdog and hey presto, starts. Very odd

@jprasm
Copy link

jprasm commented Jun 29, 2023

it has started working again (no intervention by me) which makes it all the more strange.

@florinr08
Copy link

I'm having the same issue and, as others have pointed out, the workaround for now is to disable the watchdog for this addon.

@SergeyPomelov
Copy link

SergeyPomelov commented Jun 29, 2023

It seems I have an alike issue.
Useful addon, thanks. Feel free to send me any instruction to debug that.

Screenshot 2023-06-29 211944
Screenshot 2023-06-29 212029
Screenshot 2023-06-29 212101
Screenshot 2023-06-29 212544

@SergeyPomelov
Copy link

SergeyPomelov commented Jun 29, 2023

Same issue here, disable the watchdog and hey presto, starts. Very odd

Nothing odd, watchdog isn't only watching, it also can bite.
If it thinks that you were never a good boy...

Thanks for the fast fix, btw, so accastomed to this addon that I have only it or notepad for my instance.

@andreamag00
Copy link

Same issue here with the following hardware and software:

Hardware
Raspberry Pi 4 (rpi4-64)

Home Assistant
Home Assistant 2023.6.3
Supervisor 2023.06.4
Operating System 10.3
Frontend 20230608.0 - latest

Visual Studio Code
Version 5.8.0

@thargy
Copy link

thargy commented Jun 29, 2023

Have a look on the forum, someone has posted a fix, not tested it yet though

community.home-assistant.io/t/no-external-internet-access/586792/7?u=holdestmade

Can you explain why you think the above link is related to this issue?

@holdestmade
Copy link
Author

Sorry wrong thread issue

@RonnieDilli
Copy link

It seems I have an alike issue. Useful addon, thanks. Feel free to send me any instruction to debug that.

Screenshot 2023-06-29 211944 Screenshot 2023-06-29 212029 Screenshot 2023-06-29 212101 Screenshot 2023-06-29 212544

Exactly the same errors and behavior.
And WatchDog disabled for this AddOn does keep it running too.

@pnm1977
Copy link

pnm1977 commented Jun 30, 2023

Same issue with my version. Issue only started this morning and haven't done any updates since yesterday. I tried a restart first but the add-on would not start for more than a few seconds. After reading this thread I disabled the Watchdog and was able to keep the Addon running.

@thomasmaxson
Copy link

Experiencing the same issue this morning, after a restart.

@shehzman
Copy link

Same issue here

@MoellerCH
Copy link

Same here. Hope there is a fix soon.

@stephenhouser
Copy link

Same. Disabling watchdog allowed it to start.

@sinclairpaul
Copy link
Member

Please don't post "me too" or "same", at the moment you can disable the watchdog functionality to resolve the issue until a new release.

@twister36
Copy link

Looks like I have the same issue. However, I didn't just upgrade... I was in the middle of using it when it crashed. I couldn't get it to load again, so I rebooted HA and now it will not start. Disabling the WatchDog does not resolve my problem.

Logs show no error.

@bcutter
Copy link

bcutter commented Jul 2, 2023

After several unsuccesful starting attempts (right before it was working fine and been in use), now disabling watchdog then presented with:

grafik

Really wild stuff going on with this addon 😅

Is someone actually investigating and working on a fix already?

@github-actions github-actions bot locked and limited conversation to collaborators Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.