Unable to start Confluence using an Ansible Tower job

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Atlassian applications allow the use of automation tools with our products, however, Atlassian Support does not provide assistance for configuring them. Consequently, Atlassian cannot guarantee to provide any support for them.

If assistance with configuration is required, please raise a question on Atlassian Community.

Summary

While attempting to automate the Confluence startup using an Ansible Tower job, the application can't be reached and the process is not running after the job is executed.

Environment

The Ansible playbook has a task like this:

- name: Run Confluence startup script
  shell: sh <CONFLUENCE-INSTALL>/bin/start-confluence.sh

Diagnosis

  • Standard Out screen on Ansible Tower shows Tomcat has started
  • No errors in Standard Error
  • catalina.out and atlassian-confluence.log are not updated after the job is executed
  • The Confluence process is not running on the host and not responding to browser requests after the job is executed

Cause

As covered in this forum discussion, running the startup scripts through an Ansible job can lead to this behavior. Although the topic is focused on Tomcat, the Confluence startup uses the same scripts:

Solution

Create the Confluence service on the host as follows:

Then, edit the Ansible playbook to use the systemd module to start the service:

- name: Start the Confluence service if stopped
  systemd: name=confluence state=started

More details on this module can be found here:

Last modified on Jul 28, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.