#Studio Code Server gets 502 error

1 messages ยท Page 1 of 1 (latest)

frigid flume
#

Hey people! I've been running Studio Code Server for a long time. But suddenly it stopped working. It wont start up. It gives me a 502 Gateway error. When i look at the logs i see the following:

s6-rc: fatal: unable to take locks: No such file or directory
s6-linux-init-shutdownd: warning: /run/s6/basedir/scripts/rc.shutdown exited 111
s6-rc-compile: fatal: invalid /package/admin/s6-overlay-3.2.0.2/etc/s6-rc/sources/base-addon-banner/type: must be oneshot, longrun, or bundle
s6-rc: fatal: unable to take locks: No such file or directory
s6-linux-init-shutdownd: warning: /run/s6/basedir/scripts/rc.shutdown exited 111
s6-rc-compile: fatal: invalid /package/admin/s6-overlay-3.2.0.2/etc/s6-rc/sources/base-addon-banner/type: must be oneshot, longrun, or bundle
s6-rc: fatal: unable to take locks: No such file or directory
.....
And even more

can anyone help me fix this?

unreal jungle
#

I'd recommend you re-install the addon and/or restore a backup of it. You should also share all the logs from the start and version information.
On what hardware are you running this? What kind of storage?

frigid flume
unreal jungle
#

Is the external HDD connected via a powered USB HUB? I'm asking because a setup without that is prone to corruption. I'm not convinced that's what going on here, but still.
I'd try uninstalling the addon, then running this in the terminal

ha supervisor repair
ha host reboot

Then try the steps again. You can also try to increase the log level in the addon options. I'd also like to see your core, OS and addon versions.

frigid flume
#

btw it didn't repair anything when i ran the command

unreal jungle
#

It does things in the background.

frigid flume
#

Ahh okay - but it basically instantly said it was done

unreal jungle
#

It's kind of a trigger to start things. Sometimes it takes a while to actually stat. I'm not sure why.

frigid flume
#

It didn't seem to fix my issue with Studio Code. Is it because I'm a bit behind on updates on Core and OS?

unreal jungle
#

I don't think so.

unreal jungle
#

Can you do me a favor? Please install the Advanced SSH addon and disable its protection mode. Restart it, then run this in/with it

docker exec addon_a0d7b954_vscode cat /package/admin/s6-overlay-3.2.0.2/etc/s6-rc/sources/base-addon-banner/type; echo

I want to see what the file it complains about contains.

frigid flume
#

nvm im stupid... i had the other terminal addon running at the same time

#

It doesn't output anything

unreal jungle
#

I run both on different ports so I have three SSH servers on 22 (Advanced), 2222 (Core) and 22222 (OS/Developer) depending on what I need ๐Ÿ˜„

frigid flume
unreal jungle
#

Okay so it's empty.
Just for comparison how it should look like

# docker exec addon_a0d7b954_vscode cat /package/admin/s6-overlay-3.2.0.2/etc/s6-rc/sources/base-addon-banner/type; echo
oneshot

Please try this then restart the addon

docker exec addon_a0d7b954_vscode sh -c "echo -n 'oneshot' > /package/admin/s6-overlay-3.2.0.2/etc/s6-rc/sources/base-addon-banner/type"

This is hacky stuff and unlikely to fix anything. It's more out of curiosity.

frigid flume
#

oneshot```

now i get this too
frigid flume
unreal jungle
#

No, just restart the addon.

#

Is this the only addon having issues?

frigid flume
frigid flume
unreal jungle
#

:<

frigid flume
#

The addon also takes a while to start up. not sure if it is related

unreal jungle
#

Are you up for a re-flash and backup restore?

frigid flume
#

If that's the only solution left ๐Ÿ˜… I think it's gonna take me a while to do

unreal jungle
#

What I would do is to check the host and supervisor logs for things that stick out and try to redownload the addon base docker image but that might be hard.
I can't think of anything else at the moment and there's no guarantee either of these things will result in anything useful. Or in other words it's likely a waste of time.

frigid flume
#

That does sound a bit hard for me to do ^^

#

I guess I can try to reflash. Is there anything specific i should be careful of? Just so i dont carry over the error to the new flashed HAOS

unreal jungle
#

Just make sure to reboot after restoration. Supervisor can get "out of sync" otherwise.

frigid flume
#

Just to be clear - I uninstall vscode now. Make a backup and save on my PC. Then i reflash my RPI with a fresh HAOS image and then i upload the backup. Is that correct? :)

unreal jungle
#

Yep. No need to uninstall the addon though. You can just do partial restores/backups.

#

Also note that you should have backups already in other places than the pi's local storage. If the disk dies it's gone too.

frigid flume
#

All right, I will try this tomorrow as I have more time to do it there (its 4:20 am in EU)

frigid flume
frigid flume
unreal jungle
#

Yep. That was one of my initial suggestions.

#

My current guess is that the base addon is corrupted somehow in which case this won't help but it doesn't cost anything to try.

frigid flume
#

What version would you think? I have 5.17.3 - 5.17.2 - 5.17.1 - 5.16.2 - 5.16.0 - 5.15.0

unreal jungle
#

I'd start with the oldest.

frigid flume
#

So 5.15.0?

unreal jungle
#

Oh. Perhaps not. That is from 2023 ๐Ÿ˜„
5.17.3 is from Nov 7, 2024. That should be old enough.

frigid flume
#

I saw i couldn't even press start on 5.15.0 ๐Ÿ˜…
I'm going to try 5.17.3 now

unreal jungle
#

Like I said, restores usually require a reboot.

frigid flume
#

Oh yea, right - my bad ๐Ÿ˜…

unreal jungle
#

I'm not quite sure why this isn't fixed or at least mentioned in the UI.

frigid flume
#

WAIT

#

IT WORKS

#

How on earth does it work to restore to 5.17.3

unreal jungle
#

I wonder if it still works when the addon is upgraded.

frigid flume
#

I guess i could try, since I could just restore it again if it doesn't ๐Ÿ˜…

#

It doesn't look like it works. There are still some problems with s6-rc, and it can't even start. It instantly shutsdown again

unreal jungle
#

And the restored version does not have this issue?

frigid flume
unreal jungle
#

I checked issues for code server and the base addon earlier but I couldn't find any recent issues about this nor any releases.

frigid flume
unreal jungle
#

Strange. I guess you can stay on the restored version and let me know if upgrading to the next release works when it's released.