Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why am I getting an error that these Jira directories don't exist- am I referencing the wrong ones?

MP32
Contributor
November 2, 2022

I'm trying to have my user-data script copy certain directories to my sharedhome directory utilizing this example code from this doc: 

cp -R /var/atlassian/application-data/jira/{data,plugins,logos,import,export,keys} /data/jira/sharedhome

When I installed Jira, I set this as my home directory 

/var/atlassian/application-data/jira

 

The document says to copy those subdirectories from your Jira home directory. However, when my script runs that command at the very end, it tells me none of those directories exist. How is that so? Am I referencing the directories incorrectly?

 

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
November 2, 2022

Yes, you probably are.

Could you explain what you are trying to do at a higher level?  Install a second node? Convert Server to DC?  Migrate Server to DC?  

MP32
Contributor
November 2, 2022

I'm trying to deploy two nodes at once to run in a cluster. They get deployed via an auto-scaling group and share this user-data script

 

echo "===== Downloading Jira ====="

cat <<\EOF >> ~/jira.varfile
app.confHome=/var/atlassian/application-data/jira
app.install.service$Boolean=false
portChoice=custom
httpPort$Long=8080
rmiPort$Long=8443
launch.application$Boolean=false
sys.adminRights$Boolean=true
sys.confirmedUpdateInstallationString=false
sys.installationDir=/opt/atlassian/jira
sys.languageId=en
EOF

echo "done"
echo "===== Modify Jira Permissions ====="
chmod +x ~/jira.bin
echo "===== Start Jira Install ====="
sudo ~/jira.bin -q -varfile ~/jira.varfile
sudo /opt/atlassian/jira/bin/startup.sh
echo "===== Cleaning up Jira Files ====="
rm -f ~/jira.bin
rm -f ~/jira.varfile
chmod 750 /opt/atlassian/jira/logs/

mkdir /var/sharedhome

echo "===== Mounting EFS ====="
echo "${efs_id}:/ /var/sharedhome efs _netdev,tls,iam,nofail 0 0" | tee -a /etc/fstab
mount -a

echo -e "jira.node.id = node$RANDOM \njira.shared.home = /var/sharedhome" | tee -a /var/atlassian/application-data/jira/cluster.properties

cp -R /var/atlassian/application-data/jira/{data,plugins,import,export} /var/sharedhome


Everything works until the very end, when it tries to copy those directories to the /var/sharedhome directory, when it says that the /var/atlassian/application-data/jira/data, /var/atlassian/application-data/jira/plugins etc. directories don't exist. This is the initial stand-up I'm doing where I'm deploying the two instances for the first time (as part of an ASG) and I'm trying to have the script copy those directories to the EFS mounted directory
Nic Brough -Adaptavist-
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.
November 2, 2022

Ok, that implies that your installation is not running to completion on the first node.  The install will create the directories and content it needs, so when you come to copy, and find the files are not there, that's why it's failing.

MP32
Contributor
November 2, 2022

Looking through the logs- Jira gets installed and completed before trying to copy the directories and I just tried running those commands manually and it's still telling me the directories don't exist. What other things can I try? 

Nic Brough -Adaptavist-
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.
November 2, 2022

If the home directory is empty, missing the directories you are looking for, then it has not completed.  

You might want to check the permissions as well, but "do not exist" almost always means they are not there.

Is your first node actually up and running?  If it is, then you'll find you have created the directories somewhere else.  Maybe look to the defaults?

MP32
Contributor
November 3, 2022

When I go to the home directory, which I believe is the default home directory and also what I set to be my home directory in my script (/var/atlassian/application-data/jira) this is what's there: 

caches cluster.properties log plugins tmp

Obviously my script adds the cluster.properties file after the install.

The first node works (I believe?),  I can access the Jira set-up page: Screen Shot 2022-11-03 at 1.41.04 PM.png

Nic Brough -Adaptavist-
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.
November 3, 2022

Ok, so you have not finished setting up the first node, that explains why the directories are empty.

Suggest an answer

Log in or Sign up to answer