You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.15 02:30:58