# general


12/25/2022, 9:15 PM
Hey friends, I'm trying to play with k3s with qemu/alpine and I'm hitting a failure at startup and I'm trying to figure out what exactly is causing the issue. When I try to init the cluster I get an error like this:
Copy code
# k3s server --cluster-init
FATA[0000] starting kubernetes: preparing server: start managed database: listen tcp bind: cannot assign requested address
Seems like most folks hit this issue trying to run in docker, which the resolution is to open the external port. I've tried adding similar settings in qemu to forward the port to the host, but that has not improved anything. It seems lightly weird to me that I'd need to expose ports to just run a single instance, but I'm not well versed in any of this tech, so eh. I'm not sure what next to try or where to look for other logs for more information. I've tried increasing the log output, but that did not add any information thus far.
Copy code
Tom Kerr <>
3:07 PM (8 minutes ago)
to me
# k3s server --cluster-init
INFO[0000] Starting k3s v1.26.0+k3s1 (AlpineLinux)
INFO[0000] Managed etcd cluster initializing
INFO[0000] Starting etcd for new cluster
{"level":"info","ts":"2022-12-25T21:05:34.612Z","caller":"embed/etcd.go:124","msg":"configuring peer listeners","listen-peer-urls":["<>","<>"]}
{"level":"info","ts":"2022-12-25T21:05:34.614Z","caller":"embed/etcd.go:482","msg":"starting with peer TLS","tls-info":"cert = /var/lib/rancher/k3s/server/tls/etcd/peer-server-client.crt, key = /var/lib/rancher/k3s/server/tls/etcd/}
{"level":"info","ts":"2022-12-25T21:05:34.619Z","caller":"embed/etcd.go:371","msg":"closing etcd server","name":"localhost-638b94b2","data-dir":"/var/lib/rancher/k3s/server/db/etcd","advertise-peer-urls":["<>"],"advertise-client-url}
{"level":"info","ts":"2022-12-25T21:05:34.622Z","caller":"embed/etcd.go:373","msg":"closed etcd server","name":"localhost-638b94b2","data-dir":"/var/lib/rancher/k3s/server/db/etcd","advertise-peer-urls":["<>"],"advertise-client-urls}
INFO[0000] certificate CN=k3s,O=k3s signed by CN=k3s-server-ca@1672002325: notBefore=2022-12-25 21:05:25 +0000 UTC notAfter=2023-12-25 21:05:34 +0000 UTC
WARN[0000] dynamiclistener no cached certificate available for preload - deferring certificate load until storage initialization or first client request
FATA[0000] starting kubernetes: preparing server: start managed database: listen tcp bind: cannot assign requested address


12/26/2022, 2:18 AM
Copy code
listen tcp bind: cannot assign requested address
Do you somehow not have an ipv4 loopback address configured!?
I am not sure how you can fail to assign


12/26/2022, 3:01 AM
at first blush that looks to be true, I did not consider that alpine was quite that minimal. thanks for the rubber duck!
Yea, that was the problem. Fixed that and cgroups and now I'm onto other weird things. Now its spinning on this, which I'm guessing is probably a symptom of something else.
Waiting for control-plane node localhost startup: nodes "localhost" not found
seems like that was because cni stuff wasn't setup right
Now I'm seeing errors about resources and eviction so I think that's probably because I didn't give the VM enough ram maybe. Thanks again for help!