Can e stop or start JIRA node by node using bash scripting

Eshita Seelam April 3, 2024

Hello Atlassian Community! We are on JIRA DC version 9.4.14 and perform a manual maintenance of restarting nodes, performing a full re index every weekend. We bring down all the nodes and then restart them one by one by manually tunneling to the Linux nodes and using systemctl commands. We were trying to automate this process using bash scripting. 

We tried out the command ssh <user_i>@$ip "systemctl status jira"  where $ip contains the IP address of one of the JIRA nodes, and this command works just fine.

However when we try the command to stop jira using the same: ssh <user_i>@$ip "systemctl stop jira"  it throws us the below error.

Failed to stop jira.service: Interactive authentication required.
See system logs and 'systemctl status jira.service' for details.

 Any help here would be appreciated! Thank you!

1 answer

0 votes
Radek Dostál
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2024

systemctl stop/start should require sudo, so I assume based on that message the ssh goes in, command is run, but the command then asks the user for sudo password, unless you are ssh'ing as root?


Suggest an answer

Log in or Sign up to answer