cnrancher / kube-explorer

A portable explorer for Kubernetes, without any dependency.
Apache License 2.0
246 stars 30 forks source link

ERROR (catatonit:8): failed to exec pid1: No such file or directory #74

Closed ganecheng closed 2 days ago

ganecheng commented 6 days ago

The container image cnrancher/kube-explorer:v0.5.0 deploy error

https://hubgw.docker.com/layers/cnrancher/kube-explorer/v0.5.0/images/sha256-64c6f30a5d065efd936cdc39ed491d78c41d98a33c4528906a002fc9670c06c8?context=explore

Deploy log show below :

ERROR (catatonit:8): failed to exec pid1: No such file or directory

maybe the catatonit is missing. https://github.com/cnrancher/kube-explorer/blob/main/package/Dockerfile

RUN zypper install -y catatonit

hope fix it

orangedeng commented 5 days ago

Can you provide more details about this issue. The catatonit exists on SUSE bci image. Don't need to install it again. This is kube-explorer v0.5.0 on amd64 截屏2024-11-22 20 51 17

And this is kube-explorer v0.5.0 on aarch64 截屏2024-11-22 20 54 31

orangedeng commented 5 days ago

Also I checked with your image sync repo and downloaded the image from action. Confirm that it is the same image as I provided in last comment: 截屏2024-11-22 21 03 28

ganecheng commented 5 days ago

Please help confirm whether it is a problem with v5.0 or my usage is incorrect. Details are as follows:

version 4.0 vs 5.0

v4.0

docker run command is

docker run -itd --name kube-explorer -p 8989:8989 -m 500m -v /home/k3s.yaml:/etc/kubeconfig cnrancher/kube-explorer:v0.4.0 "--http-listen-port=8989" "--kubeconfig=/etc/kubeconfig" "--https-listen-port=0"

docker log is

INFO[0000] Starting /v1, Kind=Namespace controller      
2024-11-23T05:36:26.160155293Z INFO[0000] Starting rbac.authorization.k8s.io/v1, Kind=RoleBinding controller 
2024-11-23T05:36:26.160168667Z INFO[0000] Starting rbac.authorization.k8s.io/v1, Kind=Role controller 
2024-11-23T05:36:26.160209242Z INFO[0000] Starting rbac.authorization.k8s.io/v1, Kind=ClusterRoleBinding controller 
2024-11-23T05:36:26.160230291Z INFO[0000] Starting rbac.authorization.k8s.io/v1, Kind=ClusterRole controller 
2024-11-23T05:36:26.163120818Z INFO[0000] Starting apiregistration.k8s.io/v1, Kind=APIService controller 
2024-11-23T05:36:26.164684866Z INFO[0000] Listening on :8989                           
2024-11-23T05:36:26.164719700Z INFO[0000] Starting apiextensions.k8s.io/v1, Kind=CustomResourceDefinition controller 

kube-explorer init ok

v5.0

docker run command is

docker run -itd --name kube-explorer -p 8989:8989 -m 500m -v /home/k3s.yaml:/etc/kubeconfig cnrancher/kube-explorer:v0.5.0 "--http-listen-port=8989" "--kubeconfig=/etc/kubeconfig" "--https-listen-port=0"

docker log is

ERROR (catatonit:6): failed to exec pid1: No such file or directory

kube-explorer can not init and down

Test Environment

OS info

NAME="openEuler"
VERSION="24.03 (LTS)"
ID="openEuler"
VERSION_ID="24.03"
PRETTY_NAME="openEuler 24.03 (LTS)"
ANSI_COLOR="0;31"

docker info

Client: Docker Engine - Community
 Version:           19.03.15
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        99e3ed8919
 Built:             Sat Jan 30 03:17:57 2021
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.15
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       99e3ed8919
  Built:            Sat Jan 30 03:16:33 2021
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

k3s version

v1.30.4+k3s1
orangedeng commented 3 days ago

Already fixed in v0.5.1 and v0.4.2. The problem is the change of package/Dockerfile. I remove the useless entrypoint.sh and put the main command to CMD in Dockerfile. But the docker run command will override the CMD session. In your case, you can run docker run -itd --name kube-explorer -p 8989:8989 -m 500m -v /home/k3s.yaml:/etc/kubeconfig cnrancher/kube-explorer:v0.5.0 kube-explorer "--http-listen-port=8989" "--kubeconfig=/etc/kubeconfig" "--https-listen-port=0" Or just use the new tag.

ganecheng commented 2 days ago

Test passed, thanks

v0.5.0 with command kube-explorer passed

docker run -itd --name kube-explorer -p 8989:8989 -m 500m -v /home/k3s.yaml:/etc/kubeconfig cnrancher/kube-explorer:v0.5.0 "kube-explorer" "--http-listen-port=8989" "--kubeconfig=/etc/kubeconfig" "--https-listen-port=0"

v0.5.1 without command kube-explorer passed

docker run -itd --name kube-explorer -p 8989:8989 -m 500m -v /home/k3s.yaml:/etc/kubeconfig cnrancher/kube-explorer:v0.5.1 "--http-listen-port=8989" "--kubeconfig=/etc/kubeconfig" "--https-listen-port=0"