sealos icon indicating copy to clipboard operation
sealos copied to clipboard

BUG: brief description of the bug

Open fu7100 opened this issue 1 year ago • 13 comments

Sealos Version

v4.3.7

How to reproduce the bug?

在执行sealos所在的机器上5050端口被占用

2023-11-20T21:44:07 debug not trying to parse private key file cause it's not exists 2023-11-20T21:44:07 debug start to exec sudo -E /bin/bash -c 'cd /var/lib/sealos/data/default/rootfs/scripts && export SEALOS_SYS_KUBE_VERSION="v1.21.14" SEALOS_SYS_IMAGE_ENDPOINT="/var/run/image-cri-shim.sock" registryPort="5000" sandboxImage="pause:3.4.1" disableApparmor="false" registryPassword="passw0rd" registryData="/var/lib/registry" SEALOS_SYS_SEALOS_VERSION="4.3.7" registryUsername="admin" defaultVIP="10.103.97.2" SEALOS_SYS_CRI_ENDPOINT="/var/run/containerd/containerd.sock" registryDomain="sealos.hub" criData="/var/lib/containerd" registryConfig="/etc/registry" ; bash check.sh $registryData' on 10.10.12.170:22 2023-11-20T21:44:07 debug not trying to parse private key file cause it's not exists 2023-11-20T21:44:07 debug start to run command sudo -E /bin/bash -c 'cd /var/lib/sealos/data/default/rootfs/scripts && export SEALOS_SYS_SEALOS_VERSION="4.3.7" disableApparmor="false" registryUsername="admin" registryPort="5000" registryDomain="sealos.hub" defaultVIP="10.103.97.2" registryData="/var/lib/registry" registryConfig="/etc/registry" SEALOS_SYS_CRI_ENDPOINT="/var/run/containerd/containerd.sock" sandboxImage="pause:3.4.1" registryPassword="passw0rd" SEALOS_SYS_IMAGE_ENDPOINT="/var/run/image-cri-shim.sock" criData="/var/lib/containerd" SEALOS_SYS_KUBE_VERSION="v1.21.14" ; bash check.sh $registryData' via exec 2023-11-20T21:44:07 debug not trying to parse private key file cause it's not exists 2023-11-20T21:44:07 debug start to exec sudo -E /bin/bash -c 'cd /var/lib/sealos/data/default/rootfs/scripts && export SEALOS_SYS_SEALOS_VERSION="4.3.7" criData="/var/lib/containerd" SEALOS_SYS_IMAGE_ENDPOINT="/var/run/image-cri-shim.sock" registryConfig="/etc/registry" defaultVIP="10.103.97.2" registryData="/var/lib/registry" SEALOS_SYS_CRI_ENDPOINT="/var/run/containerd/containerd.sock" registryUsername="admin" registryPort="5000" sandboxImage="pause:3.4.1" disableApparmor="false" registryPassword="passw0rd" registryDomain="sealos.hub" SEALOS_SYS_KUBE_VERSION="v1.21.14" ; bash check.sh $registryData' on 10.10.12.171:22 INFO [2023-11-20 21:44:07] >> Check port kubelet port 10249..10259, reserved port 5050..5054 inuse. Please wait... 10.10.12.171:22 INFO [2023-11-20 21:44:08] >> Check port kubelet port 10249..10259, reserved port 5050..5054 inuse. Please wait... ERROR [2023-11-20 21:44:07] >> Port: 5050 occupied. Please turn off port service. 10.10.12.170:22 INFO [2023-11-20 21:44:08] >> Check port kubelet port 10249..10259, reserved port 5050..5054 inuse. Please wait... 10.10.12.171:22 which: no docker in (/sbin:/bin:/usr/sbin:/usr/bin) 10.10.12.171:22 WARN [2023-11-20 21:44:09] >> Replace disable_apparmor = false to disable_apparmor = true 10.10.12.171:22 INFO [2023-11-20 21:44:09] >> check root,port,cri success 10.10.12.170:22 which: no docker in (/sbin:/bin:/usr/sbin:/usr/bin) 10.10.12.170:22 WARN [2023-11-20 21:44:09] >> Replace disable_apparmor = false to disable_apparmor = true 10.10.12.170:22 INFO [2023-11-20 21:44:09] >> check root,port,cri success 2023-11-20T21:44:08 error Applied to cluster error: exit status 1 2023-11-20T21:44:08 debug save objects into local: /home/ctg/.sealos/default/Clusterfile, objects: [apiVersion: apps.sealos.io/v1beta1

What is the expected behavior?

No response

What do you see instead?

端口被占用 [root@master deploy-k8s]# lsof -i:5050 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME sealctl 2449 root 3u IPv6 32217 0t0 TCP *:mmcc (LISTEN)

Operating environment

- Sealos version: v4.3.7
- Docker version: 
- Kubernetes version: v1.21.4
- Operating system: centos7.9
- Runtime environment:
- Cluster size:
- Additional information:

Additional information

No response

fu7100 avatar Nov 20 '23 15:11 fu7100

进行了多次安装吗?,不确定,建议reset清理干净在重新安装

bxy4543 avatar Nov 22 '23 02:11 bxy4543

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Did you perform multiple installations? , not sure, it is recommended to reset and clean before reinstalling

sealos-ci-robot avatar Nov 22 '23 02:11 sealos-ci-robot

进行了多次安装吗?,不确定,建议reset清理干净在重新安装

多次安装也是一样的,安装过程它会临时起一个5050的端口用来推镜像,然后关闭,再去检测端口是否被占用,但是这里它似乎没有关闭服务导致后面的check不通过。

fu7100 avatar Nov 22 '23 15:11 fu7100

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Did you perform multiple installations? , not sure, it is recommended to reset and clean before reinstalling

多次安装也是一样的,安装过程它会临时起一个5050的端口用来推镜像,然后关闭,再去检测端口是否被占用,但是这里它似乎没有关闭服务导致后面的check不通过。

fu7100 avatar Nov 22 '23 15:11 fu7100

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Did you perform multiple installations? , not sure, it is recommended to reset and clean before reinstalling

The same is true for multiple installations. During the installation process, it will temporarily open a 5050 port to push the image, then close it, and then check whether the port is occupied, but here it seems that it does not close the service, causing subsequent checks to fail.

sealos-ci-robot avatar Nov 22 '23 15:11 sealos-ci-robot

只有安装集群的时候才会检测。除非你安装集群的时候在导入镜像。。

cuisongliu avatar Dec 10 '23 05:12 cuisongliu

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It will only be detected when the cluster is installed. Unless you are importing the image when installing the cluster. .

sealos-ci-robot avatar Dec 10 '23 05:12 sealos-ci-robot

我遇到类似的问题,最后将执行用户改成 root 不再报这个错误。

macX-1 avatar Dec 15 '23 09:12 macX-1

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I encountered a similar problem, and finally changed the user to root and no longer reported this error.

sealos-ci-robot avatar Dec 15 '23 09:12 sealos-ci-robot

This issue has been automatically closed because we haven't heard back for more than 60 days, please reopen this issue if necessary.

stale[bot] avatar Feb 13 '24 10:02 stale[bot]

我遇到类似的问题,最后将执行用户改成 root 不再报这个错误。

我也遇到同样问题,root直接安装是可以的,非root用户(有sudo权限)安装就会有这个问题,但是生产主机一般root都是禁止直接ssh登录的🤷‍♀️

geyaandy avatar Feb 27 '24 01:02 geyaandy

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I encountered a similar problem, and finally changed the execution user to root and no longer reported this error.

I also encountered the same problem. It is possible to install directly with root. Installation by non-root users (with sudo permissions) will have this problem. However, direct ssh login is generally prohibited for production hosts by root. 🤷‍♀️

sealos-ci-robot avatar Feb 27 '24 01:02 sealos-ci-robot

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


​ Hello, I have received the email~! I wish your life will get better and better......

sealos-ci-robot avatar Feb 27 '24 01:02 sealos-ci-robot

  你好,邮件我已收到~!祝你的生活越来越好..........

geyaandy avatar Apr 27 '24 01:04 geyaandy

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


​ Hello, I have received the email~! I wish your life will get better and better......

sealos-ci-robot avatar Apr 27 '24 01:04 sealos-ci-robot