Camera no longer found at original IP

What is the problem?

I cannot access my camera from the ip address.

What did you already try to solve it?

I've tried various combinations of IPs and port numbers, I haven't found one that works yet. I've tried to figure out how to discover whether the camera is up and running or if it errored during start and haven't had luck with that either. I can provide a list of the IPs and port combinations I've tried if it would be useful.

Have you tried running in safe mode?

Yes

Did running in safe mode solve the problem?

No

Systeminfo Bundle

octoprint-systeminfo-20220118140030.zip (26.9 KB)

Additional information about your setup

OctoPrint version: 1.7.2
OctoPi version: 0.18.0
Printer: Mantis
Firmware: Marlin 1
Browser: I've tried all the big ones
Operating system: Windows, Linux

Additional info

I believe this is likely related to a recent change in my setup that solved an issue I was having with Octoprint not knowing my printer's base URL. That issue is discussed here:

You'll see the changes that I made to the NGINX configuration to allow OctoPrint to get the correct base URL. Ever since that change successfully fixed that problem, my camera (which was previously accessible without issue) isn't there anymore.

If there is any additional info I can provide, please let me know.

Do you access OctoPrint with the same IP or via octopi.local?

It could be that the router gave the Pi a new IP address.

What addresses did you try?

I can access OctoPrint from the address of the pi at port 1080.
The way my printer is set up, there is an interface for the printer that resides on 80, and OctoPrint is proxied to 1080. You can see the exact configuration on nginx on my printer in the link I provided in my original post.

To demonstrate how things used to work, if the printer was available at 192.168.1.111, then the ip of the camera was:

http://192.168.1.111:8080/?action=stream

Now that ip doesn't work anymore, but the printer is still on 192.168.1.111 and OctoPrint is on 192.168.1.111:1080

My understanding is that the camera is controlled by mjpg-streamer, is that correct? When I run systemctl status webcamd I get the following:

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 Fri 2022-01-14 17:26:06 EST; 4 days ago
  Process: 469 ExecStart=/root/bin/webcamd (code=exited, status=0/SUCCESS)
 Main PID: 482 (mjpg_streamer)
    Tasks: 3 (limit: 1935)
   CGroup: /system.slice/webcamd.service
           └─482 ./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

Jan 14 17:26:05 octopi mjpg_streamer[482]: MJPG-streamer [482]: Format............: JPEG
Jan 14 17:26:05 octopi mjpg_streamer[482]: MJPG-streamer [482]: TV-Norm...........: DEFAULT
Jan 14 17:26:05 octopi mjpg_streamer[482]: MJPG-streamer [482]: www-folder-path......: ./www-octopi/
Jan 14 17:26:05 octopi mjpg_streamer[482]: MJPG-streamer [482]: HTTP TCP port........: 8080
Jan 14 17:26:05 octopi mjpg_streamer[482]: MJPG-streamer [482]: HTTP Listen Address..: 127.0.0.1
Jan 14 17:26:05 octopi mjpg_streamer[482]: MJPG-streamer [482]: username:password....: disabled
Jan 14 17:26:05 octopi mjpg_streamer[482]: MJPG-streamer [482]: commands.............: disabled
Jan 14 17:26:05 octopi mjpg_streamer[482]: MJPG-streamer [482]: starting input plugin input_uvc.so
Jan 14 17:26:05 octopi mjpg_streamer[482]: MJPG-streamer [482]: starting output plugin: output_http.so (ID: 00)
Jan 14 17:26:06 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.

I checked against an older printer that still has a functioning camera and is using a very old version of OctoPrint (1.3.12) and the results of systemctl status webcamd are similar, but there's one difference I see. On the older printer, the HTTP Listen Address is listed as (null). Here are the results of that command on the older printer:

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 Tue 2022-01-18 19:49:42 EST; 3s ago
  Process: 8015 ExecStart=/root/bin/webcamd (code=exited, status=0/SUCCESS)
 Main PID: 8028 (mjpg_streamer)
    Tasks: 3 (limit: 1935)
   CGroup: /system.slice/webcamd.service
           └─8028 ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 640x480 -f 10 -d /dev/video0

Jan 18 19:49:41 mantis3dprinter mjpg_streamer[8028]: MJPG-streamer [8028]: www-folder-path......: ./www-octopi/
Jan 18 19:49:41 mantis3dprinter mjpg_streamer[8028]: MJPG-streamer [8028]: HTTP TCP port........: 8080
Jan 18 19:49:41 mantis3dprinter mjpg_streamer[8028]: MJPG-streamer [8028]: HTTP Listen Address..: (null)
Jan 18 19:49:41 mantis3dprinter mjpg_streamer[8028]: MJPG-streamer [8028]: username:password....: disabled
Jan 18 19:49:41 mantis3dprinter mjpg_streamer[8028]: MJPG-streamer [8028]: commands.............: disabled
Jan 18 19:49:41 mantis3dprinter mjpg_streamer[8028]: MJPG-streamer [8028]: starting input plugin input_uvc.so
Jan 18 19:49:41 mantis3dprinter mjpg_streamer[8028]: MJPG-streamer [8028]: starting output plugin: output_http.so (ID: 00)
Jan 18 19:49:42 mantis3dprinter webcamd[8015]: Done bring up all configured video device
Jan 18 19:49:42 mantis3dprinter webcamd[8015]: Goodbye...
Jan 18 19:49:42 mantis3dprinter systemd[1]: Started the OctoPi webcam daemon with the user specified config.

Mjpg streamer on OctoPi 0.18 doesn't listen on 8080. Everything runs through haproxy. Since you aren't using that with your custom setup, presumably since you posted the nginx setup in the other post. You'll need to setup the webcam to be proxied through that. Or, in /boot/octopi.txt uncomment camera_http_options and it should work.

This is the second time you've instantly had the answer that solved all of my problems, seriously thank you VERY much.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.