Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OctoPrint not working on fresh DietPi install #6194

Closed
MateuszJuszczyk opened this issue Feb 28, 2023 · 7 comments
Closed

OctoPrint not working on fresh DietPi install #6194

MateuszJuszczyk opened this issue Feb 28, 2023 · 7 comments
Labels
External bug 🐞 For bugs which are not caused by DietPi. Solution available 🥂 Definite solution has been done

Comments

@MateuszJuszczyk
Copy link

MateuszJuszczyk commented Feb 28, 2023

Creating a bug report/issue

Required Information

  • DietPi version | cat /boot/dietpi/.version
    G_DIETPI_VERSION_CORE=8
    G_DIETPI_VERSION_SUB=14
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH='master'
    G_GITOWNER='MichaIng'
    G_LIVE_PATCH_STATUS[0]='not applicable'
    G_LIVE_PATCH_STATUS[1]='applied'
    G_LIVE_PATCH_STATUS[2]='applied'

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
    bullseye

  • Kernel version | uname -a
    Linux DietPi 5.15.93-rockchip64 #23.02.2 SMP PREEMPT Fri Feb 17 23:48:36 UTC 2023 aarch64 GNU/Linux

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
    ROCK Pi S (aarch64)

  • Power supply used | (EG: 5V 1A RAVpower)
    USB C

  • SD card used | (EG: SanDisk ultra)
    Kingston 32GB class 10

Additional Information (if applicable)

  • Software title | (EG: Nextcloud) OctoPrint
  • Was the software title installed freshly or updated/migrated?
    Installed freshly
  • Can this issue be replicated on a fresh installation of DietPi?
    Yes

Steps to reproduce

  1. Fresh dietpi install on rock pi S
  2. octoprint install from dietpi-software
  3. Open in browser [yourIP]:5001

Expected behaviour

It should start octoprint wizard- ...

Actual behaviour

Not working...

Extra details

Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. -message from connecting in browser.

This case is very urgent to me. Please help me to solve the issue. Thanks in advance.

Output after error in "octoprint serve"

2023-02-28 21:41:35,803 - octoprint.cli.server - ERROR - Uncaught exception
Traceback (most recent call last):
  File "/mnt/dietpi_userdata/octoprint/.local/bin/octoprint", line 8, in <module >
    sys.exit(main())
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/octoprint/__init__.py", line 936, in main
    octo(args=args, prog_name="octoprint", auto_envvar_prefix="OCTOPRINT")
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/octoprint/cli/server.py", line 317, in serve_command
    run_server(
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/octoprint/cli/server.py", line 163, in run_server
    octoprint_server.run()
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/octoprint/server/__init__.py", line 385, in run
    self._start_intermediary_server()
  File "/mnt/dietpi_userdata/octoprint/.local/lib/python3.9/site-packages/octoprint/server/__init__.py", line 2552, in _start_intermediary_server
    self._intermediary_server.server_bind()
  File "/usr/lib/python3.9/http/server.py", line 138, in server_bind
    socketserver.TCPServer.server_bind(self)
  File "/usr/lib/python3.9/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
@MichaIng
Copy link
Owner

MichaIng commented Feb 28, 2023

OSError: [Errno 98] Address already in use

There seem to be an instance running already, respectively the port is used already:

ss -tlpn

octoprint serve

Ah, you ran that manually from console? Note there is a service started, which does that already, at boot and after the software install:

systemctl status octoprint

@MateuszJuszczyk
Copy link
Author

MateuszJuszczyk commented Mar 1, 2023

ss -tlpn result
image

octoprint status
image

Also I installed again and same issue.
image

@Joulinar
Copy link
Collaborator

Joulinar commented Mar 1, 2023

can you reboot your system and check the system log

journalctl -u octoprint

if possible, try to avoid creating screen prints. You should be able to copy the whole output from SSH terminal directly.

@MichaIng
Copy link
Owner

MichaIng commented Mar 1, 2023

Works fine here on my ROCK Pi S Bullseye system. Looks like an issue with the automatic language selection in your case. This is selected based on the browser language. Which one is it in your case, and does it work when you change it to e.g. English?

This best_match(LANGUAGES) seems to not find any match in your case, and a sanity check + fallback to English seems to be missing, to that it returns an exception instead. Might be simple to fix this at OctoPrint end.

@MateuszJuszczyk
Copy link
Author

Works fine here on my ROCK Pi S Bullseye system. Looks like an issue with the automatic language selection in your case. This is selected based on the browser language. Which one is it in your case, and does it work when you change it to e.g. English?

This best_match(LANGUAGES) seems to not find any match in your case, and a sanity check + fallback to English seems to be missing, to that it returns an exception instead. Might be simple to fix this at OctoPrint end.

You are completely right, thank you. It was browser issue (Brave). On chrome it loaded. Both have polish language.

@Joulinar Joulinar added Outside of DietPi scripts eg: user installed/configured software and removed Investigating 🤔 labels Mar 1, 2023
@Joulinar
Copy link
Collaborator

Joulinar commented Mar 1, 2023

Ok I'm going to close the issue for now, feel free to reopen if needed.

@Joulinar Joulinar closed this as completed Mar 1, 2023
@MichaIng
Copy link
Owner

MichaIng commented Mar 3, 2023

@MichaIng MichaIng added External bug 🐞 For bugs which are not caused by DietPi. Solution available 🥂 Definite solution has been done and removed Outside of DietPi scripts eg: user installed/configured software labels Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External bug 🐞 For bugs which are not caused by DietPi. Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

3 participants