7 Star 0 Fork 8

src-openEuler / spamassassin

 / 详情

【22.03 LTS SP1 RC1】【arm/x86 】sa-update.service服务首次启动之后,日志中有报错:gpg: can't connect to the agent: IPC connect call failed

已验收
缺陷
创建于  
2022-11-30 09:45

【标题描述】sa-update.service服务首次启动之后,日志中有报错:gpg: can't connect to the agent: IPC connect call failed
【环境信息】
软件信息:
1) OS版本及分支:openEuler 22.03 (LTS-SP1)
2) 内核信息:5.10.0-126.0.0.66.oe2203sp1.x86_64
3) 发现问题的组件版本信息:spamassassin-3.4.5-3.oe2203sp1.x86_64
【问题复现步骤】
具体操作步骤
dnf install -y spamassassin
systemctl start spamassassin.service
systemctl start sa-update.service
systemctl status sa-update.service
出现概率(是否必现,概率性错误):偶现
【预期结果】
服务启动成功,日志无异常
【实际结果】
服务启动之后,日志中有打印异常信息,如下图所示:
输入图片说明
【附件信息】
比如系统message日志/组件日志、dump信息、图片等

评论 (5)

wenjun 创建了缺陷

Hi wenjunryou, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Application, and any of the maintainers: @Alex_Chao , @small_leek , @jimmy_hero , @朱春意 , @caodongxia

openeuler-ci-bot 添加了
 
sig/Application
标签
wenjun 负责人设置为mdche
wenjun 计划截止日期设置为2022-12-01
wenjun 计划开始日期设置为2022-11-30
wenjun 优先级设置为主要

偶现问题复现方法 (打开selinux的情况)
systemctl stop sa-update.service
rm -rf /etc/mail/spamassassin/sa-update-keys/*
systemctl start sa-update.service
systemctl status sa-update.service

原因分析:第一次启动 sa-update服务时,会在/etc/mail/spamassassin/sa-update-keys/ 目录下创建连接gpg-agent的可信文件,用于认证连接gpg-agent deamon。环境中没有预安装用于认证的软件包systemd-pam,所以连接失败。

规避方法:
1.执行setenforce 0 再执行此操作无问题。(关闭selinux)

解决方法:
预安装systemd-pam软件包(增加安装依赖的话,需要通过ssh重新登陆才能生效)。

补充:
经讨论systemd-pam预装到环境中有如下影响:
预装systemd-pam会使openEuler每次用户登录,systemd都为他们创建对应的user@UID.service等,生成对应的session-.scope。这个功能的正常生效需要dbus、systemd-logind同时无问题,一旦任意一个组件出问题都可能会导致登录超时25s。此外用户拉起的进程cgroup会被迁移到session-.scope下管理,可能影响用户的进程cpu、memory等cgroup子系统配置。因此建议不要预装。
来源pr:https://gitee.com/src-openeuler/oemaker/pulls/201

因此,不预装systemd-pam, 在spamassassin中声明安装依赖systemd-pam。安装spamassassain后,退出shell会话,ssh重新登陆后使用sa-update服务。 讨论人 @lyn @licunlong @DisNight

回归方法:
1.dnf install -y spamassassin
2.退出shell会话,ssh重新登陆
3.systemctl start spamassassin.service
4.systemctl start sa-update.service
5.systemctl status sa-update.service

备注:需要重新登陆的原因是:安装systemd-pam子包之后,重新登录才会走systemd创建会话流程

【验收环境】
软件信息:
1) OS版本及分支:openEuler 22.03 (LTS-SP1)
2) 内核信息:5.10.0-136.3.0.77.oe2203sp1
3) 验收问题的组件版本信息:spamassassin-3.4.5-4.oe2203sp1
【验收结果】
1.dnf install -y spamassassin
2.退出shell会话,ssh重新登陆
rm -rf /etc/mail/spamassassin/sa-update-keys/*
3.systemctl start spamassassin.service
4.systemctl start sa-update.service
5.systemctl status sa-update.service
服务启动之后,日志无异常,问题验收通过
输入图片说明

wenjun 任务状态已完成 修改为已验收

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936
1
https://gitee.com/src-openeuler/spamassassin.git
git@gitee.com:src-openeuler/spamassassin.git
src-openeuler
spamassassin
spamassassin

搜索帮助