Bug 2534 - [Anolis 23 Preview][x86]通过yum安装sysom后,启动sysom服务后查看服务状态有报错
Summary: [Anolis 23 Preview][x86]通过yum安装sysom后,启动sysom服务后查看服务状态有报错
Status: REOPENED
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 23.0
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: happy_orange
QA Contact: bolong_tbl
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-25 11:17 UTC by Banana
Modified: 2024-03-07 17:57 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Banana alibaba_cloud_group 2022-10-25 11:17:22 UTC
[问题描述]:
通过yum安装sysom后,启动sysom服务后查看服务状态有报错。

[root@iZbp14ub0x084rkaiux0ktZ default]# systemctl status sysom-server.service
○ sysom-server.service - SysOM Server
     Loaded: loaded (/usr/lib/systemd/system/sysom-server.service; enabled; vendor preset: disabled)
     Active: inactive (dead)
[root@iZbp14ub0x084rkaiux0ktZ default]# systemctl start sysom-server.service
[root@iZbp14ub0x084rkaiux0ktZ default]# systemctl status sysom-server.service
× sysom-server.service - SysOM Server
     Loaded: loaded (/usr/lib/systemd/system/sysom-server.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Tue 2022-10-25 11:12:26 CST; 3s ago
    Process: 40205 ExecStart=bash -x /usr/local/sysom/init_scripts/server/init.sh (code=exited, status=1/FAILURE)
   Main PID: 40205 (code=exited, status=1/FAILURE)
        CPU: 128ms

Oct 25 11:12:26 iZbp14ub0x084rkaiux0ktZ bash[40214]: + '[' 0 -eq 0 ']'
Oct 25 11:12:26 iZbp14ub0x084rkaiux0ktZ bash[40218]: + cat /etc/selinux/config
Oct 25 11:12:26 iZbp14ub0x084rkaiux0ktZ bash[40219]: + grep SELINUX=disabled
Oct 25 11:12:26 iZbp14ub0x084rkaiux0ktZ bash[40214]: + '[' 1 -eq 0 ']'
Oct 25 11:12:26 iZbp14ub0x084rkaiux0ktZ bash[40214]: + echo 'selinux enable, please set selinux disable'
Oct 25 11:12:26 iZbp14ub0x084rkaiux0ktZ bash[40214]: selinux enable, please set selinux disable
Oct 25 11:12:26 iZbp14ub0x084rkaiux0ktZ bash[40214]: + exit 1
Oct 25 11:12:26 iZbp14ub0x084rkaiux0ktZ bash[40205]: + exit 1
Oct 25 11:12:26 iZbp14ub0x084rkaiux0ktZ systemd[1]: sysom-server.service: Main process exited, code=exited, status=1/FAILURE
Oct 25 11:12:26 iZbp14ub0x084rkaiux0ktZ systemd[1]: sysom-server.service: Failed with result 'exit-code'.

[环境信息]:
内核信息:
# uname -r
5.19.0-2_rc1.an23.x86_64

操作系统信息:
# cat /etc/os-release
[root@iZbp14ub0x084rkaiux0ktZ default]# cat /etc/os-release
NAME="Anolis OS"
VERSION="23"
ID="anolis"
VERSION_ID="23"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"

软件包信息:
[root@iZbp10tndzn2fahsrwa0gnZ ~]# yum info qt5-assistant.aarch64
[root@iZbp14ub0x084rkaiux0ktZ default]# yum info qt5-assistant.x86_64
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 1:17:31 ago on Tue Oct 25 09:57:57 2022.
Available Packages
Name         : qt5-assistant
Version      : 5.15.5
Release      : 1.an23
Architecture : x86_64
Size         : 361 k
Source       : qt5-qttools-5.15.5-1.an23.src.rpm
Repository   : AppStream
Summary      : Documentation browser for Qt5
URL          : http://www.qt.io
License      : LGPLv3 or LGPLv2
Description  : Documentation browser for Qt5.

[问题发生概率]:必现

[复现步骤]:
yum install -y sysom
systemctl status sysom-server.service
start sysom-server.service
status sysom-server.service
Comment 1 xuchunmei alibaba_cloud_group 2022-10-25 11:18:49 UTC
报错日志显示要关闭selinux,关闭试试?
Comment 2 Banana alibaba_cloud_group 2022-10-25 11:34:19 UTC
(In reply to xuchunmei from comment #1)
> 报错日志显示要关闭selinux,试试?

嗯,我试一下。
我描述里面有两个错误:
第一个是内核版本:5.10.134-12.1.an23.x86_64
第二个是软件包信息:
[root@iZbp14ub0x084rkaiux0ktZ default]# yum info qt5-assistant.x86_64
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 1:17:31 ago on Tue Oct 25 09:57:57 2022.
Available Packages
Name         : qt5-assistant
Version      : 5.15.5
Release      : 1.an23
Architecture : x86_64
Size         : 361 k
Source       : qt5-qttools-5.15.5-1.an23.src.rpm
Repository   : AppStream
Summary      : Documentation browser for Qt5
URL          : http://www.qt.io
License      : LGPLv3 or LGPLv2
Description  : Documentation browser for Qt5.
Comment 3 Banana alibaba_cloud_group 2022-10-28 13:35:05 UTC
关闭selinux后仍然是这个情况。
[root@VM20190228-126 ~]# systemctl status sysom-server.service
○ sysom-server.service - SysOM Server
     Loaded: loaded (/usr/lib/systemd/system/sysom-server.service; enabled; vendor preset: disabled)
     Active: inactive (dead)
[root@VM20190228-126 ~]# getenforce
Disabled
[root@VM20190228-126 ~]# systemctl start sysom-server.service
[root@VM20190228-126 ~]# systemctl status sysom-server.service
× sysom-server.service - SysOM Server
     Loaded: loaded (/usr/lib/systemd/system/sysom-server.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Fri 2022-10-28 13:33:03 CST; 2s ago
    Process: 3040 ExecStart=bash -x /usr/local/sysom/init_scripts/server/init.sh (code=exited, status=1/FAILURE)
   Main PID: 3040 (code=exited, status=1/FAILURE)
        CPU: 244ms

Oct 28 13:33:03 VM20190228-126 bash[3049]: + '[' -d /usr/local/sysom/server/virtualenv ']'
Oct 28 13:33:03 VM20190228-126 bash[3049]: + virtualenv-3 /usr/local/sysom/server/virtualenv
Oct 28 13:33:03 VM20190228-126 bash[3057]: init.sh: line 50: virtualenv-3: command not found
Oct 28 13:33:03 VM20190228-126 bash[3049]: + '[' 127 = 0 ']'
Oct 28 13:33:03 VM20190228-126 bash[3049]: + echo 'ERROR: create virtualenv failed'
Oct 28 13:33:03 VM20190228-126 bash[3049]: ERROR: create virtualenv failed
Oct 28 13:33:03 VM20190228-126 bash[3049]: + exit 1
Oct 28 13:33:03 VM20190228-126 bash[3040]: + exit 1
Oct 28 13:33:03 VM20190228-126 systemd[1]: sysom-server.service: Main process exited, code=exited, status=1/FAILURE
Oct 28 13:33:03 VM20190228-126 systemd[1]: sysom-server.service: Failed with result 'exit-code'.
[root@VM20190228-126 ~]#
Comment 5 Banana alibaba_cloud_group 2022-11-03 11:17:37 UTC
回归结果:不通过,请sysom相关负责人适配默认selinux状态下的服务开启关闭操作后,回归通过后close。
1、根据提供步骤,配置文件修改关闭selinux,并安装python3-virtualenv包(新版本里面已经默认安装此依赖,无需再次安装),sysom服务启动正常。
2、Anolis23 设计selinux默认是Permissive状态,在selinux默认状态下,sysom服务启动失败,正常应当可以开启关闭。
注:selinux仅仅影响第一次安装后的sysom,当安装成功sysom后,关闭一次selinux,sysom服务启动成功,再次打开selinux,sysom服务仍可正常开启关闭。
Comment 6 huangtuquan alibaba_cloud_group 2023-05-04 15:18:48 UTC
sysom启动时,会检查/etc/selinux/config中的配置,是否存在“SELINUX=disabled”配置,如果不存在,将报告启动失败。
Comment 7 扣肉 2024-03-07 17:57:10 UTC
(In reply to Banana from comment #3)
> 关闭selinux后仍然是这个情况。
> [root@VM20190228-126 ~]# systemctl status sysom-server.service
> ○ sysom-server.service - SysOM Server
>      Loaded: loaded (/usr/lib/systemd/system/sysom-server.service; enabled;
> vendor preset: disabled)
>      Active: inactive (dead)
> [root@VM20190228-126 ~]# getenforce
> Disabled
> [root@VM20190228-126 ~]# systemctl start sysom-server.service
> [root@VM20190228-126 ~]# systemctl status sysom-server.service
> × sysom-server.service - SysOM Server
>      Loaded: loaded (/usr/lib/systemd/system/sysom-server.service; enabled;
> vendor preset: disabled)
>      Active: failed (Result: exit-code) since Fri 2022-10-28 13:33:03 CST;
> 2s ago
>     Process: 3040 ExecStart=bash -x
> /usr/local/sysom/init_scripts/server/init.sh (code=exited, status=1/FAILURE)
>    Main PID: 3040 (code=exited, status=1/FAILURE)
>         CPU: 244ms
> 
> Oct 28 13:33:03 VM20190228-126 bash[3049]: + '[' -d
> /usr/local/sysom/server/virtualenv ']'
> Oct 28 13:33:03 VM20190228-126 bash[3049]: + virtualenv-3
> /usr/local/sysom/server/virtualenv
> Oct 28 13:33:03 VM20190228-126 bash[3057]: init.sh: line 50: virtualenv-3:
> command not found
> Oct 28 13:33:03 VM20190228-126 bash[3049]: + '[' 127 = 0 ']'
> Oct 28 13:33:03 VM20190228-126 bash[3049]: + echo 'ERROR: create virtualenv
> failed'
> Oct 28 13:33:03 VM20190228-126 bash[3049]: ERROR: create virtualenv failed
> Oct 28 13:33:03 VM20190228-126 bash[3049]: + exit 1
> Oct 28 13:33:03 VM20190228-126 bash[3040]: + exit 1
> Oct 28 13:33:03 VM20190228-126 systemd[1]: sysom-server.service: Main
> process exited, code=exited, status=1/FAILURE
> Oct 28 13:33:03 VM20190228-126 systemd[1]: sysom-server.service: Failed with
> result 'exit-code'.
> [root@VM20190228-126 ~]#
https://build.openanolis.cn/rpminfo?rpmID=348216
python3-virtualenv 本来就被 sysom 所依赖,请检查你安装的 sysom 是不是来自于 anolis 23 的仓库