Octoprint can reach server but cannot name resolution fails

Octoprint can't connect to the internet, checking the server settings shows that the server is reachable but name resolution fails. See picture below:

I have tried performing a completely fresh install of the latest version of octoprint with no change in behaviour. Checked SSID and password are correct.

octoprint-logs.zip (98.6 KB)

octoprint-systeminfo-20201202082322.zip (14.2 KB)

Just checked my router and can see that octopi is connected to the wifi, so I don't understand why it isn't able to connect to the internet at all.

Can you SSH into your octopi system? If so, what is the output of cat /etc/resolv.conf?

For more DNS utilities, you can install sudo apt-get install dnsutils (I had to sudo apt-get update and sudo apt-get upgrade before dnsutils would install).

Sounds like your router isn't sending the default gateway to the pi

More likely the DNS server(s) aren't being sent. I say this because the screenshot in the original post shows the 1.1.1.1 server is reachable (so gateway is correct) but name cannot be resolved. With the output of /etc/resolv.conf we can determine if nothing is being sent or if something OctoPrint can't use is being sent.

Hi all

same issue here - but looking to resolv.conf on the octoprint server (not octopi!) I can find three lines (apologize if I obfuscate the original addresses)

# Generated by NetworkManager
search fritz.box
nameserver <my local DNS server here - IPv4 address>
nameserver <my local DNS server here - IPv6 address>

Additional information: as I am running klipper, Octoprint run on port 5000, so I am not sure if this is relevant.

Octoprint system info below. Where do I continue to look for issues?

Thanks
Max

octoprint-systeminfo-20230219165811.zip (5.1 KB)

This is not an OctoPrint problem (and apparently not an OctoPi problem either). Without more information there's not much we can do. BTW, there is no need to obfuscate local IP addresses.

Try a Google search for "linux have IP address but not internet" and see if one of those links helps you troubleshoot the issue.

@b-morgan

thanks a lot for your feedback. As you suggested in this thread before, I installed dnsutils and tried to look for the octoprint.org

biqu@BTT-CB1:~$ dig octoprint.org
; <<>> DiG 9.16.37-Debian <<>> octoprint.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61943
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;octoprint.org.			IN	A

;; ANSWER SECTION:
octoprint.org.		2616	IN	A	159.69.6.198

;; Query time: 7 msec
;; SERVER: 192.168.178.54#53(192.168.178.54)
;; WHEN: Sun Feb 19 19:47:51 UTC 2023
;; MSG SIZE  rcvd: 58

For what I can understand, it seems that the system is able to find the octoprint domain, while Octoprint (python?) not. Where is the difference?

Max

P.S.: I did not obfuscate the local IP this time :wink:

Since you are not running OctoPi, what flavor of Linux are you running on what hardware?

Since your initial dump of resolv.conf showed an obfuscated IPV6 address, I'd suggest we disable IPV6. You will have to search for instructions for your operating system.

If turning off IPV6 doesn't change the symptoms, a couple of commands that might provide some useful data. ifconfig, route, ping 8.8.8.8, ping dns.google.com, traceroute dns.google.com, ping octoprint.org, traceroute octoprint.org.

Finally, here is a link to some Python Network examples.

I'm beginning to run out of ideas.