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

Portainer edition #31

Open
Robnex opened this issue Jan 31, 2022 · 7 comments
Open

Portainer edition #31

Robnex opened this issue Jan 31, 2022 · 7 comments

Comments

@Robnex
Copy link

Robnex commented Jan 31, 2022

Hello,

would it be possible to create a docker_compose_yml for portainer. With the actual one it dont open port 7125 for klipper.

Greetings

@DonKracho
Copy link

DonKracho commented Mar 12, 2022

First of all, thank you for the great work.

I have the same issue, but I'm not sure if we need a special compose for prtainer. Im using potainer 2.11.1 on a MeCool M8S Pro W with Armbian installed. I copied the docker-compose.yml content into a custom template and deployed the stack. The fluidd and mainsail containers are running but try to connect to an invalid printer MeCool_IP:8010 respective 8011. Mainsail is unusabe. For Fluidd you can try to add a new printer. An extemal printer is working, but the local klipper container does not answer.

I copied the config files to the moonraker_data volume using WinSCP, but this does not help either. There is no answer to http://MeCool_IP:7125/server/info

I can not get into a container console, the container seems to be restarting continually. The log lists permission errors:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/supervisor/loggers.py", line 98, in emit
msg = self.fmt % record.asdict()
File "/usr/local/lib/python3.10/site-packages/supervisor/loggers.py", line 287, in asdict
now = time.time()
PermissionError: [Errno 1] Operation not permitted
Error: Cannot open an HTTP server: socket.error reported errno.EPERM (1)
For help, use /usr/local/bin/supervisord -h

My docker skills are not sufficient. Any hints what to do?

@DonKracho
Copy link

DonKracho commented Mar 14, 2022

I added a 'privileged: true' line to the klipper service. Not the smartest idea but klipper is able to start now and I can access the container console. I had to copy all config files to .config but these files are not visible in fluidd.

Is the docker-compose.yml missing to propagate the moonraker_data volume to the fluidd and mainsail services or is this achieved by the link statement?

Finally moonraker can not access the .config folder. I did a 'chmod -r a+w .config' but that did not help. Still get a warning:

Moonraker Warnungen gefunden.
Moonraker does not have permission to access path (/home/klippy/.config) for (config).
[machine]: DBus Connection Not available, systemd service tracking and actions are disabled

@piter-pit
Copy link

piter-pit commented Oct 31, 2022

I'm also fighting with this docker to work.
similar case:

  1. Klipper starts
  2. Moonraker fail - missing config file, after coping starts
  3. copied printer.cfg not visible neither in fluidd nor mainsail, in both unable to load the file
File "/home/klippy/moonraker/moonraker/app.py", line 882, in prepare
    fm.check_write_enabled()
  File "/home/klippy/moonraker/moonraker/components/file_manager/file_manager.py", line 199, in check_write_enabled
    raise self.server.error(
utils.ServerError: Write access is currently disabled.  Check notifications for warnings.
[app.py:log_request()] - 500 OPTIONS /server/files/upload (192.168.x.x) [No User] 9.51ms

but I have no idea about what check_write_enabled it says about even when chmod on files and folder done and privileged set to true in docker.
Any ideas?

@erustyrannus
Copy link

erustyrannus commented Nov 2, 2022

Here is my Docker-compose, the container you need to worry about is the Klipper-Moonraker one, the others do not have any data (itself). If you clone this repo you can check the Config folder (I have just redirected it to another path and all is working)

Be sure to copy all the "config" files from this repo to your new path together with your printer.cfg and adjust them following the documentation (cited below).

version: '3.4'
services:
  klipper:
    image: dimalo/klipper-moonraker:latest
    container_name: klipper
    environment:
      - TZ=Europe/Madrid #Change to your Timezone
    ports:
      - 7125:7125
    volumes: #Change path accordingly
      - (Path you want)/klipper/gcode_files:/home/klippy/gcode_files
      - (Path you want)/klipper/config:/home/klippy/.config
      - (Path you want)/klipper/moonraker_data:/home/klippy/.moonraker
    devices:
      - /dev/serial/by-id/device:/dev/serial/by-id/device #You can find this with this command:  ls /dev/serial/by-id/*
    restart: unless-stopped
    
  fluidd:
    image: cadriel/fluidd:latest
    container_name: fluidd
    environment:
      - TZ=Europe/Madrid #Change to your Timezone
    ports:
      - 8010:80
    depends_on: 
      - klipper
    links:
      - klipper:klipper
      
  mainsail:
    image: dimalo/mainsail:latest
    container_name: mainsail
    environment:
      - TZ=Europe/Madrid #Change to your Timezone
    ports:
      - 8011:80
    depends_on: 
      - klipper
    links:
      - klipper:klipper
    restart: unless-stopped

Ensure that the host folder permissions are correct (allowing the user to write, read and execute)

I am still trying to get the webcam to work properly, I have managed to print without issues.

I also recommend you to have a deep read here:
https://moonraker.readthedocs.io/en/latest/configuration/ since this is what controls everything aparently.

PS: I am also new to Klipper.

@piter-pit
Copy link

Hi,
The Docker-compose file is basically the same, but mine is not working.
Maybe it's related to #41 - have to check. Currently I've installed outside the docker as a regular install and it works fine.

@erustyrannus
Copy link

Hi, The Docker-compose file is basically the same, but mine is not working. Maybe it's related to #41 - have to check. Currently I've installed outside the docker as a regular install and it works fine.

For your error I would check the folder permissions on the host. looks like the issue is that.

@piter-pit
Copy link

Hi, The Docker-compose file is basically the same, but mine is not working. Maybe it's related to #41 - have to check. Currently I've installed outside the docker as a regular install and it works fine.

For your error I would check the folder permissions on the host. looks like the issue is that.

I've chmoded files and folders and even set privileged mode so it must be something different.
I think I will stay with installed directly at least for now, maybe in near future I will go with second attempt ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants