[Bug] <title>OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash" #800

Closed
opened 2025-12-29 02:24:10 +01:00 by adam · 7 comments
Owner

Originally created by @europacafe on GitHub (Sep 22, 2024).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I've tried to go into the running container terminal, but I can't. This was what I've tried
docker exec -it headscale /bin/bash
OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown

Expected Behavior

I should be able to go into headscale container terminal, by following command, so that I can manage it
docker exec -it headscale /bin/bash
but I got below error.
OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown

There was no such problem when I ran headscale 0.22.3.

Steps To Reproduce

see above

Environment

- OS:Unraid 6.12.11
- Headscale version: 0.23.0
- Tailscale version: this is just the headscale server issue

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Anything else?

below is part of the log entries when I started the container:
2024-09-22T03:31:22Z WRN
WARN: The "dns.use_username_in_magic_dns" configuration key is deprecated and has been removed. Please see the changelog for more details.

2024-09-22T03:31:22Z INF Opening database database=sqlite3 path=/etc/headscale/db.sqlite
2024-09-22T03:31:24Z INF Setting up a DERPMap update worker frequency=86400000
2024-09-22T03:31:24Z WRN Listening without TLS but ServerURL does not start with http://
2024-09-22T03:31:24Z INF listening and serving HTTP on: 0.0.0.0:8080
2024-09-22T03:31:24Z INF listening and serving debug and metrics on: 127.0.0.1:9090
2024-09-22T03:31:24Z INF home/runner/work/headscale/headscale/hscontrol/poll.go:705 > node has connected, mapSession: 0xc000758480, chan: 0xc0002ad5e0 node=pfSense node.id=8 omitPeers=false readOnly=false stream=true

2024-09-22T03:58:35Z INF home/runner/work/headscale/headscale/hscontrol/auth.go:603 > Node successfully authorized node="Xiaomi M2007J3SG"
2024-09-22T03:58:35Z INF home/runner/work/headscale/headscale/hscontrol/poll.go:705 > node has connected, mapSession: 0xc000f51080, chan: 0xc000347420 node="Xiaomi M2007J3SG" node.id=4 omitPeers=false readOnly=false stream=true
2024-09-22T03:58:35Z INF home/runner/work/headscale/headscale/hscontrol/poll.go:705 > node has disconnected, mapSession: 0xc000f51080, chan: 0xc000347420 node="Xiaomi M2007J3SG" node.id=4 omitPeers=false readOnly=false stream=true

Originally created by @europacafe on GitHub (Sep 22, 2024). ### Is this a support request? - [X] This is not a support request ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior I've tried to go into the running container terminal, but I can't. This was what I've tried `docker exec -it headscale /bin/bash` OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown ### Expected Behavior I should be able to go into headscale container terminal, by following command, so that I can manage it `docker exec -it headscale /bin/bash` but I got below error. OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown There was no such problem when I ran headscale 0.22.3. ### Steps To Reproduce see above ### Environment ```markdown - OS:Unraid 6.12.11 - Headscale version: 0.23.0 - Tailscale version: this is just the headscale server issue ``` ### Runtime environment - [X] Headscale is behind a (reverse) proxy - [X] Headscale runs in a container ### Anything else? below is part of the log entries when I started the container: 2024-09-22T03:31:22Z WRN WARN: The "dns.use_username_in_magic_dns" configuration key is deprecated and has been removed. Please see the changelog for more details. 2024-09-22T03:31:22Z INF Opening database database=sqlite3 path=/etc/headscale/db.sqlite 2024-09-22T03:31:24Z INF Setting up a DERPMap update worker frequency=86400000 2024-09-22T03:31:24Z WRN Listening without TLS but ServerURL does not start with http:// 2024-09-22T03:31:24Z INF listening and serving HTTP on: 0.0.0.0:8080 2024-09-22T03:31:24Z INF listening and serving debug and metrics on: 127.0.0.1:9090 2024-09-22T03:31:24Z INF home/runner/work/headscale/headscale/hscontrol/poll.go:705 > node has connected, mapSession: 0xc000758480, chan: 0xc0002ad5e0 node=pfSense node.id=8 omitPeers=false readOnly=false stream=true 2024-09-22T03:58:35Z INF home/runner/work/headscale/headscale/hscontrol/auth.go:603 > Node successfully authorized node="Xiaomi M2007J3SG" 2024-09-22T03:58:35Z INF home/runner/work/headscale/headscale/hscontrol/poll.go:705 > node has connected, mapSession: 0xc000f51080, chan: 0xc000347420 node="Xiaomi M2007J3SG" node.id=4 omitPeers=false readOnly=false stream=true 2024-09-22T03:58:35Z INF home/runner/work/headscale/headscale/hscontrol/poll.go:705 > node has disconnected, mapSession: 0xc000f51080, chan: 0xc000347420 node="Xiaomi M2007J3SG" node.id=4 omitPeers=false readOnly=false stream=true
adam added the bug label 2025-12-29 02:24:10 +01:00
adam closed this issue 2025-12-29 02:24:11 +01:00
Author
Owner

@andrpp commented on GitHub (Sep 22, 2024):

Hey,

I think you want to run the debug container version: https://headscale.net/running-headscale-container/#debugging-headscale-running-in-docker

@andrpp commented on GitHub (Sep 22, 2024): Hey, I think you want to run the _debug_ container version: https://headscale.net/running-headscale-container/#debugging-headscale-running-in-docker
Author
Owner

@europacafe commented on GitHub (Sep 22, 2024):

thanks. That works. So I have to use -debug for future release too?

@europacafe commented on GitHub (Sep 22, 2024): thanks. That works. So I have to use -debug for future release too?
Author
Owner

@Procsiab commented on GitHub (Sep 22, 2024):

I think that this paragraph of the documentation contains the answer to your question: https://headscale.net/running-headscale-container/#debugging-headscale-running-in-docker

In short, now the container images are built into two different "flavours": the minimal one contains just headscale (no bash, no package manager, etc...); the debug version has everything you would need to run a session inside the container, therefore it would fit your use case of running /bin/bash inside the container.

@Procsiab commented on GitHub (Sep 22, 2024): I think that this paragraph of the documentation contains the answer to your question: https://headscale.net/running-headscale-container/#debugging-headscale-running-in-docker In short, now the container images are built into two different "flavours": the minimal one contains just headscale (no bash, no package manager, etc...); the debug version has everything you would need to run a session inside the container, therefore it would fit your use case of running /bin/bash inside the container.
Author
Owner

@europacafe commented on GitHub (Sep 22, 2024):

Thanks. If I don't want to run the debug version, how can I issue headscale commands without being able to enter the container Terminal because with normal release, I can't?

@europacafe commented on GitHub (Sep 22, 2024): Thanks. If I don't want to run the debug version, how can I issue headscale commands without being able to enter the container Terminal because with normal release, I can't?
Author
Owner

@nblock commented on GitHub (Sep 22, 2024):

Thanks. If I don't want to run the debug version, how can I issue headscale commands without being able to enter the container Terminal because with normal release, I can't?

It should work like this (example from the docs):

docker exec headscale \
  headscale users create myfirstuser
@nblock commented on GitHub (Sep 22, 2024): > Thanks. If I don't want to run the debug version, how can I issue headscale commands without being able to enter the container Terminal because with normal release, I can't? It should work like this (example from the docs): ```bash docker exec headscale \ headscale users create myfirstuser ```
Author
Owner

@europacafe commented on GitHub (Sep 22, 2024):

Ok. Got it...thanks.

@europacafe commented on GitHub (Sep 22, 2024): Ok. Got it...thanks.
Author
Owner

@nblock commented on GitHub (Sep 23, 2024):

Ok. Got it...thanks.

Great, can you please close the issue?

@nblock commented on GitHub (Sep 23, 2024): > Ok. Got it...thanks. Great, can you please close the issue?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#800