docker-pivpn icon indicating copy to clipboard operation
docker-pivpn copied to clipboard

Error response from daemon: Container [id] is not running after entering PiVPN user password

Open SeanChristopherConway opened this issue 8 years ago • 16 comments
trafficstars

I am running the bash script on a clean install of Raspbian Stretch using Docker. For some reason it says the container is not running. When I run docker ps there is no container running. I am fairly new to Docker so perhaps I am doing something wrong, but it is not clear to me if simply running your script and having Docker installed was all I needed to do. Thanks!

SeanChristopherConway avatar Oct 16 '17 22:10 SeanChristopherConway

Did you answer the prompts?

InnovativeInventor avatar Oct 17 '17 00:10 InnovativeInventor

Yes, everything. Although it seems to hang for a long time when I choose my port.

SeanChristopherConway avatar Oct 17 '17 04:10 SeanChristopherConway

Hi, I have got the same issue. When i check the docker logs, it says : standard_init_linux.go:178: exec user process caused "exec format error"

Seems that one of the executable if not from the right format ?

Isn't it due to the fact that you DockerImage is built from "FROM ubuntu:16.04" whereas it shall be built from an arm-based rpi image ?

ragefan avatar Oct 26 '17 13:10 ragefan

I'm trying to hunt down the problem, and from this thread: https://github.com/moby/moby/issues/23865, it looks like when docker isn't installed (it installs it for you), my script accidentally installed the non-arm compatible version of docker. I'll comment out the automatic docker install part of the script while I fix it. Tell me if it works.

On Thu, Oct 26, 2017 at 9:46 AM ragefan [email protected] wrote:

Hi, I have got the same issue. When i check the docker logs, it says : standard_init_linux.go:178: exec user process caused "exec format error"

Seems that one of the executable if not from the right format ?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/InnovativeInventor/docker-pivpn/issues/2#issuecomment-339671021, or mute the thread https://github.com/notifications/unsubscribe-auth/ATL3oa4IJRGUCc8myuaZkFU0w3qZE9wzks5swI0wgaJpZM4P7Vpj .

InnovativeInventor avatar Oct 27 '17 01:10 InnovativeInventor

I'm trying to clean up all of my code, so the code will look a lot different in when I'm done and should be easier to manage.

On Thu, Oct 26, 2017 at 9:16 PM Max Fan [email protected] wrote:

I'm trying to hunt down the problem, and from this thread: https://github.com/moby/moby/issues/23865, it looks like when docker isn't installed (it installs it for you), my script accidentally installed the non-arm compatible version of docker. I'll comment out the automatic docker install part of the script while I fix it. Tell me if it works.

On Thu, Oct 26, 2017 at 9:46 AM ragefan [email protected] wrote:

Hi, I have got the same issue. When i check the docker logs, it says : standard_init_linux.go:178: exec user process caused "exec format error"

Seems that one of the executable if not from the right format ?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/InnovativeInventor/docker-pivpn/issues/2#issuecomment-339671021, or mute the thread https://github.com/notifications/unsubscribe-auth/ATL3oa4IJRGUCc8myuaZkFU0w3qZE9wzks5swI0wgaJpZM4P7Vpj .

InnovativeInventor avatar Oct 27 '17 01:10 InnovativeInventor

Well actually, Docker is already installed on my raspberry so i'm not sure the issue is coming from that. Are you sure of the base image of the Docker container ?

The error i mentionned before (exec format) are coming from the following lines

docker exec $DOCKER curl -s -L https://install.pivpn.io -o /usr/bin/pivpn docker exec $DOCKER chmod +x /usr/bin/pivpn docker exec $DOCKER usermod -aG sudo root

ragefan avatar Oct 28 '17 09:10 ragefan

Yeah. Here is the image that my docker image is based on FROM ubuntu:16.04 Does ubuntu 16.0.4's docker image work on the Raspberry pi? It does say that it supports ARM.

On Sat, Oct 28, 2017 at 5:19 AM ragefan [email protected] wrote:

Well actually, Docker is already installed on my raspberry so i'm not sure the issue is coming from that. Are you sure of the base image of the Docker container ?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/InnovativeInventor/docker-pivpn/issues/2#issuecomment-340164265, or mute the thread https://github.com/notifications/unsubscribe-auth/ATL3oaAavPPRYtAnJ3VTnIjDppte019Qks5swvG4gaJpZM4P7Vpj .

InnovativeInventor avatar Oct 28 '17 13:10 InnovativeInventor

No it is not ! Because this is a x64 image. Raspberry pi needs armf images. You shall use this one i think : https://hub.docker.com/r/armv7/armhf-ubuntu/

=> This can explain the exec format error

ragefan avatar Oct 28 '17 13:10 ragefan

I tested with a modified DockerFile and i don't have the exec issues anymore. I can reach the steps up to have the pivpn install interface. pivpn starts installing and then suddenetly existing while configuring openvpn. Are you interested in the modified Dockerfile that works with raspberry pi ?

ragefan avatar Oct 29 '17 12:10 ragefan

Yes. That dockerfile sounds like a great idea. When running on ARM, we'll use the modified docker file, and when running on amd64, we'll use the current one. On Sun, Oct 29, 2017 at 8:52 AM ragefan [email protected] wrote:

I tested with a modified DockerFile and i don't have the exec issues anymore. I can reach the steps up to have the pivpn install interface. pivpn starts installing and then suddenetly existing while configuring openvpn. Are you interested in the modified Dockerfile that works with raspberry pi ?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/InnovativeInventor/docker-pivpn/issues/2#issuecomment-340260212, or mute the thread https://github.com/notifications/unsubscribe-auth/ATL3ocMcMPlzilE3940RqvYoe_A1MUHmks5sxHTwgaJpZM4P7Vpj .

InnovativeInventor avatar Oct 29 '17 18:10 InnovativeInventor

@ragefan @SeanChristopherConway I've completely redid the scripts, so they should work. Please tell me if it does.

InnovativeInventor avatar Dec 18 '17 23:12 InnovativeInventor

Hi, Sorry for my late reply. I just tried again 👍 Got the following : setup.sh: ligne 179: warning :command substitution: ignored null byte in input

Actually and anyways, the dockerfile you delivered is not for arm image standard_init_linux.go:178: exec user process caused "exec format error"

(i tried on a rasapberry pi 2)

I will try to update it

ragefan avatar Jan 20 '18 13:01 ragefan

I confirm the code is not working at all on a raspberry pi2. Would need to restart the whole Docker packaging from another image (i tried debian arm) and even modify pivpn setup scripts to make it work. Still did not suceedeed yet due to systemctl call in the pivpn setup script :(

ragefan avatar Jan 21 '18 14:01 ragefan

For some reason, the resin/rpi-raspbian image is no longer working (requires a Docker login?). I modified the Dockerfile and rebuilt (required some changed to your setup.sh, found some bugs), using "FROM resin/raspberry-pi-debian" (which is the image that the rpi-raspbian is aliased to). That seemed to work. Though, going forward, Resin is changing/breaking the armhf tag, instead using the tags armv6hf and armv7hf. Now Pi2 and Pi3 use a different Resin base image (armv7hf) than Pi1/0.

ScooterComputer avatar Feb 07 '18 20:02 ScooterComputer

Great! Pull requests are always welcome!

InnovativeInventor avatar Feb 10 '18 03:02 InnovativeInventor

It looks like armv7hf might be backwards-compatible with armv6hf, although I'm not 100% sure about that.

InnovativeInventor avatar Feb 16 '18 16:02 InnovativeInventor