-
Notifications
You must be signed in to change notification settings - Fork 74
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
Unable to start mdns: Out of memory #63
Comments
On Tue, Jan 11, 2022 at 01:12:23PM -0800, Remarknl wrote:
I am trying to use ser2net to make a zigbee usb stick available to containers in a kubernetes cluster. However i am stuck with an error that i ony get when running ser2net in a container.
When running in a container i get a `Unable to start mdns: Out of memory` error and ser2net does not start. I can reproduce this on docker, k3s and podman using a container built with the following dockerfile:
```
FROM debian:bookworm-slim
RUN apt update && apt install -y ser2net && rm -rf /var/lib/apt/lists/*
CMD ["ser2net"]
```
That error is probably due to AVAHI not running in the container (thus
MDNS will not work) but it is not fatal. I've fixed it to not print the
error message unless you try to use MDNS. If I run this I get:
***@***.***:~/t2$ docker run --name s1 -i ser2net1 ser2net -d -l -l
Unable to start mdns: Out of memory
ser2net[1]: Unable to open config file '/etc/ser2net/ser2net.yaml' or old one '/etc/ser2net.conf': No such file or directory
There is a file in /etc/ser2net.yaml, if I specify that:
***@***.***:~/t2$ docker run --name s1 -i ser2net1 ser2net -d -l -l -c /etc/ser2net.yaml
Unable to start mdns: Out of memory
and it stays running. I ^C out of that and run it in the background:
***@***.***:~/t2$ docker run --name s1 -d ser2net1 ser2net -d -l -l -c /etc/ser2net.yaml
2eb4f795ade4fbe1472aa77c674a1fde7c9a0e88fca1c6da0603cd22a4c87d81
***@***.***:~/t2$ docker ps | grep ser2net
2eb4f795ade4 ser2net1 "ser2net -d -l -l -c…" 14 seconds ago Up 13 seconds s1
seconds
How did you edit the configuration file? By default there is a file in
/etc/ser2net.yaml, but that's wrong, it should be in
/etc/ser2net/ser2net.yaml. You can try getting an interactive shell in
the container with:
docker run --name s1 -i ser2net1 bash -i
Also, how are you getting to the device in the container? It's not
going to be available unless you tell docker to pass it through.
Is there any reason to run it in a container? That's going to make your
life hard, probably without adding any benefit to you.
…-corey
I tried running `ser2net -d -l -l -c <config file>` in the container as advised in openhab/openhab-core#1511 but there is no additional output.
--
Reply to this email directly or view it on GitHub:
#63
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
Any news on this? |
Im sorry, I didn’t get the chance to access this environment. I will follow up this weekend. In the meantime i used a temporary raspberry pi. I use containers mainly because i want to deploy as much software as possible via containers to the edge and keep my os image as small as possible. I do this by mounting /dev/ttyX and running the container privileged. In the end i am not targeting docker but k8s, that is why i cant use the —device option. If i get this working, i can contribute dockerfiles, compose-files, kubernetes resources and documentation to go with it. Would you be interested in that? |
I found the problem. Long story short: In the dockerfile you have to add the -d parameter or the process will exit with code 1. |
On Sun, Jan 23, 2022 at 08:24:11AM -0800, Remarknl wrote:
I found the problem. Long story short: In the dockerfile you have to add the -d parameter or the process will exit with code 1.
I only used that parameter during debugging. Although you pointed me in the right direction i want to say i am sorry i frankly wasted your time.
Oh, yeah, it daemonizes automatically unless you turn that off. I don't
have a lot of practical experience using containers, but hopefully this
will help anyone else who has the same problem. Thanks.
…-corey
|
I am trying to use ser2net to make a zigbee usb stick available to containers in a kubernetes cluster. However i am stuck with an error that i ony get when running ser2net in a container.
When running in a container i get a
Unable to start mdns: Out of memory
error and ser2net does not start. I can reproduce this on docker, k3s and podman using a container built with the following dockerfile:I tried running
ser2net -d -l -l -c <config file>
in the container as advised in openhab/openhab-core#1511 but there is no additional output.The text was updated successfully, but these errors were encountered: