Infinite container restarts

I have tried installing https://github.com/balena-io-projects/balena-wpe. But the container just keeps restarting.

On the host os:
`root@9dd686d:~# balena ps

    CONTAINER ID        IMAGE                               COMMAND             CREATED             STATUS                          PORTS               NAMES
    2ea2a4dfc46e        5b76174cbce2                        "/wpe-init"         4 minutes ago       Restarting (0) 45 seconds ago                       main_1097429_891290
    62752de47cd5        balena/armv7hf-supervisor:v9.11.3   "./entry.sh"        3 weeks ago         Up 18 minutes (healthy)                             resin_supervisor`

And the logs on the dashboard:
22.04.19 19:45:29 (+0000) Restarting service 'main sha256:5b76174cbce2b5fbf50b888c31f1199945985ff6b4b45138176b27aea66186ad' 22.04.19 19:45:30 (+0000) Service exited 'main sha256:5b76174cbce2b5fbf50b888c31f1199945985ff6b4b45138176b27aea66186ad' 22.04.19 19:46:31 (+0000) Restarting service 'main sha256:5b76174cbce2b5fbf50b888c31f1199945985ff6b4b45138176b27aea66186ad' 22.04.19 19:46:32 (+0000) Service exited 'main sha256:5b76174cbce2b5fbf50b888c31f1199945985ff6b4b45138176b27aea66186ad' 22.04.19 19:47:37 (+0000) Restarting service 'main sha256:5b76174cbce2b5fbf50b888c31f1199945985ff6b4b45138176b27aea66186ad' 22.04.19 19:47:37 (+0000) Service exited 'main sha256:5b76174cbce2b5fbf50b888c31f1199945985ff6b4b45138176b27aea66186ad' 22.04.19 19:48:39 (+0000) Restarting service 'main sha256:5b76174cbce2b5fbf50b888c31f1199945985ff6b4b45138176b27aea66186ad' 22.04.19 19:48:41 (+0000) Service exited 'main sha256:5b76174cbce2b5fbf50b888c31f1199945985ff6b4b45138176b27aea66186ad' 22.04.19 19:49:45 (+0000) Restarting service 'main sha256:5b76174cbce2b5fbf50b888c31f1199945985ff6b4b45138176b27aea66186ad' 22.04.19 19:49:48 (+0000) Service exited 'main sha256:5b76174cbce2b5fbf50b888c31f1199945985ff6b4b45138176b27aea66186ad'

(and so forth)

How can I debug this? The container stops when I try to start it, no logs printed. Not sure how to get into the container and see what’s going on.

Thanks
Michael

Well, I am not sure how much this will help you.

But if you want it to pause long enough to ssh into the container, maybe add a:

sleep(600)

on the second line of /wpe-init
This would give you time to get into the container to poke around a bit.

I have no experience with that project so I can’t really recommend anything further.
-Thomas

Even if the container is crash-looping, you should be able to run:
balena logs 2ea2a4dfc46e
from the host OS and possibly get some output.

I can, but there is no logging at all.

Good idea, I will try that and investigate. Thanks.

Solved the problem. Turns out there was a rogue & at the end of the wpe-init.sh which caused the container to believe everything was finished. :lying_face:

1 Like