Octoprint not accessible via hostname after print starts

What is the problem?

The octoprint instance is no longer accessible on my Raspberry Pi 3B+ via hostname after a print starts, I always have to use an IP address if I want to access the instance. I have another instance on a Raspberry Pi Zero W that has worked perfectly since day 1. Typically I pull the power to restart it and then I can access the octoprint instance via hostname.

What did you already try to solve it?

Swapping out power supplies. I also put a USB voltage/amp meter to make sure at least 5V was being supplied to the Pi. I've tried a dedicated power supply and a phone charger, both capable of 2.5A with no success. Pinging the device via hostname does not result in a reply, pinging the device via IP does result in a reply.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)

OctoPrint 1.3.11 running on OctoPi 0.16.0

This is not normal behavior. I guessing that something is misconfigured or misbehaving in your LAN. It most likely is a DHCP / DNS issue.

You will have to provide more details of your LAN configuration (topology, router type(s), other hosts, etc.)

Well I hope it's not normal behavior :P. I've been using Octoprint for probably 2 years now, and while I don't recall this happening ever, I haven't really used my printers much. I've only recently started to use my printers 24/7 as I'm starting a webshop. I have a custom hostname on both my printers. One is called "WPrinter", the other is called "GPrinter". I access them with "https://wprinter.local" and "https://gprinter.local". GPrinter DNS is spotty at best after the print starts. Sometimes I will refresh and it will resolve, other times it will not. All of this happens while a print is going. I've never had issues with prints ever being messed up, strictly DNS issues, that's it. I don't use a webcam on any of my Octoprint instances.

My network config is a pretty default Ubiquiti setup. I have a one router, one switch, and one wireless AP. No custom config really and I've never had any kind of network issues in the past. Ubiquiti stuff is pretty solid.

The only time I've had this happen is if the Pi does not release the DHCP lease when it shuts down.
The next time the DHCP server allocates an IP and tries to update the DNS, the DNS refuses it due to an existing entry for the hostname . IP address access works fine.

One big difference is that the Zero only supports a 2.4Ghz wifi zone but the 3B+ can do either 2.4Ghz/5Ghz. It's likely that the DHCP configuration on the 5Ghz side of your router isn't forwarding the broadcast traffic (Bonjour).

I've swapped the 3B+ for a 3B to see if that yields any different results. I've already started a print and so far so good, I can still access it. If I run into an instance where I can't I'll update here.

As a workaround, bypass DHCP by setting fixed addresses in the router and on the PI and enter them in your PC's hostfile.

1 Like

Also, you want to issue static IP addresses there in your DHCP server for your Raspberry Pi computers so that something else on your network doesn't get that.