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

centos 9 安装失败 #121

Closed
ck-Coding opened this issue Sep 12, 2023 · 4 comments
Closed

centos 9 安装失败 #121

ck-Coding opened this issue Sep 12, 2023 · 4 comments

Comments

@ck-Coding
Copy link

在centos 9 上安装似乎会出触发OOM保护机制,将进程连同sshd杀死,导致安装失败。

按任意键开始…或按Ctrl+C取消
[信息] 检查EPEL存储库.
Command line error: one of the following arguments is required: --save --add-repo --dump --dump-variables --set-enabled --enable --set-disabled --disable
[信息] EPEL存储库检查完成.
[信息] 开始安装依赖包 qrencode
Connection closing...Socket close.

Sep 08:56:13 ip-172-26-31-248 kernel: Out of memory: Killed process 68283 (yum) total-vm:451320kB, anon-rss:318608kB, file-rss:24kB, shmem-rss:0kB, UID:0 pgtables:780kB oom_score_adj:0
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: A process of this unit has been killed by the OOM killer.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68125 (sshd) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68140 (sshd) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68141 (bash) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68160 (sudo) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68162 (bash) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68185 (bash) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68283 (yum) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd-logind[579]: Session 9 logged out. Waiting for processes to exit.

@loyess
Copy link
Owner

loyess commented Sep 14, 2023

[信息] 检查EPEL存储库.
Command line error: one of the following arguments is required: --save --add-repo --dump --dump-variables --set-enabled --enable --set-disabled --disable

上方的这个错误,是因为脚本中,这一段代码的错误 utils/dependencies.sh#L83C9-L87 导致的,但是,它并没有任何影响,因为,我用 CentOS 9 看了下,它的 EPEL 库 默认是启用的。

Sep 08:56:13 ip-172-26-31-248 kernel: Out of memory: Killed process 68283 (yum) total-vm:451320kB, anon-rss:318608kB, file-rss:24kB, shmem-rss:0kB, UID:0 pgtables:780kB oom_score_adj:0
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: A process of this unit has been killed by the OOM killer.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68125 (sshd) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68140 (sshd) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68141 (bash) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68160 (sudo) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68162 (bash) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68185 (bash) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd[1]: session-9.scope: Killing process 68283 (yum) with signal SIGKILL.
Sep 12 08:56:13 ip-172-26-31-248 systemd-logind[579]: Session 9 logged out. Waiting for processes to exit.

至于你说的会触发OOM保护机制,这是你的系统内存不足的原因。

@ck-Coding
Copy link
Author

ck-Coding commented Sep 14, 2023

你好,脚本我是在aws lightsail centos 9 stream上测试的,之前在同样内存(512M)的centos 7似乎没有出现这个问题,且多次重装机器都是这个错误(ssh连接断开,安装中断失败),检查了系统日志后发现出现了内存不足杀进程的信息。检查了下系统内存还有282MiB的空间:
free -h
total used free shared buff/cache available
Mem: 438Mi 111Mi 282Mi 11Mi 66Mi 327Mi
Swap: 0B 0B 0B

@loyess
Copy link
Owner

loyess commented Sep 14, 2023

我刚在 Vultr 进行了安装测试,VPS配置: 1 vCPU/1 GB MemoryCentOS 9 Stream x64 它是可以安装成功的。至于,最低内存限制是多少,我没测试过,这个可能要你自己测试了。

之前在同样内存(512M)的centos 7似乎没有出现这个问题

至于你的这个问题,会不是,CentOS 9 Stream 比 CentOS 7 更占用内存?

@ck-Coding
Copy link
Author

在开启了服务器的swap分区后可以成功安装组件,但安装过程中又出现了shadowsocks 下载失败的错误:

按任意键开始…或按Ctrl+C取消
[信息] 检查EPEL存储库.
Command line error: one of the following arguments is required: --save --add-repo --dump --dump-variables --set-enabled --enable --set-disabled --disable
[信息] EPEL存储库检查完成.
[信息] 开始安装依赖包 gettext
[信息] 开始安装依赖包 gcc
[信息] 开始安装依赖包 pcre
[信息] 开始安装依赖包 pcre-devel
[信息] 开始安装依赖包 autoconf
[信息] 开始安装依赖包 libtool
[信息] 开始安装依赖包 automake
[信息] 开始安装依赖包 make
[信息] 开始安装依赖包 asciidoc
[信息] 开始安装依赖包 xmlto
[信息] 开始安装依赖包 c-ares-devel
[信息] 开始安装依赖包 libev-devel
[信息] 开始安装依赖包 zlib-devel
[信息] 开始安装依赖包 openssl-devel
[信息] 开始安装依赖包 git
[信息] 开始安装依赖包 qrencode
[信息] 开始安装依赖包 jq
shadowsocks-libev-3.3.5.tar.gz 当前目录中不存在, 现在开始下载.
--2023-09-23 02:48:16-- https://github.com/shadowsocks/shadowsocks-libev/releases/download/v3.3.5/shadowsocks-libev-3.3.5.tar.gz
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/7177269/cb5b1b00-f73e-11ea-996d-9c2e5ce71448?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230923%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230923T024817Z&X-Amz-Expires=300&X-Amz-Signature=6e07138a680c7ba75363f54f0ead71f4e8da87328ea8a0fbe122efad48f298cd&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=7177269&response-content-disposition=attachment%3B%20filename%3Dshadowsocks-libev-3.3.5.tar.gz&response-content-type=application%2Foctet-stream [following]
--2023-09-23 02:48:17-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/7177269/cb5b1b00-f73e-11ea-996d-9c2e5ce71448?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230923%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230923T024817Z&X-Amz-Expires=300&X-Amz-Signature=6e07138a680c7ba75363f54f0ead71f4e8da87328ea8a0fbe122efad48f298cd&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=7177269&response-content-disposition=attachment%3B%20filename%3Dshadowsocks-libev-3.3.5.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1959146 (1.9M) [application/octet-stream]
Saving to: ‘shadowsocks-libev-3.3.5.tar.gz’

shadowsocks-libev-3.3.5.tar.gz 100%[===========================================================================================================>] 1.87M 6.18MB/s in 0.3s

2023-09-23 02:48:18 (6.18 MB/s) - ‘shadowsocks-libev-3.3.5.tar.gz’ saved [1959146/1959146]

shadowsocks-libev 当前目录中不存在, 现在开始下载.
/etc/init.d/shadowsocks-libev: No such file or directory
[错误] 下载 shadowsocks-libev 失败.

loyess added a commit that referenced this issue Oct 1, 2023
@loyess loyess closed this as completed Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@ck-Coding @loyess and others