-
Is there an existing issue for this?
Current BehaviorWhen I create a workspace from a template with sysbox activated, the newly created workspace is 'unhealthy' mode. Because of a Warning saying that stdout and/or stderr are used. Relevant Log Outputtime="2025-02-06T11:08:50.506065573Z" level=info msg="loading plugin \"io.containerd.nri.v1.nri\"..." type=io.containerd.nri.v1
time="2025-02-06T11:08:50.506073231Z" level=info msg="NRI interface is disabled by configuration."
time="2025-02-06T11:08:50.506676736Z" level=info msg=serving... address=/var/run/docker/containerd/containerd-debug.sock
time="2025-02-06T11:08:50.506752092Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock.ttrpc
time="2025-02-06T11:08:50.506805190Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock
time="2025-02-06T11:08:50.506830289Z" level=info msg="containerd successfully booted in 0.028811s"
time="2025-02-06T11:08:54.446894750Z" level=info msg="Loading containers: start."
time="2025-02-06T11:08:54.727642697Z" level=info msg="Loading containers: done."
time="2025-02-06T11:08:54.758994289Z" level=warning msg="WARNING: bridge-nf-call-iptables is disabled"
time="2025-02-06T11:08:54.759047675Z" level=warning msg="WARNING: bridge-nf-call-ip6tables is disabled"
time="2025-02-06T11:08:54.759077543Z" level=info msg="Docker daemon" commit=92a8393 containerd-snapshotter=false storage-driver=overlay2 version=27.4.0
time="2025-02-06T11:08:54.759178723Z" level=info msg="Daemon has completed initialization"
time="2025-02-06T11:08:54.802571696Z" level=info msg="API listen on /var/run/docker.sock"
WARNING: script exited successfully, but output pipes were not closed after 10s. This usually means a child process was started with references to stdout or stderr. As a result, this process may now have been terminated. Consider redirecting the output or using a separate "coder_script" for the process, see https://coder.com/docs/templates/troubleshooting#startup-script-issues for more information.
Expected BehaviorNot having the warning at the end of the log and having a "healthy" workspace Steps to ReproduceHere my template:
Environment
Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
Thanks for the report. Could you update the issue to also share your |
Beta Was this translation helpful? Give feedback.
-
Here the versions I have on my host:
|
Beta Was this translation helpful? Give feedback.
-
Could you also share a screenshot of the workspace page? And what message do you see there? |
Beta Was this translation helpful? Give feedback.
-
Is-it what you asked for? For the message you can see it in full length in my first message. |
Beta Was this translation helpful? Give feedback.
-
Yes. It looks like the agent is connected, and you can connect via VSCode and the web terminal. Can you confirm that? We are also working on redesigning the page, which would better show these errors. See #15423 |
Beta Was this translation helpful? Give feedback.
-
Yes I confirm that I can connect to coder-server and terminal, and the containers inside are properly working. My issue was more how to fix the warning, because I don't know what would be the cause in my init script. Any idea? |
Beta Was this translation helpful? Give feedback.
-
@mafredri do you have an idea what could be causing that warning? |
Beta Was this translation helpful? Give feedback.
-
Sure, this happens because the
This only redirects stderr to stdout, to prevent the error we should redirect stdout too (note order is important here):
We used to have better docs on writing startup scripts but I think those disappeared in a refactor as I can't find any reference to them in our current docs. |
Beta Was this translation helpful? Give feedback.
-
Thanks very much. It perfectly works. |
Beta Was this translation helpful? Give feedback.
Sure, this happens because the
dockerd
command it keeping references to stdout:This only redirects stderr to stdout, to prevent the error we should redirect stdout too (note order is important here):
We used to have better docs on writing startup scripts but I think those disappeared in a refactor as I can't find any reference to them in our current docs.