Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPMRPP-89664 || Update article 'Issues with JIRA BTS how to resolve' #684

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,49 @@ Screen with CAPTCHA should appears
5. Submit the credentials again
6. Now try to establish the connection to JIRA on ReportPortal project.

**Fourth**, maybe the connection to the jira instance requires a certificate, in this
case you need to import the certificate inside the jira container:

1. docker exec -it reportportal_jira_1 ash # go inside shell
2. cd /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/
3. wget url://to/your/foo.cert
4. keytool -importcert -noprompt -file foo.crt -alias "JIRA CERT" -keystore cacerts -storepass abc123 (default password for keystore: changeit)
5. exit and restart the docker jira
6. Now try to establish the connection to JIRA on ReportPortal project.
**Fourth**, the connection to the JIRA instance might require a certificate. If that's the case, the certificate needs to be imported inside the API container. Follow these steps:

```sh
# 1. Access the shell of the API Docker container
docker exec -it reportportal_api_1 /bin/sh

# 2. Change the directory to point to the 'security' directory
cd /usr/lib/jvm/jre/lib/security/
# Or use this command if the 'security' directory is in another folder:
# cd /usr/lib/jvm/java-11-amazon-corretto/jre/lib/security/

Note: Replace 'java-11-amazon-corretto' with the version in the latest API Docker image.

# 3. Get the certificate file
curl -O url://to/your/foo.cert

# 4. Import the certificate
keytool -importcert -noprompt -file foo.cert -alias "JIRA CERT" -keystore cacerts -storepass abc123 # note: the default password for the keystore is 'changeit'

or
# 5. Exit the shell and restart the docker API.
exit

1. docker cp cert.der reportportal_jira_1:/cert.der
2. docker exec -t -i reportportal_jira_1 ./usr/lib/jvm/java-1.8-openjdk/jre/bin/keytool -import -alias rootcert -keystore /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/cacerts -file /cert.der
3. exit and restart the docker jira
4. Now try to establish the connection to JIRA on ReportPortal project.
# 6. Try to establish the connection to JIRA on the ReportPortal project again.
```
Or use this alternative method:

```sh
# 1. Copy the certificate into the Docker container
docker cp cert.der reportportal_api_1:/cert.der

# 2. Import the certificate
docker exec -t -i reportportal_api_1 ./usr/lib/jvm/jre/bin/keytool -import -alias rootcert -keystore /usr/lib/jvm/jre/lib/security/cacerts -file /cert.der
# If the 'jre' folder is inside another folder, use the following command instead:
# docker exec -t -i reportportal_api_1 ./usr/lib/jvm/java-11-amazon-corretto/jre/bin/keytool -import -alias rootcert -keystore /usr/lib/jvm/java-11-amazon-corretto/jre/lib/security/cacerts -file /cert.der

Note: Replace 'java-11-amazon-corretto' with the version in the latest API Docker image.

# 3. Exit and restart the Docker API.
exit

# 4. Attempt the connection to JIRA on ReportPortal project again.
```
Both methods should allow you to import the necessary certificate for your JIRA connection inside the ReportPortal API container.

:::note
SSL instance of JIRA (even cloud version) can be accessed by JIRA API token, used instead of password.
Expand Down
Loading