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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,525
Community Members
 
Community Events
185
Community Groups

We cannot start the jira using ansible playbook

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

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