If you had the” Klipper Screen Moonraker [Errno 111] Connection Refused” error, you are not the only other person. So this issue generally happens when you are trying to install or configure a 3D printer with Klipper firmware along with Moonraker, meaning that the server (Moonraker) and the client interface (Klipper Screen) are not talking with each other. Let’s dig into this, let’s understand what drives it and let’s see what we can do about it.
What is Klipper and Moonraker?
Prior to getting into the error itself, it is important to understand what role Klipper and Moonraker serve in a 3D printer setup:
- Klipper Firmware: Klipper is a high-performance firmware for 3D printers, which runs on a Raspberry Pi or other microcontroller connected to the printer and is used to improve the printing speed and quality. It takes the processing load off the microcontroller, getting better performance.
- Moonraker: Moonraker is server software techology that serves as the backbone of communication between Klipper and the frontend user interfaces like OctoPrint, Fluidd, or KlipperScreen. This operates HTTP requests and WebSocket communications , providing users the ability to control and monitor a 3D printer remotely.
Understanding the Error: Klipper Screen Moonraker [Errno 111] Connection Refused
Klipper Screen Moonraker [Errno 111] Connection Refused—This error message usually refers to the Klipper Screen, the graphical user interface used on a Raspberry Pi or equivalent device running Klipper when Moonraker is not able to be connected. Errno 111 is a standard network error of “Connection Refused,” meaning that it cannot reach the server (in this case, Moonraker) , which is typically not running.
Possible Causes of the Error
- Moonraker Server Not Running: The most common cause of this error is that Moonraker isn’t running on the Raspberry Pi or the host computer where Klipper is installed. If Moonraker is down or has crashed, Klipper Screen will be unable to connect.
- Firewall or Network Configuration: If there’s a misconfiguration in the firewall or network settings, Moonraker may be blocked from accepting incoming connections on the required port (usually port 7125). This could prevent Klipper Screen from communicating with Moonraker.
- Incorrect Moonraker Configuration: The Moonraker configuration file might be incorrect, leading to issues with the server startup or improper binding to network interfaces. This misconfiguration can result in the “Connection Refused” error when Klipper Screen tries to communicate with it.
- Incorrect IP Address or Port: If the IP address or port specified in the Klipper Screen field is incorrect or outdated, the client will not connect to Moonraker, and you will see the error.
- System Resource Constraint: In some cases, resource constraints such as high CPU or low memory can cause either the Raspberry Pi or the host machine to shut down Moonraker or the service to fail to bind to the appropriate port, which leads to connectivity issues.
How to Fix the “Klipper Screen Moonraker [Errno 111] Connection Refused” Error
Step 1: Verify Moonraker is Running
The first step is to check whether Moonraker is running on your system. You can do this by accessing your Raspberry Pi via SSH or directly through a terminal interface and running the following command:
Step 2: Check Moonraker Logs for Errors
If Moonraker is running but you’re still seeing the “Connection Refused” error, the next step is to check the logs for any indication of issues. You can find the Moonraker logs in the following location:
Look for any errors or warnings in the log that might explain why Moonraker is rejecting the connection. If there are specific issues, resolving them might require reconfiguring Moonraker or addressing system resource limitations.
Step 3: Check Firewall and Network Configuration
If your Moonraker server is running but the error persists, the issue could be related to network configuration. Verify that your firewall isn’t blocking the required ports. You can use the following command to check open ports on your Raspberry Pi:
Moonraker typically uses port 7125 for communication with clients like Klipper Screen. Ensure that this port is open and not being blocked by a firewall or router. If necessary, you can adjust the firewall settings to allow traffic on the Moonraker port.
Step 4: Validate the Configuration Files
Another potential cause is a misconfiguration in the Moonraker settings. Check the Moonraker configuration file to ensure that the IP address, port, and network interface are correctly set. The configuration file is typically located at:
Step 5: Restart Klipper and Klipper Screen
After ensuring Moonraker is properly configured and running, restart both the Klipper firmware and Klipper Screen. Sometimes, a simple restart can resolve lingering issues.
To restart Klipper:
Step 6: Test the Connection
Once you’ve restarted both Klipper and Klipper Screen, try accessing the Klipper Screen interface again. If the “Klipper Screen Moonraker [Errno 111] Connection Refused” error persists, you may want to try accessing Moonraker directly via the web browser by going to:
If you can access Moonraker through the browser, it means the server is functioning correctly, and the issue is likely related to Klipper Screen or its configuration.
Additional Troubleshooting Tips
Check for Updates: Sometimes, the issue may arise from outdated software. Ensure that both Klipper and Moonraker are running the latest stable versions. You can update Klipper with:
Use Logs for Diagnostics: Always refer to the logs when troubleshooting. Klipper and Moonraker both generate detailed logs that can help pinpoint where the issue is occurring.
- Ensure Network Stability: Unstable or intermittent network connections can cause these kinds of errors. Make sure your Raspberry Pi and the device running Klipper Screen are on a stable network.
Conclusion
The “Klipper Screen Moonraker [Errno 111] Connection Refused” error is frustrating for 3D printing enthusiasts, but it’s usually solvable with some basic troubleshooting steps. You can typically resolve this error by ensuring Moonraker is running correctly, checking your network configuration, validating the configuration files, and restarting relevant services. If the problem persists, diving deeper into the system logs or consulting relevant forums may help uncover more complex issues.
If you’re still facing challenges after following these steps, don’t hesitate to seek support from the Klipper and Moonraker communities. These open-source tools have active communities that can help you solve problems.