You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.