Service 'Klipper' not allowed

Basic Information:

Printer Model: Modded CubePro duet
MCU / Printerboard: MKS Gen L

moonraker.log (290.9 KB)

Cna’t add Klipper log. When I try to download that it says log is missing and gives me this message:
{“error”: {“code”: 404, “message”: “Not Found”, “traceback”: “Traceback (most recent call last):\n\n File "/home/pi/moonraker-env/lib/python3.9/site-packages/tornado/web.py", line 1786, in _execute\n result = await result\n\n File "/home/pi/moonraker/moonraker/app.py", line 736, in get\n self.absolute_path = self.validate_absolute_path(\n\n File "/home/pi/moonraker-env/lib/python3.9/site-packages/tornado/web.py", line 2895, in validate_absolute_path\n raise HTTPError(404)\n\ntornado.web.HTTPError: HTTP 404: Not Found\n”}}

I cannot connect to my printer I get a message “Service ‘klipper’ not allowed”.

This is on an android phone running Debian Buster. It took me a long time to get moonraker going, now I’m on to getting klipper to connect to the printer.

Describe your issue:

I cannot connect to Klipper because it says Klipper service not allowed. I tried enabling loging in Moonraker conf. but when I rebooted moonraker with logging enabled I get a message that logging is depreciated.

According to the log

2023-12-25 22:17:18,494 [eventloop.py:_wrapper()] - Error Running Callback
Traceback (most recent call last):
  File "/home/pi/moonraker/moonraker/eventloop.py", line 84, in _wrapper
    await ret
  File "/home/pi/moonraker/moonraker/server.py", line 187, in server_init
    await self.start_server()
  File "/home/pi/moonraker/moonraker/server.py", line 198, in start_server
    self.moonraker_app.listen(self.host, self.port, self.ssl_port)
  File "/home/pi/moonraker/moonraker/app.py", line 260, in listen
    self.http_server = self.app.listen(
  File "/home/pi/moonraker-env/lib/python3.9/site-packages/tornado/web.py", line 2207, in listen
    server.listen(
  File "/home/pi/moonraker-env/lib/python3.9/site-packages/tornado/tcpserver.py", line 183, in listen
    sockets = bind_sockets(
  File "/home/pi/moonraker-env/lib/python3.9/site-packages/tornado/netutil.py", line 162, in bind_sockets
    sock.bind(sockaddr)
OSError: [Errno 98] Address already in use

it seems that the required port is already used by another service on your system. You will need to fix this.

How do I determine what service is using that port?

Here is information I have gathered from here.

$ ps aux | grep python

pi 10082 0.0 0.6 25580 11780 ? Sl Dec25 0:08 /home/pi/klippy-env/bin/python /home/pi/klipper/klippy/klippy.py /home/pi/printer_data/config/printer.cfg -l /home/pi/printer_data/logs/klippy.log -a /home/pi/printer_data/comms/klippy.sock
pi 10091 2.9 1.2 272644 23060 ? Sl Dec25 17:11 /home/pi/moonraker-env/bin/python /home/pi/moonraker/moonraker/moonraker.py -c /home/pi/printer_data/config/moonraker.conf -l /home/pi/printer_data/logs/moonraker.log
pi 10234 1.3 1.8 114472 34692 ? Sl Dec25 7:39 /home/pi/.KlipperScreen-env/bin/python /home/pi/KlipperScreen/screen.py -c /home/pi/KlipperScreen.conf -l /home/pi/printer_data/logs/KlipperScreen.log
pi 22427 0.0 0.0 2224 1088 pts/1 S+ 08:52 0:00 grep python
$ $

$ ps -fA | grep python

pi 10082 1 0 Dec25 ? 00:00:08 /home/pi/klippy-env/bin/python /home/pi/klipper/klippy/klippy.py /home/pi/printer_data/config/printer.cfg -l /home/pi/printer_data/logs/klippy.log -a /home/pi/printer_data/comms/klippy.sock
pi 10091 1 2 Dec25 ? 00:17:17 /home/pi/moonraker-env/bin/python /home/pi/moonraker/moonraker/moonraker.py -c /home/pi/printer_data/config/moonraker.conf -l /home/pi/printer_data/logs/moonraker.log
pi 10234 10009 1 Dec25 ? 00:07:42 /home/pi/.KlipperScreen-env/bin/python /home/pi/KlipperScreen/screen.py -c /home/pi/KlipperScreen.conf -l /home/pi/printer_data/logs/KlipperScreen.log
pi 22496 22319 0 08:56 pts/1 00:00:00 grep python
$ $

None of that gives me useful information. It was supposed to give me a pid of the process using that port number.

Try
sudo lsof -i -P -n | grep LISTEN
or
sudo lsof -i:7125

$ sudo lsof -i -P -n | grep LISTEN
lsof: no pwd entry for UID 10161
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10161
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
lsof: no pwd entry for UID 10167
x.org.ser 6287 10167 74u IPv6 73091 0t0 TCP *:6000 (LISTEN)
x.org.ser 6287 10167 79u IPv4 73092 0t0 TCP *:6000 (LISTEN)
pulseaudi 6596 10167 9u IPv6 73128 0t0 TCP *:4713 (LISTEN)
pulseaudi 6596 10167 10u IPv4 73129 0t0 TCP *:4713 (LISTEN)
xsel 6603 10167 74u IPv6 73091 0t0 TCP *:6000 (LISTEN)
xsel 6603 10167 79u IPv4 73092 0t0 TCP *:6000 (LISTEN)
sshd 10002 root 3u IPv4 171216 0t0 TCP *:22 (LISTEN)
sshd 10002 root 4u IPv6 171218 0t0 TCP *:22 (LISTEN)
python 10091 pi 14u IPv4 170572 0t0 TCP *:7125 (LISTEN)
nginx 10106 root 10u IPv4 172056 0t0 TCP *:80 (LISTEN)
nginx 10107 www-data 10u IPv4 172056 0t0 TCP *:80 (LISTEN)
nginx 10108 www-data 10u IPv4 172056 0t0 TCP *:80 (LISTEN)
nginx 10109 www-data 10u IPv4 172056 0t0 TCP *:80 (LISTEN)
nginx 10110 www-data 10u IPv4 172056 0t0 TCP *:80 (LISTEN)
nginx 10111 www-data 10u IPv4 172056 0t0 TCP *:80 (LISTEN)
nginx 10113 www-data 10u IPv4 172056 0t0 TCP *:80 (LISTEN)
nginx 10114 www-data 10u IPv4 172056 0t0 TCP *:80 (LISTEN)
nginx 10115 www-data 10u IPv4 172056 0t0 TCP *:80 (LISTEN)

$ sudo lsof -i:7125

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
python 10091 pi 14u IPv4 170572 0t0 TCP *:7125 (LISTEN)
python 10091 pi 16u IPv4 171507 0t0 TCP 10.9.36.162:7125->10.9.36.191:59508 (ESTABLISHED)
python 10091 pi 17u IPv4 171570 0t0 TCP localhost:7125->localhost:47602 (ESTABLISHED)
python 10234 pi 7u IPv4 170650 0t0 TCP localhost:47602->localhost:7125 (ESTABLISHED)

Please use </> (Preformated Text) in the editor for your sippets, else information may get lost.

Format

Just typing the commands and posting its outputs will not get you anywhere.

Remote diagnosing what could have gone wrong without you having the proper Linux knowledge will be quite an ordeal.
I’d recommend making your life easier and get some SBC to run Klipper on.

Ok. I hear you. I should have used proper posting of the snippets, and that it might not work to remote diagnose a problem like this. I hear you about getting a proper device to run klipper on. I do have a printer running on a Raspberry Pi. I have 4 old phones around, I see people running klipper on them. That’s the rout I want to go with my other two printers. I’m willing to take time to sort this out and maybe learn something in the process. I’ll just keep digging till I find the answer. I may not be bright but I’m stubborn.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.