Octopi Pi Camera Port 8080 Does not work

Thank you Charlie for the solution. I was editing while you replied... Thanks again.

*We can not see the camera stream on the OctoPrint website at octopi.local.
Curl http://octopi.local:8080/ fails to connect local port 8080 connection refused.
Curl http://192.168.1.53:8080/ fails with the same message.
Curl http://127.0.0,1:8080/ returns an mjpg_streamer test page

Camera model*
We are using an Element 14 Raspberry Pi Camera V2 with Pi Model 3 B.

What is the problem?
We installed Octopi V 0.18.0 and updated and fixed broken and rebooted many times.
We can't see the camera on octopi.local:8080/?action=stream with Firefox nor Chrome on Fedora 33.
We are able to ssh into octopi.local, raspi-config pi camera is enabled.
Verified that webcamd is running.

It looks to me like we do not have permision to open port 8080 on octopi.local?

Here is the error message on OcotPrint local webpage.



Webcam stream not loaded

It might not be configured correctly or require authentication. You can change the URL of the stream under "Settings" > "Webcam & Timelapse" > "Webcam" > "Stream URL". If you don't have a webcam you can also just disable webcam support there.

Currently configured stream URL: http://octopi.local:8080/?action=stream

Here is the service webcamd status

pi@octopi:~ $ sudo service webcamd status
● webcamd.service - the OctoPi webcam daemon with the user specified config
   Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2021-02-21 19:59:32 GMT; 18min ago
  Process: 440 ExecStart=/root/bin/webcamd (code=exited, status=0/SUCCESS)
 Main PID: 469 (mjpg_streamer)
    Tasks: 3 (limit: 1939)
   CGroup: /system.slice/webcamd.service
           └─469 ./mjpg_streamer -o output_http.so -w ./www-octopi -n --listen 127.0.0.1 -i input_uvc.so -r 640x480 -f 10 -d /dev/video0

Feb 21 19:59:31 octopi mjpg_streamer[469]: MJPG-streamer [469]: Format............: JPEG
Feb 21 19:59:31 octopi mjpg_streamer[469]: MJPG-streamer [469]: TV-Norm...........: DEFAULT
Feb 21 19:59:31 octopi mjpg_streamer[469]: MJPG-streamer [469]: www-folder-path......: ./www-octopi/
Feb 21 19:59:31 octopi mjpg_streamer[469]: MJPG-streamer [469]: HTTP TCP port........: 8080
Feb 21 19:59:31 octopi mjpg_streamer[469]: MJPG-streamer [469]: HTTP Listen Address..: 127.0.0.1
Feb 21 19:59:31 octopi mjpg_streamer[469]: MJPG-streamer [469]: username:password....: disabled
Feb 21 19:59:31 octopi mjpg_streamer[469]: MJPG-streamer [469]: commands.............: disabled
Feb 21 19:59:31 octopi mjpg_streamer[469]: MJPG-streamer [469]: starting input plugin input_uvc.so
Feb 21 19:59:31 octopi mjpg_streamer[469]: MJPG-streamer [469]: starting output plugin: output_http.so (ID: 00)
Feb 21 19:59:32 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.

What did you already try to solve it?

sudo apt-get update
reboot
reboot...

sudo iptables -L
sudo iptables --list-rules
both return no rules.

Tried following examples online then realized that mjpeg-streamer already exists in octopi and there was no need to try and reinstall it. Also realized that running mjpeg-streamer again just created another one running. Rebooted many times...

Verified that the mjpeg streamer service was running many times.

stopped webcamd
verified v4l2-ctl --all shows the pi camera on video 0.
verified that raspistill -o cam.jpg writes the image cam.jpg which looked fine. (Note to do this we had to enable raspicam in /boot/config.txt). Just enabling the camera using raspi-config did not work? Did not install a desktop nor any other applications. Used scp to copy the image to my main computer.

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)
/var/log/webcamd.log

Starting up webcamDaemon...

--- Configuration: ----------------------------
cfg_file:      /boot/octopi.txt
camera:        auto
usb options:   -r 640x480 -f 10
raspi options: -fps 10
http options:  -w ./www-octopi -n --listen 127.0.0.1

Explicitly USB device: 
-----------------------------------------------

Found video devices:
/dev/video0
/dev/video10
/dev/video11
/dev/video12
/dev/video13
/dev/video14
/dev/video15
/dev/video16
raspi
config file='/boot/octopi.txt':USB device was not set in options, start MJPG-streamer with the first found video device: /dev/video0
<13>Feb 21 19:59:31 root: Starting USB webcam
Checking for VL805 (Raspberry Pi 4)...
  - It seems that you don't have VL805 (Raspberry Pi 4).
    There should be no problems with USB (a.k.a. select() timeout)
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n --listen 127.0.0.1 -i input_uvc.so -r 640x480 -f 10 -d /dev/video0
MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 10
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
UVCIOC_CTRL_ADD - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Mode: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Frequency: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Disable video processing: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Raw bits per pixel: Inappropriate ioctl for device (25)
 o: www-folder-path......: ./www-octopi/
 o: HTTP TCP port........: 8080
 o: HTTP Listen Address..: 127.0.0.1
 o: username:password....: disabled
 o: commands.............: disabled
Done bring up all configured video device

Goodbye...


**syslog from last boot**
Feb 21 20:17:01 octopi CRON[759]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 21 20:25:10 octopi octoprint[361]: 2021-02-21 20:25:10,714 - octoprint.server.util.flask - INFO - Passively logging in user k from ::ffff:xxx.xxx.xxx.xxx
Feb 21 20:25:10 octopi octoprint[361]: 2021-02-21 20:25:10,715 - octoprint.access.users - INFO - Logged in user: k
Feb 21 20:25:10 octopi octoprint[361]: 2021-02-21 20:25:10,849 - octoprint.server.util.sockjs - INFO - Client connection closed: ::ffff:xxx.xxx.xxx.xxx
Feb 21 20:25:11 octopi octoprint[361]: 2021-02-21 20:25:11,217 - octoprint.server.util.flask - INFO - Passively logging in user k from ::ffff:xxx.xxx.xxx.xxx
Feb 21 20:25:11 octopi octoprint[361]: 2021-02-21 20:25:11,218 - octoprint.access.users - INFO - Logged in user: k
Feb 21 20:25:12 octopi octoprint[361]: 2021-02-21 20:25:12,031 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:xxx.xxx.xxx.xxx
Feb 21 20:25:12 octopi octoprint[361]: 2021-02-21 20:25:12,076 - octoprint.server.util.flask - INFO - Passively logging in user k from ::ffff:xxx.xxx.xxx.xxx
Feb 21 20:25:12 octopi octoprint[361]: 2021-02-21 20:25:12,077 - octoprint.access.users - INFO - Logged in user: k
Feb 21 20:25:13 octopi octoprint[361]: 2021-02-21 20:25:13,355 - octoprint.server.util.sockjs - INFO - User kurt logged in on the socket from client ::ffff:xxx.xxx.xxx.xxx
Feb 21 20:29:39 octopi octoprint[361]: 2021-02-21 20:29:39,537 - octoprint.server.heartbeat - INFO - Server heartbeat <3
Feb 21 20:32:31 octopi systemd[1]: proc-sys-fs-binfmt_misc.automount: Got automount request for /proc/sys/fs/binfmt_misc, triggered by 825 (find)
Feb 21 20:32:31 octopi systemd[1]: Mounting Arbitrary Executable File Formats File System...
Feb 21 20:32:31 octopi systemd[1]: Mounted Arbitrary Executable File Formats File System.

Additional information about your setup (OctoPrint version, OctoPi version, ...)
OctoPi version 0.18.0

Use http://octopi.local/webcam/, 8080 is not exposed on OctoPi and mjpg streamer instead proxied to there.

Awesome. Didn't realize that the link was showing us my camera! Funny. Too bad this isn't at the beginning of the thread.

Found that we still needed the ?action part of the URLs for Video and Snapshots.

Stream URL:


http://octopi.local/webcam/?action=stream

Snapshot URL:


http://octopi.local/webcam/?action=snapshot

Also the webpage that you see using http://octopi.local/webcam is a test html page located in the folder
/home/pi/mjpg-streamer/www-octopi

pi@octopi:~/mjpg-streamer/www-octopi $ more index.html

<html>
<head><title>mjpg_streamer test page</title></head>
<body>
<h1>Snapshot</h1>
<p>Refresh the page to refresh the snapshot</p>
<img src="./?action=snapshot" alt="Snapshot">
<h1>Stream</h1>
<img src="./?action=stream" alt="Stream">
</body>
</html>
1 Like