Arksine / moonraker

Web API Server for Klipper
https://moonraker.readthedocs.io
GNU General Public License v3.0
1.05k stars 406 forks source link

Error on Moonraker startup with Spoolman #811

Closed gfosdike1 closed 7 months ago

gfosdike1 commented 7 months ago

What happened

After a full update my printer I get the attached error

image

Client

Mainsail

Browser

Chrome

How to reproduce

On every start of Mainsail/Moonraker

Additional information

moonraker (5).log

Arksine commented 7 months ago

This is in part a duplicate of #810. The error message requires a fix in mainsail. I believe it has been applied but not yet released.

Separately, Moonraker is receiving a 403 "Forbidden" error when attempting to connect to spoolman's websocket. This is an issue with the spoolman instance that needs to be corrected.

gfosdike1 commented 7 months ago

It looks like the cause of the 403 is Moonraker. I can curl to the IP and port without issue direct from the OS:

pi@mainsailos:~ $ curl http://192.168.0.39:7912 <!DOCTYPE html>

Spoolman

Docker log shows the following: 2024-02-15 16:09:07 spoolman-1 | INFO: 172.18.0.1:36630 - "GET / HTTP/1.1" 200 OK

Arksine commented 7 months ago

403 is the response Moonraker receives from spoolman. Why its forbidden on your instance I am not sure, as its available to me.

You are using curl to request the interface, Moonraker is getting a 403 when attempting to connect to the websocket. If you want to try from the command line you can use wscat:

sudo apt install node-ws
wscat -c ws://192.168.0.39:7912/api/v1/spool
Arksine commented 7 months ago

Per Donkie/spoolman#316 it appears that the connection issue has been resolved on your end, so I'm going to close this.