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

[BUG] Container refuses connection on defined port and log shows "error --cert-key requires a value" #186

Closed
1 task done
awits opened this issue Sep 7, 2024 · 4 comments

Comments

@awits
Copy link

awits commented Sep 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Setting up LSIO's code-server under a Docker jail on TrueNAS Scale, via Dockge.

It downloads, sets itself up fine but is inaccessible (ERR_CONNECTION_REFUSED) when putting in the Docker host IP and defined port eg. 192.168.23.100:8443

The log in Dockge shows it configuring and downloading the mods I've defined, then constantly prints this:

error --cert-key requires a value

As I read the documentation, and other versions of code-server, it does not use HTTPS by default so why is it insisting on the --cert-key parameter? I know this is a parameter for the base code-server package. It seems to assume --cert was applied?

From the LSIO documentation though (and checking Coder.com as well) there is not a Docker parameter (eg. CERT_PATH) to pass this into the container anyway.

compose.yaml is copied below (with sensitive details changed/removed)

How do I get past this? Thanks for any help.

Expected Behavior

code-server would be accessible on the Docker host IP with defined port (eg. 8080 per this example) and it would not be asking for a signing key unless it was expecting to be run over HTTPS, in which case there should be documented options to pass in certificates or force HTTP.

Steps To Reproduce

Run a Docker host with Dockge.
Use compose.yaml as above (with changes as needed - I have tried without HASHED_PASSWORD and PROXY_DOMAIN as well)
Monitor Dockge log and try to access IP on the published port

Environment

- OS: TrueNAS Scale jail
- How docker service was installed: Installed in the jail per well known guide on TrueNAS forums

CPU architecture

x86-64

Docker creation

version: "3.8"
services:
  code-server:
    image: lscr.io/linuxserver/code-server:latest
    container_name: code-server
    environment:
      #      - PUID=1000
      #      - PGID=1000
      - TZ=Europe/London
      - HASHED_PASSWORD=[removed]
      - PROXY_DOMAIN=coe.example.om
      - DOCKER_MODS=linuxserver/mods:universal-docker|linuxserver/mods:code-server-dotnet|linuxserver/mods:code-server-flutter|linuxserver/mods:code-server-php|linuxserver/mods:code-server-powershell|linuxserver/mods:code-server-python3|linuxserver/mods:code-server-ssl
    volumes:
      - /mnt/data/vscode/config:/config
      - /var/run/docker.sock:/var/run/docker.sock:ro # to access other Docker containers
    ports:
      - 8080:8080
    restart: unless-stopped
networks: {}

Container logs

[mod-init] Adding linuxserver/mods:code-server-ssl to container
code-server  | [mod-init] linuxserver/mods:code-server-ssl at sha256:8f3e8384930aedc833a9c2aa99830ee0e574717ce36a93be60843add4838f6aa has been previously applied skipping
code-server  | [migrations] started
code-server  | [migrations] no migrations found
code-server  | usermod: no changes
code-server  | ───────────────────────────────────────
code-server  | 
code-server  |       ██╗     ███████╗██╗ ██████╗
code-server  |       ██║     ██╔════╝██║██╔═══██╗
code-server  |       ██║     ███████╗██║██║   ██║
code-server  |       ██║     ╚════██║██║██║   ██║
code-server  |       ███████╗███████║██║╚██████╔╝
code-server  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
code-server  | 
code-server  |    Brought to you by linuxserver.io
code-server  | ───────────────────────────────────────
code-server  | 
code-server  | To support LSIO projects visit:
code-server  | https://www.linuxserver.io/donate/
code-server  | 
code-server  | ───────────────────────────────────────
code-server  | GID/UID
code-server  | ───────────────────────────────────────
code-server  | 
code-server  | User UID:    911
code-server  | User GID:    911
code-server  | ───────────────────────────────────────
code-server  | Linuxserver.io version: 4.92.2-ls230
code-server  | Build-date: 2024-08-31T20:22:31+00:00
code-server  | ───────────────────────────────────────
code-server  |     
code-server  | **** installing docker and docker compose ****
code-server  | PowerShell already installed, skipping
code-server  | **** Existing dotnet install is up to date, skipping ****
code-server  | **** docker and docker-compose already installed, skipping ****
code-server  | **** python3 already installed ****
code-server  | **** php already installed, skipping ****
code-server  | **** Flutter already installed, skipping ****
code-server  | [custom-init] No custom files found, skipping...
code-server  | starting with no password
code-server  | [2024-09-07T19:51:46.100Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:51:47.416Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:51:48.734Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:51:50.058Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:51:51.336Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:51:52.666Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:51:53.982Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:51:55.326Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:51:56.641Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:51:57.961Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:51:59.277Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:52:00.596Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:52:01.896Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:52:03.189Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:52:04.495Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:52:05.790Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:52:07.097Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:52:08.398Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:52:09.707Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:52:11.041Z] error --cert-key requires a value
code-server  | starting with no password
code-server  | [2024-09-07T19:52:12.354Z] error --ce
Copy link

github-actions bot commented Sep 7, 2024

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@awits
Copy link
Author

awits commented Sep 7, 2024

The above log is with HASHED_PASSWORD and PROXY_DOMAIN removed from compose.yaml

@Roxedus
Copy link
Member

Roxedus commented Sep 7, 2024

its the SSL mod you have applied. https://github.com/linuxserver/docker-mods/tree/code-server-ssl

@awits
Copy link
Author

awits commented Sep 7, 2024

I'm an idiot...thank you!

@awits awits closed this as completed Sep 7, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants