Skip to content
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

My container automatically exited same docker image i have used in a another host machine their it is working fine #5129

Open
kishorpacefin opened this issue Jun 7, 2024 · 2 comments

Comments

@kishorpacefin
Copy link

Description

Hi
i have ran multiple container on my host machine those are mysql , and npm container . after running some time it is automatically exited , but same image i am ruuning on another machine it is running fine.

here are the exited conatiner list
sudo docker ps -a
CONTAINER ID   IMAGE                                                               COMMAND                  CREATED        STATUS                    PORTS     NAMES
17151cba6b48   mysql:5.7                                                           "docker-entrypoint.s…"   21 hours ago   Exited (0) 12 hours ago             database
db3684ddecf1   pocketful-landing-page-next:2.0.11-f705a08   "docker-entrypoint.s…"   22 hours ago   Exited (0) 12 hours ago             landingpage-next
f351665d9faa  seo-tools:1.0.10-19f1b50                     "docker-entrypoint.s…"   22 hours ago   Exited (1) 12 hours ago             seo-tool
69e8d619a5e3   seo-web:1.0.10-bf73fbd                       "docker-entrypoint.s…"   23 hours ago   Exited (1) 12 hours ago             calc

here i am proving the logs by running again this container and it is not exited yet and getting this error and i am able to access this application server which is running inside this container . but it will exited after sometime automatically and i don't have logs of already exited container .

> [email protected] start
> env-cmd -e local next start -p 3000

   ▲ Next.js 14.1.0
   - Local:        http:https://localhost:3000

 ✓ Ready in 403ms

 ⚠ metadata.metadataBase is not set for resolving social open graph or twitter images, using "http:https://localhost:3000". 
 ⚠ The "images.domains" configuration is deprecated. Please use "images.remotePatterns" configuration instead.
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice To update run: npm install -g [email protected]
npm notice
npm error path /app
npm error command failed
npm error signal SIGTERM
npm error command sh -c env-cmd -e local next start -p 3000

npm error A complete log of this run can be found in: /root/.npm/_logs/2024-06-06T06_34_07_377Z-debug-0.log

and i have checked inside docker container where my container got exited and got this npm file

~/.npm/_logs # ls -ltr
total 124
-rw-r–r-- 1 root root 118052 May 29 07:32 2024-05-29T07_32_13_618Z-debug-0.log
-rw-r–r-- 1 root root 577 May 29 07:34 2024-05-29T07_32_38_012Z-debug-0.log
-rw-r–r-- 1 root root 587 Jun 7 05:22 2024-06-07T05_22_57_816Z-debug-0.log

but in logs showing this file is not present “npm error A complete log of this run can be found in: /root/.npm/_logs/2024-06-06T06_34_07_377Z-debug-0.log” which i don;t know why, may be it is not able to write this file inside conatiner.
i have checked this file is not present inside my conatiner and also host machine “/root/.npm/_logs/2024-06-06T06_34_07_377Z-debug-0.log”

i have checked inisde my conatiner npm is present but inside host machine npm is not present

here is the docker service logs which i ma seeing through journalctl command

“2024-06-07T05:23:58.906455728Z” level=error msg=“failed to close container stdin” container=7d54962a8034ecf97c2600f568405813b861a10a6e06876fb2c7d85f4306ad65 error=“process does not exist dee3a1e43a4594ef56c86c1b6dbbcf68898e59316c97d4b0c9745a704472b839: not found” module=libcontainerd namespace=moby

i think one difference i got is where my container is perfectly running fine is their my docker version is
Docker version 24.0.7, build afdd53b

and where my conatiner is exited their my docker version is
Docker version 26.1.4, build 5650f9b

so i uninstalled 26.1.4 and installed 24.0.7 on my server. after that when i am checking same 26.1.4 version only it is installed.

can anyone help me regarding this issue ?
please tell me any other information if needed ?

Reproduce

i don't have any step beacause it is running fine in one server with same image and getting issue with another server.

Expected behavior

Those docker container should run fine like running on another server without exited automatically.

docker version

this is the docker version where it is exited automatically
docker --version
Docker version 26.1.4, build 5650f9b

this is where it is running fine without exited automatically
docker --version
Docker version 24.0.7, build afdd53b

docker info

this is the docker info where it is exited automatically

sudo docker info
Client: Docker Engine - Community
 Version:    26.1.4
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d2d58213f83a351ca8f528a95fbd145f5654e957
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 5.15.0-1064-azure
 Operating System: Ubuntu 20.04.6 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.57GiB
 Name: pocketful-live
 ID: bc06581d-99b0-43a4-80f4-258e59cb4e30
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

this is where it is running fine without exited automatically

sudo docker info
Client: Docker Engine - Community
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 5
  Running: 5
  Paused: 0
  Stopped: 0
 Images: 5
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dd1e886e55dd695541fdcd67420c2888645a495
 runc version: v1.1.10-0-g18a0cb0
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 5.15.0-1053-azure
 Operating System: Ubuntu 20.04.6 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 7.704GiB
 Name: Landing-nest
 ID: 946d8595-9919-4abc-980a-d4760abee30f
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional Info

If any other information needed please tell me .

@kishorpacefin
Copy link
Author

Hi
Now i checked my docker daemon got automatically stopped. i don't know wht i have checked i have enough resource my cpu also okay.

Jun 07 09:44:09 pocketful-live dockerd[101657]: time="2024-06-07T09:44:09.466304723Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Jun 07 09:44:09 pocketful-live dockerd[101657]: time="2024-06-07T09:44:09.498414759Z" level=info msg="Loading containers: done."
Jun 07 09:44:09 pocketful-live dockerd[101657]: time="2024-06-07T09:44:09.510894482Z" level=warning msg="Not using native diff for overlay2, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled" storage-driver=overlay2
Jun 07 09:44:09 pocketful-live dockerd[101657]: time="2024-06-07T09:44:09.511037211Z" level=info msg="Docker daemon" commit=311b9ff graphdriver=overlay2 version=24.0.7
Jun 07 09:44:09 pocketful-live dockerd[101657]: time="2024-06-07T09:44:09.511102660Z" level=info msg="Daemon has completed initialization"
Jun 07 09:44:09 pocketful-live dockerd[101657]: time="2024-06-07T09:44:09.549878410Z" level=info msg="API listen on /run/docker.sock"
Jun 07 09:44:09 pocketful-live systemd[1]: Started Docker Application Container Engine.
Jun 09 16:57:12 pocketful-live systemd[1]: Stopping Docker Application Container Engine...
Jun 09 16:57:12 pocketful-live dockerd[101657]: time="2024-06-09T16:57:12.666570645Z" level=info msg="Processing signal 'terminated'"
Jun 09 16:57:12 pocketful-live dockerd[101657]: time="2024-06-09T16:57:12.697532666Z" level=info msg="ignoring event" container=8058cf9d3b35bf556d5828db3bbe92414fb43e04a0f428f6f9eece9d69966afb module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jun 09 16:57:12 pocketful-live dockerd[101657]: time="2024-06-09T16:57:12.704972612Z" level=warning msg="failed to close stdin: task 8058cf9d3b35bf556d5828db3bbe92414fb43e04a0f428f6f9eece9d69966afb not found: not found"
Jun 09 16:57:13 pocketful-live dockerd[101657]: time="2024-06-09T16:57:13.197949576Z" level=info msg="ignoring event" container=d170f235076e4dd82277cddebdb59f61c94c9061248d21e1b813c3c2b82f5760 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jun 09 16:57:13 pocketful-live dockerd[101657]: time="2024-06-09T16:57:13.204012461Z" level=info msg="ignoring event" container=d1bb25998d6e436227d058380ccfe4d4de5890cc52b959f5e9eb4759a1560746 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jun 09 16:57:13 pocketful-live dockerd[101657]: time="2024-06-09T16:57:13.207786711Z" level=warning msg="failed to close stdin: task d170f235076e4dd82277cddebdb59f61c94c9061248d21e1b813c3c2b82f5760 not found: not found"
Jun 09 16:57:13 pocketful-live dockerd[101657]: time="2024-06-09T16:57:13.211915444Z" level=warning msg="failed to close stdin: task d1bb25998d6e436227d058380ccfe4d4de5890cc52b959f5e9eb4759a1560746 not found: not found"
Jun 09 16:57:14 pocketful-live dockerd[101657]: time="2024-06-09T16:57:14.440411449Z" level=info msg="ignoring event" container=9f17899ed066d94374d7561a7271a539b581a78f8d8665f4119d56da244b6cf7 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jun 09 16:57:14 pocketful-live dockerd[101657]: time="2024-06-09T16:57:14.592043368Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby
Jun 09 16:57:14 pocketful-live dockerd[101657]: time="2024-06-09T16:57:14.592301144Z" level=info msg="Daemon shutdown complete"
Jun 09 16:57:14 pocketful-live systemd[1]: docker.service: Succeeded.
Jun 09 16:57:14 pocketful-live systemd[1]: Stopped Docker Application Container Engine.
Jun 09 16:57:14 pocketful-live systemd[1]: Starting Docker Application Container Engine...
Jun 09 16:57:14 pocketful-live dockerd[138127]: time="2024-06-09T16:57:14.642499101Z" level=info msg="Starting up"
Jun 09 16:57:14 pocketful-live dockerd[138127]: time="2024-06-09T16:57:14.643148564Z" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf"
Jun 09 16:57:14 pocketful-live dockerd[138127]: time="2024-06-09T16:57:14.676855442Z" level=info msg="[graphdriver] using prior storage driver: overlay2"
Jun 09 16:57:14 pocketful-live dockerd[138127]: time="2024-06-09T16:57:14.680416732Z" level=info msg="Loading containers: start."
Jun 09 16:57:14 pocketful-live dockerd[138127]: time="2024-06-09T16:57:14.767580193Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Jun 09 16:57:14 pocketful-live dockerd[138127]: time="2024-06-09T16:57:14.795155902Z" level=info msg="Loading containers: done."
Jun 09 16:57:14 pocketful-live dockerd[138127]: time="2024-06-09T16:57:14.810292961Z" level=warning msg="Not using native diff for overlay2, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled" storage-driver=overlay2
Jun 09 16:57:14 pocketful-live dockerd[138127]: time="2024-06-09T16:57:14.810405360Z" level=info msg="Docker daemon" commit=de5c9cf containerd-snapshotter=false storage-driver=overlay2 version=26.1.4
Jun 09 16:57:14 pocketful-live dockerd[138127]: time="2024-06-09T16:57:14.810448040Z" level=info msg="Daemon has completed initialization"
Jun 09 16:57:14 pocketful-live systemd[1]: Started Docker Application Container Engine.
Jun 09 16:57:14 pocketful-live dockerd[138127]: time="2024-06-09T16:57:14.847306813Z" level=info msg="API listen on /run/docker.sock"

what information you need please mentioned.

@kishorpacefin
Copy link
Author

@thaJeztah can you please help me on this ?

what information do you need can you tell me ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants