Ansible自动化部署Confluence启动失败问题求助
Ansible自动化部署Confluence启动失败问题
问题现象
通过Ansible自动化安装Confluence服务时,执行systemd启动步骤无明显原因失败。手动执行启动命令或重复两次Ansible命令可成功启动,但需实现一步完成启动操作。
报错信息
fatal: [VM_Name]: FAILED! => {"changed": false, "msg": "Unable to start service confluence.service: Job for confluence.service failed because the control process exited with error code. See \"systemctl status confluence.service\" and \"journalctl -xeu confluence.service\" for details. "}
排查结果
首次启动时,服务输出提示:
Existing PID file found during start. Tomcat appears to still be running with PID ***. Start aborted.
该PID属于confluence用户启动的confluence.service进程。
环境与执行命令
- 系统:Rocky Linux 9
- Playbook全局开启
become: true - confluence.service文件路径:
/usr/lib/systemd/system
先后尝试以下两个Ansible模块命令,均无法一次性成功启动:
使用service模块
- name: Confluence | Start and enabled service: name: confluence.service state: restarted enabled: yes
使用systemd模块
- name: Confluence | Start and enabled systemd: name: confluence.service state: restarted daemon_reload: true enabled: yes
内容的提问来源于stack exchange,提问作者Clarke
相关产品推荐
相关产品推荐

