Network Error: Connection Refused

What is the problem?

Not connecting to network properly

What did you already try to solve it?

Downloaded the latest version octoprint to set up a new Raspberry Pi 3 B+. Downloaded the newest version of Octoprint, reformatted the micro USB using SD Card Formatter, Flashed the Octoprint software to the drive using Rapsberry Pi Imager(changed advanced setting as advised on the Octoprint download page, plugged my Raspberry into my modem via Ethernet cord, Network sees the device and assigns an IP address but when I try to use PuTTY I get a Network Error: Connection Refused, when I use CMD prompt it gives me a connection timed out errors. I've unplugged the Pi from the modem and power (just incase there was a conflict between LAN and WLAN connection). Plugged back in, wait about 2 mins to ensure booted up and try to connect. Advanced IP scanner shows it still in the network with the same IP address, but it's not connected. Can't pull up anything Via CMD prompt or PuTTY. I've Tried reformatting the disc and flashing it using Etcher and still the same problem. I've checked the octopi-wpa-supplicant.txt file and the SSID and password are correct, I've done this manually and also let the modem connection alter the file. I have one already set up and it's been working great, both have different IP addresses just can't get this one to do

Have you tried running in safe mode?


Did running in safe mode solve the problem?


Additional information about your setup

OctoPrint version 18.0, printer CR-10, browser Google Chrome, operating system Windows 10

What do you see on a monitor? If you can login try and verify the IP w/ ip addr show

I can't log into the Pi at all, when it's plugged in via ethernet I get a connection refused, when I try it unplugged and wireelss, i get a timed out message. Advanced IP Scanner shows me the devices IP address, when the Pi is plugged in via ethernet cable the icon shows a monitor with a blue sceen, when I unplug it and restart the Pi the icon is a monitor with a black screen, same IP address both times. The router interface shows the same IP address for the device, but shows it as an offline device.

as an update, I tried a new micro-usb card clean install, plugged it into the router and was able to log in fine. Disconnected it and tried to connect to it wirelessly and still having problems.

If I've read all of this correctly, there may be a second OctoPi / OctoPrint instance in your network. If so, you should probably change the host name of one of them so there's no conflict. The easiest one to change is the existing, working one. After changing its name, reboot the modem/router/DHCP server so that any trace of the old name is removed. This may assign a new IP address to the existing system, but you can probably figure that out.

Now, you can attach the new one to your network. If it doesn't connect via WiFi, then it sounds like you can connect it with an ethernet wire. This one will have the default name (octopi.local or just octopi) and you should be able to connect to it via PuTTY (or some other SSH client) using either its name or its IP address. PuTTY may complain about the SSH signature but you can ignore that.

If the WiFi connection is working, then you are done. If you had to use an ethernet wire, you should now be able to troubleshoot the WiFi connection.

While it is more complicated, you can alter the hostname of the new system before it boots by creating the file /boot/octopi-hostname.txt with a single line which contains the new name. Search this forum for octopi-hostname if you need more help (and search octopi-password for the another useful "get out of jail free" tip).