Open JargoV opened 2 years ago
Ok, problems with HAProxy gone after editing /etc/haproxy/haproxy.cfg and paste this config https://github.com/guysoft/OctoPi/blob/devel/src/modules/octopi/filesystem/root/etc/haproxy/haproxy.2.x.cfg
Camera still not work, but when i plug PS Eye camera it works like a charm /video3 PS Eye /video1 C170
Apr 21 18:30:53 citrico-opipc systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Apr 21 18:32:28 citrico-opipc systemd[1]: Stopping the OctoPi webcam daemon with the user specified config...
Apr 21 18:32:28 citrico-opipc systemd[1]: webcamd.service: Succeeded.
Apr 21 18:32:28 citrico-opipc systemd[1]: Stopped the OctoPi webcam daemon with the user specified config.
Apr 21 18:32:28 citrico-opipc systemd[1]: Starting the OctoPi webcam daemon with the user specified config...
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: starting application
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: MJPG Streamer Version.: 2.0
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: Using V4L2 device.: /dev/video1
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: Desired Resolution: 1024 x 768
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: Frames Per Second.: -1
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: Format............: JPEG
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: TV-Norm...........: DEFAULT
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: www-folder-path......: ./www-octopi/
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: HTTP TCP port........: 8080
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: HTTP Listen Address..: 127.0.0.1
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: username:password....: disabled
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: commands.............: disabled
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: starting input plugin input_uvc.so
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: starting output plugin: output_http.so (ID: 00)
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: Can't enable video in first time
Apr 21 18:32:28 citrico-opipc mjpg_streamer[3027]: MJPG-streamer [3027]: cleaning up resources allocated by input thread
Apr 21 18:32:29 citrico-opipc systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Apr 21 18:33:27 citrico-opipc systemd[1]: Stopping the OctoPi webcam daemon with the user specified config...
Apr 21 18:33:27 citrico-opipc systemd[1]: webcamd.service: Succeeded.
Apr 21 18:33:27 citrico-opipc systemd[1]: Stopped the OctoPi webcam daemon with the user specified config.
Apr 21 18:33:27 citrico-opipc systemd[1]: Starting the OctoPi webcam daemon with the user specified config...
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: starting application
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: MJPG Streamer Version.: 2.0
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: Using V4L2 device.: /dev/video3
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: Desired Resolution: 1024 x 768
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: Frames Per Second.: 1
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: Format............: YUYV
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: JPEG Quality......: 80
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: TV-Norm...........: DEFAULT
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: www-folder-path......: ./www-octopi/
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: HTTP TCP port........: 8080
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: HTTP Listen Address..: 127.0.0.1
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: username:password....: disabled
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: commands.............: disabled
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: starting input plugin input_uvc.so
Apr 21 18:33:27 citrico-opipc mjpg_streamer[3076]: MJPG-streamer [3076]: starting output plugin: output_http.so (ID: 00)
Apr 21 18:33:28 citrico-opipc systemd[1]: Started the OctoPi webcam daemon with the user specified config.
I tried differnt parameters and i still can't get it to work.
haproxy.2.x.cfg
do you have a copy of this file? [haproxy.2.x.cfg] because is not available
Sure
global
maxconn 4096
user haproxy
group haproxy
log /dev/log local1 debug
tune.ssl.default-dh-param 2048
defaults
log global
mode http
compression algo gzip
option httplog
option dontlognull
retries 3
option redispatch
option http-server-close
option forwardfor
maxconn 2000
timeout connect 5s
timeout client 15m
timeout server 15m
frontend public
bind :::80 v4v6
bind :::443 v4v6 ssl crt /etc/ssl/snakeoil.pem
option forwardfor except 127.0.0.1
use_backend webcam if { path_beg /webcam/ }
use_backend webcam_hls if { path_beg /hls/ }
use_backend webcam_hls if { path_beg /jpeg/ }
default_backend octoprint
backend octoprint
acl needs_scheme req.hdr_cnt(X-Scheme) eq 0
http-request replace-path ^([^\ :]*)\ /(.*) \1\ /\2
http-request add-header X-Scheme https if needs_scheme { ssl_fc }
http-request add-header X-Scheme http if needs_scheme !{ ssl_fc }
option forwardfor
server octoprint1 127.0.0.1:5000
errorfile 503 /etc/haproxy/errors/503-no-octoprint.http
backend webcam
http-request replace-path /webcam/(.*) /\1
server webcam1 127.0.0.1:8080
errorfile 503 /etc/haproxy/errors/503-no-webcam.http
backend webcam_hls
server webcam_hls_1 127.0.0.1:28126
errorfile 503 /etc/haproxy/errors/503-no-webcam-hls.http
For camera configuration check this resource: https://community.octoprint.org/docs?topic=21149 HA proxy fix is implemented and will be ready in the next release.
I can't manage my camera "Logitech C170" to run on OPi PC
I need to start manually the webcamd.service even it is enabled in scripts/citrico-config But i still have error "Webcam stream not loaded" LED on webcam isn't lit
Also i can't establish connection with Octoprint on web browser without typing port 5000 because the HAProxy won't work:
I'm using latest release v22-02-1