8000 [BUG] Read-only container output (logs) flooded with init_VideoIn failed · Issue #279 · OctoPrint/octoprint-docker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[BUG] Read-only container output (logs) flooded with init_VideoIn failed #279

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

Open
adelton opened this issue Apr 21, 2025 · 3 comments
Open
Labels

Comments

@adelton
Copy link
Contributor
adelton commented Apr 21, 2025

Describe the bug

Running

podman run --rm -p 8080:80 --name octoprint docker.io/octoprint/octoprint:latest

works without problems. When I add --read-only to the command, I get

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...s6-chown: fatal: unable to chown /var/run/s6/etc/cont-init.d/v3-dir-structure-check: Read-only file system
[...]
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise haproxy: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise octoprint: warning: unable to spawn ./run - waiting 10 seconds
[services.d] done.

That is expected with s6 and my understanding is that S6_READ_ONLY_ROOT=1 environment variable should fix that.

Indeed,

podman run --rm -p 8080:80 --name octoprint --read-only -e S6_READ_ONLY_ROOT=1 docker.io/octoprint/octoprint:latest

gives me a working OctoPrint UI on host's 'http://localhost:8080/' URL ... except the output of the container now shows a stream of

MJPG Streamer Version.: 2.0
 i: Using V4L2 device.: (null)
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: -1
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
 i: init_VideoIn failed

messages.

I even tried to add an explicit -e ENABLE_MJPG_STREAMER=false but that does not help either.

Container Details

please run `docker inspect --format '{{ index .Config.Labels "org.opencontainers.image.created"}}' octoprint/octoprint:<tag_you_are_using>' and list the date returned.

2024-11-05T09:21:10.037Z

To Reproduce
Steps to reproduce the behavior:

  1. Run podman run --rm -p 8080:80 --name octoprint --read-only -e S6_READ_ONLY_ROOT=1 docker.io/octoprint/octoprint:latest
  2. Observe the output showing
MJPG Streamer Version.: 2.0
 i: Using V4L2 device.: (null)
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: -1
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
 i: init_VideoIn failed

every second

Expected behavior

No messages about MJPG Streamer or init_VideoIn failed.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@adelton adelton added the bug label Apr 21, 2025
@adelton
Copy link
Contributor Author
adelton commented Apr 21, 2025

I observe the same behaviour with docker.io/octoprint/octoprint:bleeding of 2025-03-11T14:38:55.082Z as well.

@dromie
Copy link
dromie commented Apr 24, 2025

/etc/cont-init.d/01-mjpg-streamer-config seems to contain this (in version 2025-04-22T09:34:09.568Z):

#!/usr/bin/with-contenv bash

: "${ENABLE_MJPG_STREAMER:=false}"

# disable mjpg-streamer service if not enabled
if ! $ENABLE_MJPG_STREAMER; then
  rm -rf /etc/services.d/mjpg-streamer
fi

That should delete the mjpg-streamer service.

@adelton
Copy link
Contributor Author
adelton commented May 29, 2025

This does not seem to address the issue as observed.

Even if I make the /etc/services.d writable

$ podman run --rm -p 8080:80 --name octoprint --read-only -e S6_READ_ONLY_ROOT=1 --tmpfs /etc/services.d -e ENABLE_MJPG_STREAMER=false docker.io/octoprint/octoprint:latest

and I check from other terminal that the /etc/services.d/mjpg-streamer directory is not present

$ podman exec -ti octoprint find /etc/services.d
/etc/services.d
/etc/services.d/haproxy
/etc/services.d/haproxy/run
/etc/services.d/octoprint
/etc/services.d/octoprint/run
$

the flood of the

MJPG Streamer Version.: 2.0
 i: Using V4L2 device.: (null)
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: -1
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
 i: init_VideoIn failed

messages in the container output is still present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0