Haproxy not serving webcam

Hello all... Happy Friday :slight_smile: First time poster here.
I am using octoprint under openmediavault's docker demon in an Atom D525 PC

My problem is similar to Webcam not working?
However, I am sure I have jpg_streamer working. I opened the container's 8080 port and can stream with this URL
http://myomv.local:8080/?action=stream -> shows my webcam at 640x480 with very high FPS
When I go to:
I get "404 Not found"
And in my octoprint container log, I find:
2021-04-16 09:54:11,268 - tornado.access - WARNING - 404 GET /webcam/?action=stream&1618566856379 ( 17.12ms
I wish I could see the haproxy log, but in the container console, I can't find /var/log/haproxy.log

This is my docker-compose.yml

version: '2.4'

    image: octoprint/octoprint
    restart: always
      - 5000:5000
      - 8080:8080
      - /dev/ttyUSB0:/dev/ttyACM0
      - /dev/video0:/dev/video0
     - octoprint:/octoprint
    # uncomment the lines below to ensure camera streaming is enabled when
    # you add a video device


Port 5000 points directly to octoprint, bypassing haproxy entirely. So your /webcam request goes to octoprint, not to haproxy, and haproxy does not get a chance to redirect the request to mjpgstreamer.

haproxy is used to access octoprint (and the webcam) on port 80. Try http://myomv.local:80/webcam/?action=stream. You may have to add the - 80:80 port to your docker-compose.yml.


You were SO RIGHT!
I thought that 5000 and 80 were the same thing for octoprint.
Actually, I can't use port 80 on my host, since it is connected to the open media vault admin web.
So I replaced the 5000:5000 with 5000:80, and it works through 5000.
Thank you!

1 Like