Comments (7)
I also experience the same :(
my guessing is that during key generation, the system boot for some reason, causing the generated key got no chance to write to disk, hence result in the following errors
from k3s.
During the startup process, the file /var/lib/rancher/k3s/agent/containerd/peer.key is generated but its content is empty
May 15 06:36:21 node7 k3s[1819]: time="2024-05-15T06:36:21Z" level=fatal msg="failed to start embedded registry: failed to load or generate p2p private key: error loading key from /var/lib/rancher/k3s/agent/containerd/peer.key: <nil>"
This error is coming from https://github.com/rancher/dynamiclistener/blob/e590d58b896cc8dd33dde7cec80c52e23ec08189/cert/io.go#L89 - the message suggests that the file was created by a previous startup of k3s, but for some reason the file contents have been lost. Your best bet is probably to just delete the file from disk and let it be recreated on startup. You might be able to find other errors in the logs to suggest why the file has no contents or its contents are corrupted, but given that this node is also rebooting unexpectedly, I suspect that you may have lost data from your filesystem when the system crashed.
When I attempt to delete the /var/lib/rancher/k3s/agent/containerd/peer.key file and then restart the k3s-agent, the system immediately freezes and then reboots.
That sounds like a problem with your node; K3s shouldn't be capable of doing anything that would cause it to panic and reboot. You'll need to figure that out on your own.
from k3s.
@brandon agree with you! I manage to switch to an openrc system and test the same k3s version, all work as expected. systemd seems playing devil here. :(
from k3s.
strange, when rolling back to 1.28.6, it runs ok with no issue.
from k3s.
I have found another potential cause. As I understand, when running with systemd, the cgroup driver should be systemd, however, I found k3s mistaken it as cgroupfs, not sure if this is the issue.
from k3s.
I'm not aware of any defect in k3s that would cause it to use cgroupfs instead of systemd, when using the embedded containerd on a systemd-based OS. You're not trying to use docker or another user-provided container runtime, are you?
from k3s.
no, I use kairos from https://github.com/kairos-io/kairos/, which should have no other runtime available. In addition to that, I add some additional printout and find
ARN[0002] isRunningInUserNS=false, cgroup controller map[cpu:true cpuset:true hugetlb:true io:true memory:true misc:true pids:true rdma:true], INVOCATION_ID=
INVOCATION_ID is empty, something go wrong with systemd, it should set this value.
This is very likely systemd issue in their distribution, I will shout out loud there. :D
from k3s.
Related Issues (20)
- [Release-1.29] - k3s crashes if I do not start the cloud-provider
- [Release-1.28] - k3s crashes if I do not start the cloud-provider
- [Release-1.27] - k3s crashes if I do not start the cloud-provider
- Health checks may remove all available servers from load-balancer under high load HOT 1
- [Release-1.29] - Health checks may remove all available servers from load-balancer under high load
- [Release-1.28] - Health checks may remove all available servers from load-balancer under high load HOT 1
- [Release-1.27] - Health checks may remove all available servers from load-balancer under high load HOT 1
- [Release-1.29] - Image pulls from embedded registry fail if --bind-address is set (and not 127.0.0.1)
- [Release-1.28] - Image pulls from embedded registry fail if --bind-address is set (and not 127.0.0.1)
- [Release-1.27] - Image pulls from embedded registry fail if --bind-address is set (and not 127.0.0.1)
- Fatal problems caused by k3s should be paid attention to
- TLS handshake remote error: tls: bad certificate HOT 2
- k3s is unable to start after stopped for a while HOT 3
- upgradeaware.go:425 Error proxying data from client to backend HOT 3
- Embedded registry mirror is broken on master HOT 1
- [Release-1.29] - New k3s server flag: --write-kubeconfig-own or --write-kubeconfig-group HOT 1
- [Release-1.28] - New k3s server flag: --write-kubeconfig-own or --write-kubeconfig-group HOT 1
- [Release-1.27] - New k3s server flag: --write-kubeconfig-own or --write-kubeconfig-group HOT 1
- Install script fails to install v1.28.5 when version is specified HOT 1
- k3s is unable to start sidecar container HOT 4
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 k3s.