question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fresh install on alpine returns 500

See original GitHub issue

OS/Web Information

  • Web Browser: firefox 89.0.1 (64-bit)
  • Local OS: Alpine Linux v3.14
  • Remote OS: Alpine Linux v3.14 (same as local)
  • Remote Architecture: x64
  • code-server --version: 3.11.0 4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd

Steps to reproduce

  1. Fresh install code-server the npm way:
apk add npm alpine-sdk bash libstdc++ libc6-compat
npm config set python python3
npm install -g --unsafe-perm code-server
  1. Open localhost:8080 in a browser, on the same system
  2. Provide the password automatically generated in ~/.config/code-server/config.yaml

Expected

The browser is able to connect to and display vscode.

Actual

The error 500 VS Code failed to load. exited unexpectedly with code 0 is displayed on screen.

Logs

# code-server --log trace
[2021-08-01T00:37:46.835Z] trace child:16034 got message {"message":{"type":"handshake","args":{"_":[],"bind-addr":"127.0.0.1:8080","auth":"password","password":"2f5b20cead0a8f27ac2b84ad","config":"/root/.config/code-server/config.yaml","log":"trace","user-data-dir":"/root/.local/share/code-server","extensions-dir":"/root/.local/share/code-server/extensions","verbose":true,"host":"127.0.0.1","port":8080,"proxy-domain":[],"usingEnvPassword":false,"usingEnvHashedPassword":false}}}
[2021-08-01T00:37:46.838Z] info  code-server 3.11.0 4e8cd09ef0412dfc7b148b7639a692e20e4fd6dd
[2021-08-01T00:37:46.838Z] info  Using user-data-dir ~/.local/share/code-server
[2021-08-01T00:37:46.839Z] trace Using extensions-dir ~/.local/share/code-server/extensions
[2021-08-01T00:37:46.852Z] info  Using config file ~/.config/code-server/config.yaml
[2021-08-01T00:37:46.852Z] info  HTTP server listening on http://127.0.0.1:8080
[2021-08-01T00:37:46.852Z] info    - Authentication is enabled
[2021-08-01T00:37:46.852Z] info      - Using password from ~/.config/code-server/config.yaml
[2021-08-01T00:37:46.852Z] info    - Not serving HTTPS 
[2021-08-01T00:37:50.666Z] trace heartbeat
[2021-08-01T00:37:50.685Z] debug forking vs code...
[2021-08-01T00:37:51.025Z] error VS Code exited unexpectedly with code 0
[2021-08-01T00:37:51.876Z] debug forking vs code...
[2021-08-01T00:37:52.216Z] error VS Code exited unexpectedly with code 0

Screenshot

Notes

I don’t know if this is related, but the only user on my system is root (~ is /root).

What’s weird is, if I install code-server in a custom docker image using exactly the above script, I can actually start the server and connect to it without any issue (I encountered some issues when trying to use the c++ extension in a docker container, so I wanted to try a bare metal install).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
fee1-deadcommented, Sep 11, 2021

Okay so I tried again and it all worked. The key for me was to do everything on the root user, have both npm config and yarn config set, and I also took a peek at the libc6-compat package from alpine, the package sets a few symlinks and I have also done that (we don’t have that package for void).

I can now run the server with my non-root user, the terminal also works. Thank you for the information!

1reaction
code-ashercommented, Sep 10, 2021

I tried on Alpine and it worked. I followed https://github.com/cdr/code-server/blob/main/docs/npm.md#alpine but I had to additionally install python3 and I used yarn to set the config option instead of npm.

docker run --rm -it -p 8080:8080 alpine sh
ldd --version # Confirm musl
apk add alpine-sdk bash libstdc++ libc6-compat yarn python3
yarn config set python python3
yarn global add code-server
code-server --host 0.0.0.0 --auth none

From there I went to localhost:8080 in my browser and made sure the terminal worked (which it did).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting "500 Internal Server Error" on fresh install #123 - GitHub
Hello guys! I am trying to install kimai2 via docker-compose without any success. I alway get the "Oops! An Error Occurred - 500...
Read more >
radicale 2.1.8 (testing) - HttpException: 500 Internal Server Error
Hi, after installation, configuration and starting of radicale 2.1.8 I get this error when connecting to the server (from web cient): HttpException: 500...
Read more >
Fresh install boundary: server error 500 - HashiCorp Discuss
there was no problem to install boundary, i have install the docker with the container postgres and i launched the boundary dev command...
Read more >
Fresh install from docker: 500/503 error - Nextcloud community
I installed Nextcloud from Docker, but I got some problems. My docker-compose.yml file: version: '3' services: proxy: image: jwilder/nginx-proxy:alpine ...
Read more >
HTTP Error 500 Internal server for php pages and solution
You get “500 – Internal server error” error message when a user tries to access your Apache or Lighttpd based dynamic php application...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found