Arksine / moonraker

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

You may have intended to navigate to one of Moonraker's front ends... #780

Closed beebenutz closed 8 months ago

beebenutz commented 9 months ago

What happened

Installed Mainsail, Klipper, Moonraker, Crowsnest, and Klipperscreen via KIAUH. Mainsail connects perfectly via local:80 as intended. If I attempt to reach Moonraker via local:7125, I am greeted with a screen indication I am not connecting to the Moonraker "front-end". I have verified the port number and address.

Please advise.

Client

Mainsail

Browser

Firefox

How to reproduce

Install Mainsail, Klipper, Moonraker, Crowsnest, and Klipperscreen via KIAUH.

Attempt to connect to USER.local:7125.

Receive the following greeting:

Welcome to Moonraker

You may have intended to navigate to one of Moonraker's front ends, if so check that you entered the correct port in the address bar.

Additional information

Screenshot 2023-12-26 221610

Arksine commented 8 months ago

This is Moonraker's landing page. Its provides general information about the running instance and advises the user that if you intended to navigate to one of the front-ends you need to verify the port. Typically they are served by nginx on port 80.

ssna commented 8 months ago

Same thing has just happend to me. localhost takes me to first printer but no longer have menu to switch printers. localhost:7125 or localhost:7126 tae me to the landing page.

blinkitogaming commented 6 months ago

Same here as well. Few weeks, maybe one or two months ago I was able to reach any printer by specifying their ports rather 7125 or 7126 but since any of the past updates this takes me to that Moonraker welcome page. But if I just go to the Mainsail's IP which listens on port 80 it goes to the printer that is instanced on port 7125...

I noticed this becouse I was setting up my Heimdall dashboard and its configuration for showing special information about the app wasn't matching at all my printing status.

Arksine commented 6 months ago

Same here as well. Few weeks, maybe one or two months ago I was able to reach any printer by specifying their ports rather 7125 or 7126 but since any of the past updates this takes me to that Moonraker welcome page. But if I just go to the Mainsail's IP which listens on port 80 it goes to the printer that is instanced on port 7125...

Specifying the port in the browser navigation bar? Moonraker's landing page was implemented years ago, its specifically intended to warn users that they have have may have typed in the URL and port, ie http://myprinter.local:7125, expecting to navigate to the frontend (Mainsail).

If you are typing in the port as part of Mainsail's configuration and it redirecting you to Moonraker's landing page then it may be a regression in Mainsail.

fbmoose48 commented 5 months ago

I have this same issue, what was the resolution?

beebenutz commented 5 months ago

I have this same issue, what was the resolution?

Nobody was able to provide an actual solution. My solution was to use a dedicated "raspberry pi zero w" on each of my machines. I initially thought that putting all my eggs in one basket was worth it, but I found out the hard way that if you have one problem, then ALL your machines are down. Keep in mind, I only install Klipper, Mainsail, and Moonraker on the Raspberry Pi zeros. If you desire camera usage etc, you will require more than the Pi Zero W. With the Zero, I install the smallest raspberry pi OS available, then install the bare minimum for operation. Screenshot 2024-05-03 121401 I use the "lite" version of "bullseye". It's small and stable. Then ssh into the Zero and issue these commands:

sudo apt-get update

Updates system

sudo apt-get upgrade

Upgrades system

sudo reboot

Reboot

sudo raspi-config

Config Menu Advanced> Expand file system>choose to reboot.

sudo apt install git

install GIT

git clone https://github.com/dw-0/kiauh.git

"kiauh address"

./kiauh/kiauh.sh

Run KIAUH

Use KIAUH to install Klipper, Mainsail, and Moonraker.

ls /dev/serial/by-id/ ls /dev/serial/by-path/

Check Device Serial> copy path into your "printer.cfg" file

~printer_data/comms/klippy.sock #Moonraker config file klippy.sock path (if needed)

fbmoose48 commented 5 months ago

Nobody was able to provide an actual solution. My solution was to use a dedicated "raspberry pi zero w" on each of my machines.

Appreciate the response, that's what I ended up doing as well - except with zero 2 w's to be able to keep webcams running. Unfortunate, because these multi-port installs seem convenient. Although you may be right about relying on one instance of mainsail.

Arksine commented 5 months ago

FWIW, it seems as if there may be a fundamental misunderstanding as to how Mainsail is intended to work with multiple instances. Overall, the structure tends to be something like the following:

Mainsail can be configured to connect to multiple instances of Moonraker. How to do that is outside of the scope of Moonraker's issue tracker, however Mainsail's Documentation is a good place to start. If you are having trouble adding multiple instances, or it appears that it isn't working as intended, then I would suggest joining the Mainsail Discord linked in the docs for assistance. You may also be able to create an issue on Mainsail's issue tracker.