Comments (12)
Hi there,
I could not reproduce the described behaviour with the current nightly build, which is 0a2c190 as of writing this comment.
Please execute the following commands to find out which Image Tags you are actually using and add them to your reply:
docker exec klipper cat /opt/klipper/.git/HEAD | cut -c 1-7
docker exec moonraker cat /opt/moonraker/.git/HEAD | cut -c 1-7
Please also attach your klippy.log and moonraker.log.
These Files should be located in /var/lib/docker/volumes/prind_log/_data/
on your machine.
-Markus
from prind.
Thank you for the fast reply.
docker exec klipper cat /opt/klipper/.git/HEAD | cut -c 1-7:
7c964e5
docker exec moonraker cat /opt/moonraker/.git/HEAD | cut -c 1-7:
Error response from
daemon: Container 2a62ea877bfb45cef5864497c56de4b7038b3ea29217c33ca4b0aab510a39194 is restarting, wait until the container is running
from prind.
Image from moonraker was created on 2022-02-25 03:55:45 (Info from Portainer)
from prind.
Moonraker restarting is a symptom of a nonworking klipper process.
Looking at the provided klippy.log, we can see the following error in line 7 and no further logs.
[...]
Unable to build C code module (error=32512)
This is unusual, as the C code modules are compiled when building the klipper image.
prind/docker/klipper/Dockerfile
Lines 15 to 16 in df3199f
I started mkuf/klipper:7c964e5
(the same image as yours) and it worked as expected.
I'm currently not able to reproduce this error.
You could try to stop your stack, prune all Images and re-pull them again but this is grasping for straws.
from prind.
@Jodameister
Are you using a 64bit OS on your Pi?
from prind.
32bit
from prind.
Try to run the Image without any volumes or config.
docker run --rm mkuf/klipper:7c964e5
This should yield the following error message, without any mention of C builds.
INFO:root:Starting Klippy...
WARNING:root:No log file specified! Severe timing issues may result!
INFO:root:Start printer at Fri Feb 25 21:56:27 2022 (1645826187.4 7756.3)
ERROR:root:Unable to open config file cfg/printer.cfg
Traceback (most recent call last):
File "/opt/klipper/klippy/configfile.py", line 153, in _read_config_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: 'cfg/printer.cfg'
ERROR:root:Config error
Traceback (most recent call last):
File "klipper/klippy/klippy.py", line 157, in _connect
self._read_config()
File "klipper/klippy/klippy.py", line 134, in _read_config
config = pconfig.read_main_config()
File "/opt/klipper/klippy/configfile.py", line 274, in read_main_config
data = self._read_config_file(filename)
File "/opt/klipper/klippy/configfile.py", line 159, in _read_config_file
raise error(msg)
Error: Unable to open config file cfg/printer.cfg
from prind.
For the sake of testing, I removed the two lines from the klipper dockerfile that are responsible for compiling the C code in my local branch and built an image for 7c964e5
.
Running this image without any config yields the following error
markus@colossus:~/prind$ docker run --rm -it 11ea364c0312
INFO:root:Starting Klippy...
WARNING:root:No log file specified! Severe timing issues may result!
INFO:root:Building C code module c_helper.so
sh: 1: gcc: not found
ERROR:root:Unable to build C code module (error=32512)
Traceback (most recent call last):
File "klipper/klippy/klippy.py", line 369, in <module>
main()
File "klipper/klippy/klippy.py", line 351, in main
main_reactor = reactor.Reactor(gc_checking=True)
File "/opt/klipper/klippy/reactor.py", line 288, in __init__
SelectReactor.__init__(self, gc_checking)
File "/opt/klipper/klippy/reactor.py", line 99, in __init__
self.monotonic = chelper.get_ffi()[1].get_monotonic
File "/opt/klipper/klippy/chelper/__init__.py", line 270, in get_ffi
do_build_code(cmd % (destlib, ' '.join(srcfiles)))
File "/opt/klipper/klippy/chelper/__init__.py", line 246, in do_build_code
raise Exception(msg)
Exception: Unable to build C code module (error=32512)
The actual errorcode seems to be the same, but your provided log is missing the line about gcc that is used to compile the modules.
[...]
INFO:root:Building C code module c_helper.so
sh: 1: gcc: not found
ERROR:root:Unable to build C code module (error=32512)
[...]
from prind.
Try to run the Image without any volumes or config.
docker run --rm mkuf/klipper:7c964e5
This should yield the following error message, without any mention of C builds.
INFO:root:Starting Klippy... WARNING:root:No log file specified! Severe timing issues may result! INFO:root:Start printer at Fri Feb 25 21:56:27 2022 (1645826187.4 7756.3) ERROR:root:Unable to open config file cfg/printer.cfg Traceback (most recent call last): File "/opt/klipper/klippy/configfile.py", line 153, in _read_config_file f = open(filename, 'r') IOError: [Errno 2] No such file or directory: 'cfg/printer.cfg' ERROR:root:Config error Traceback (most recent call last): File "klipper/klippy/klippy.py", line 157, in _connect self._read_config() File "klipper/klippy/klippy.py", line 134, in _read_config config = pconfig.read_main_config() File "/opt/klipper/klippy/configfile.py", line 274, in read_main_config data = self._read_config_file(filename) File "/opt/klipper/klippy/configfile.py", line 159, in _read_config_file raise error(msg) Error: Unable to open config file cfg/printer.cfg
I can confirm there is no C-builds error, when I do this:
INFO:root:Starting Klippy...
WARNING:root:No log file specified! Severe timing issues may result!
INFO:root:Start printer at Sat Feb 26 06:25:32 2022 (1645856732.9 120846.2)
ERROR:root:Unable to open config file cfg/printer.cfg
Traceback (most recent call last):
File "/opt/klipper/klippy/configfile.py", line 153, in _read_config_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: 'cfg/printer.cfg'
ERROR:root:Config error
Traceback (most recent call last):
File "klipper/klippy/klippy.py", line 157, in _connect
self._read_config()
File "klipper/klippy/klippy.py", line 134, in _read_config
config = pconfig.read_main_config()
File "/opt/klipper/klippy/configfile.py", line 274, in read_main_config
data = self._read_config_file(filename)
File "/opt/klipper/klippy/configfile.py", line 159, in _read_config_file
raise error(msg)
Error: Unable to open config file cfg/printer.cfg
from prind.
Here is my printer.cfg:
# This file is an example config file.
# See https://github.com/Klipper3d/klipper/blob/master/docs/Config_Reference.md for a description of parameters.
###### Printer Config
[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
endstop_pin: ^PA7
position_endstop: 0.0
position_max: 250
[extruder]
max_extrude_only_distance: 100.0
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 34.406
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
# tuned for stock hardware with 200 degree Celsius target
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
# tuned for stock hardware with 50 degree Celsius target
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: PA0
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
###### Klipper
[virtual_sdcard]
path: /opt/gcode
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CANCEL_PRINT_BASE
from prind.
I can confirm there is no C-builds error, when I do this:
This is really strange. The C modules are compiled before the config file is even loaded, so it should should trigger the same error on your system as with starting it through compose.
I had to rebuild the current nightly Image for klipper because of an unrelated issue.
Would you mind trying to start klipper with the image explicitly set to mkuf/klipper:7c964e5
?
Please make sure that you delete all klipper images on your machine beforehand, as the new Image is using the same Tag as before, docker would otherwise not re-pull it from the registry.
docker compose --profile fluidd down
docker image prune -af
docker compose --profile fluidd up -d klipper
Let me know if anything in the klippy.log file changed with the new Image.
-Markus
from prind.
Is this still relevant @Jodameister ?
from prind.
Related Issues (20)
- No webcam in OrcaSlicer HOT 7
- Klippain Support HOT 2
- [Feature] Add support for monitoring the containers HOT 1
- Latest version-tagged moonraker (`v0.8.0`) is out of date HOT 6
- TIMELAPSE not working due to local webcam url not being accessable inside moonraker container (probably) HOT 2
- [timelapse.py:getWebcamConfig()] - WARNING: no camera configured, using the fallback config HOT 2
- ustreamer not working? HOT 6
- Dependency Dashboard
- moonraker-telegram-bot config in docker-compose.yaml needs update HOT 9
- Missing GIT for Update Manager HOT 6
- Action Required: Fix Renovate Configuration
- Unable to Connect mainsail to printer ( Serial name/ Serial permissions?) HOT 1
- Klipper container missing dependency? HOT 9
- Moonraker crash after update HOT 2
- Guide Assistance HOT 1
- Fatal Python error: PyGILState_Release: auto-releasing thread-state, but no thread-state for this thread HOT 5
- [Documentation enhance] Webcam setup HOT 1
- Slow webcam HOT 1
- apprise for moonraker notification HOT 2
- Not compatible with Portainer HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prind.