Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

We cannot start the jira using ansible playbook

Sanjana Nalam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 28, 2022

I am trying to automate the stop and start functions of the jira using ansible playbooks.I am able to stop the jira but not able to start the jira using ansible playbook. I am attaching the playbook which I have used to start the jira


 

tasks:
- name: Start the JIRA
shell:
cmd: ./start-jira.sh
chdir: /<install>/bin/
register: result1

- name: Status of JIRA
shell:
cmd: ps aux | grep jira
# cmd: ps aux | grep jira
register: result2
- debug:
msg: "{{ result2.stdout }}"

- pause: minutes=5

- name: Status after starting the JIRA
shell:
cmd: tail -1000f catalina.out
chdir: /<install>/logs/
register: result3
- debug:
msg: "{{ result3.stdout }}"

 


I am getting this in logs while starting the jira 

"localhost-startStop-2" # daemon prio=5 os_prio=0 tid=0x00007f501c43b000 nid=0x416b in Object.wait() [0x00007f4f4bccc000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

 

"FelixShutdown" # daemon prio=5 os_prio=0 tid=0x00007f501823f800 nid=0x4221 runnable [0x00007f4fa6af5000]
java.lang.Thread.State: RUNNABLE
at java.util.concurrent.ConcurrentHashMap$Traverser.advance(ConcurrentHashMap.java:3339)
at java.util.concurrent.ConcurrentHashMap$KeyIterator.next(ConcurrentHashMap.java:3419)
at java.util.ResourceBundle.clearCache(ResourceBundle.java:1772)

"dbr-async-43" # daemon prio=5 os_prio=0 tid=0x00007f4fa01fa000 nid=0x285a waiting on condition [0x00007f4f306d1000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

 

Please suggest any method so that I can automate the stop and start functions of the jira using ansible playbooks.

 

1 answer

0 votes
Marcin Kanciała
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 5, 2023

That's because your script is being killed by the HUP signal when that ansible task exits.

Use shell: nohup /<dir>/start-jira.sh to tell the shell you wish it to continue running.

 

Example:

- name: Stop Jira App
  shell: nohup /<dir>/start-jira.sh

 

Best regards,
Marcin

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events