ByteInternet / hypernode-docker

Fast and easy Docker for Magento development
https://community.hypernode.io/hypernode-docker
35 stars 8 forks source link

docker closes existing connection #26

Closed SolsWebdesign closed 5 years ago

SolsWebdesign commented 5 years ago

Hi, I have docker installed on Windows 10 Pro and use hypernode-docker latest. It will run fine for some time and then suddenly it will close the connection:

app@644bc0819179:~/testshop.hypernode.local/magento2$ Connection to localhost closed by remote host. Connection to localhost closed.

Docker logs don't give any useful information so I'm a bit lost where to go looking for a solution. It only happens with the hypernode-docker. My other containers run fine all day long if I let them.

Some more information: the container still shows as running but I can't log in anymore and the shop will not refresh in the browser but gives a time out. I have to stop the container and start again. Sometimes that is not even enough and I have to stop the container and restart Docker.

vdloo commented 5 years ago

HI @SolsWebdesign, I haven't heard about this one before. I personally haven't done anything with windows in a long time so I'm afraid I wouldn't know how to help you with this. Maybe it would help if you could debug some more. Can you attach to the unresponsive container using docker exec -i -t container_name /bin/bash and then poke around in it a bit maybe? Is the SSH service still running? Maybe there are some logs somewhere

SolsWebdesign commented 5 years ago

Hi @vdloo thank you for your quick reply. Sadly it still runs but is not reachable in any way. I have tried with your command: OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caused "exec: \"bin/bash/": executable file not found in $PATH": unknown or with the dir that I use within de container: OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caused "exec: \"data/web\": permission denied": unknown mostly what I try ends in permission denied or time out...

I can get a bit of logs with docker logs container_name last bit: ... Giving the new services a couple of seconds to start.. hypernode-docker status: everything ok Running /etc/rc.local... Booting runit daemon... *** Runit started as PID 348 nothing much there... it seems to.... crash and that seems to produce no logging or something I am totally in the dark here.

Could it have something to do with the size of my docker hypernode container? It is seriously large compared to my symfony containers. I'm thinking it simply runs out of memory after some time...

vdloo commented 5 years ago

it says "bin/bash", did you miss the "/bin/bash" first slash perhaps?

SolsWebdesign commented 5 years ago

No, just bad at typing in a hurry.

If it runs and it has not closed its connection I can enter using $ winpty docker exec -i -t projects //bin/bash note the extra slash and winpty

if I leave the extra slash off I will get an error like OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caused "exec: \"C:/Program Files (x86)/Git/usr/bin/bash.exe\": stat C:/Program Files (x86)/ Git/usr/bin/bash.exe: no such file or directory": unknown

but as soon as it closes the connection I can not enter anymore with the above command. I get permission denied or time out.

I have tried to run the container and open another git bash with winpty docker exec -i -t projects //bin/bash and then wait... then when the docker closes the connection I am still in the root@644...

I can then try some of the logs but up till now most are filled with standard stuff or a lot of ^@^@^@^@^@

Here is my bit of poking around: root@644bc0819179 /var/log # ls -a . apt bootstrap.log cron.log.1 debug dpkg.log fontconfig.log lastlog messages.1 ntpstats redis syslog.1 user.log.1 .. auth.log btmp daemon.log debug.1 error fsck mail.log mysql php-fpm sphinxsearch sysstat varnish alternatives.log auth.log.1 cron.log daemon.log.1 dmesg faillog hypernode messages nginx proftpd syslog user.log wtmp root@644bc0819179 /var/log # nano daemon.log root@644bc0819179 /var/log # nano lastlog root@644bc0819179 /var/log # nano faillog root@644bc0819179 /var/log # nano auth.log root@644bc0819179 /var/log # nano error

any ideas which log I could find something in? this is what I can reach if I'm on time

root@644bc0819179 / # ls -a . .. bd_build bin boot data dev .dockerenv etc home lib lib64 .log-courier media mnt nonexistent opt proc root run sbin srv sys tmp usr var

vdloo commented 5 years ago

You can try 'dmesg' to see if you get out of memory killed. Not sure if those logs are exposed to the container on Windows by default though. Otherwise try listing the free memory with 'free -m -h' to see if it might be that.

Sent from my iPhone

On 6 Mar 2019, at 18:09, Isolde notifications@github.com wrote:

No, just bad at typing in a hurry.

If it runs and it has not closed its connection I can enter using $ winpty docker exec -i -t projects //bin/bash note the extra slash and winpty

if I leave the extra slash off I will get an error like OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caused "exec: "C:/Program Files (x86)/Git/usr/bin/bash.exe": stat C:/Program Files (x86)/ Git/usr/bin/bash.exe: no such file or directory": unknown

but as soon as it closes the connection I can not enter anymore with the above command. I get permission denied or time out.

I have tried to run the container and open another git bash with winpty docker exec -i -t projects //bin/bash and then wait... then when the docker closes the connection I am still in the root@644...

I can then try some of the logs but up till now most are filled with standard stuff or a lot of ^@^@^@^@^@

Here is my bit of poking around: root@644bc0819179 /var/log # ls -a . apt bootstrap.log cron.log.1 debug dpkg.log fontconfig.log lastlog messages.1 ntpstats redis syslog.1 user.log.1 .. auth.log btmp daemon.log debug.1 error fsck mail.log mysql php-fpm sphinxsearch sysstat varnish alternatives.log auth.log.1 cron.log daemon.log.1 dmesg faillog hypernode messages nginx proftpd syslog user.log wtmp root@644bc0819179 /var/log # nano daemon.log root@644bc0819179 /var/log # nano lastlog root@644bc0819179 /var/log # nano faillog root@644bc0819179 /var/log # nano auth.log root@644bc0819179 /var/log # nano error

any ideas which log I could find something in? this is what I can reach if I'm on time

root@644bc0819179 / # ls -a . .. bd_build bin boot data dev .dockerenv etc home lib lib64 .log-courier media mnt nonexistent opt proc root run sbin srv sys tmp usr var

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

SolsWebdesign commented 5 years ago

I will try that and let you know :-)

SolsWebdesign commented 5 years ago

I am going to close this issue: I just could not get it to work on that laptop I think it was a serious memory / performance issue. It works so much better on this laptop. Thank you for docker hypernode, I can't imagine development without it anymore.