Can't do any exec commands in container: Error: EOF

I can use some help debugging this, since I’ve no clue where to start.
When I start my containers I can execute commands in it via “lxc exec container bash”.
After a while (doesn’t look like a fixed time out or so), those commands will return into : Error: EOF
Starting the command in verbose and debug (lxc -v --debug exec container bash) doesn’t reveal any difference with when executing it while it’s still working (except for the Error: EOF).

The /var/snap/lxd/common/lxd/logs/lxd.log show something like : “Failed to retrieve PID of executing child process: EOF”. Which sounds strange, since when doing “lxc info container” it shows the PID?

NB: is it normal that log files under /var/snap/lxd/common/lxd/logs get’s deleted over time? When you just start the container it creates a directory here with it logging in there, but there’s no directories of my running containers there anymore. Once I start an exec (which fails) it creates it again and in the fork_exec.log it shows then: Error: Error opening startup config file: “loading config file for the container failed” . Which also looks weird, because I can do a “lxc config show container” without problems.

I am bit clueless :frowning:
Running on ubuntu 18.10/18.04 with snap 3.13 10756 with ZFS backend

edit: The container itself is running just fine and I can ssh into it etc…

There is a report of this on GitHub but did not get a reproducible example. By restarting the container once or twice, you could workaround the issue.

I got the same issue recently as well.
The common denominator was using LXD projects. Do you use LXD projects in this case?

1 Like

Hi Simos,

Yes I am using projects, so for now or don’t use projects or restart container if you really need to do lxc exec …
I am using the latter to upgrade all my running containers, so have to change that to ssh/pubkeys then.

Thanks for your reply…couldn’t find a related github issue, but if you say so :wink:

Here is the report, https://github.com/lxc/lxd/issues/5188

I googled with “LXD issues error EOF” to get there.

1 Like

Hmm so google is better than searching within github itself
Thanks for the link…I’ll keep an eye on it