Problem with installation hosted add-on on Jira Cloud

Hi

I create add-on on Jira Cloud and I have some problems with plugin registration on marketplace and then installing its on local and „public” Jira Instance.

Add-on is written in Node.js + Express framework. I've used toolkit atlassian-connect-express to create this app. I've chosen Amazon Web Services to host this application.

To show you a problem, I've created a simple web application and I've made a few tests on local/public jira instance with locally and publicly running this application.

 

Test 1. Local JIRA (6.5-OD-05-041) and local application without automatic registration on hosts defined in config.json (I commented this lines, cause I wanted to simulate manual installation of addon)

I made the following steps:

1. Create new project SimpleAddOn (with command atlas-connect SimpleAddOn)

2. Comment defined hosts in config.json

3. Start Jira

4. Start SimpleAddOn application

5. Upload add-on by functionality on Mange add-ons

6. Installation was successful. Everything's run well.

 

Test 2. Local JIRA (6.5-OD-05-041) and application on AWS

1. Create new instance on AWS (Ubuntu), installation and configuration of nodejs.

2. Run same application SimpleAddOn on port 80

(http://ec2-52-26-200-109.us-west-2.compute.amazonaws.com/atlassian-connect.json)

3. Add new private add-on on Marketplace (https://marketplace.atlassian.com/files/1.0.0-AC/artifact/descriptor/5dec50ed-debd-4cfe-b7bf-2b3536dd436d/atlassian-connect.json)

4. Upload plugin on Local Jira Cloud Instance

5. Getting following errors

a) on JIRA side

„The add-on host returned HTTP response code 401 when we tried to contact it during installation. Please try again later or contact the add-on vendor. „

test2-screen-1.png

b) on Add-On side

[VERIFY] Attempt 1 : Verifying public key for instance http://my_host_name:2990/jira
[VERIFY] Attempt 1 : Could not retrieve public key for instance http://my_host_name:2990/jira to verify public key for instance http://my_host_name:2990/jira Waiting 2000ms before retrying. { [Error: getaddrinfo ENOTFOUND my_host_name]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'my_host_name' }
[VERIFY] Attempt 2 : Verifying public key for instance http://my_host_name:2990/jira
[VERIFY] Attempt 2 : Could not retrieve public key for instance http://my_host_name:2990/jira to verify public key for instance http://my_host_name:2990/jira Waiting 2000ms before retrying. { [Error: getaddrinfo ENOTFOUND my_host_name]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'my_host_name' }
[VERIFY] Attempt 3 : Verifying public key for instance http://my_host_name:2990/jira
[VERIFY] Attempt 3 : Could not retrieve public key for instance http://my_host_name:2990/jira to verify public key for instance http://my_host_name:2990/jira { [Error: getaddrinfo ENOTFOUND my_host_name]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'my_host_name' }
Installation verification error: 401 Unable to verify public key for host http://my_host_name:2990/jira: Error: getaddrinfo ENOTFOUND my_host_name
POST /installed?user_key=admin 401 4019ms - 103b

There is my first question. Why installation process can not perform post '/installed' as in the Test 1?

In first test (Local Jira & Local app) there was no problem with this operation.

 

Test 3. Public instance of JIRA Cloud and application on AWS.

The difference between this test and Test 2, is that the JIRA Instance is available at public url.

So, in plugin installation step, when I was uploading add-on I've got this error:

test3-screen-1.png

What does this error mean? I'm confused, because when we create add-on on marketplace we can find following information

"Provide a URL with a standard port (80 or 443) for your add-on."

test3-screen-2.png


Test 4. Creating add-on on marketplace based on application served over HTTPS.

a) When I create add-on on marketplace from URL https://ec2-52-24-37-244.us-west-2.compute.amazonaws.com/atlassian-connect.json

I've got following error

The Marketplace can't download your add-on using the provided URL. Provide a publicly accessible URL for your add-on.

test4-screen-1.png

b) When I try upload add-on on my local instance of JIRA Cloud I've got error

Problem accessing add-on file at https://ec2-52-24-37-244.us-west2.compute.amazonaws.com/atlassian-connect.json

test4-screen-2.png


Does it mean that my SSL certificate is not valid? What should I do to resolve this error?

 

Thank you in advance for all your answers
Best Regards

2 answers

1 accepted

Thank you for reply, but i did it what you say.

I've created private listing in Test 2 (descriptor), for web application served over HTTP, but I can use it only loclally. Unfortunately with error described above.

When I tried create private listing for application served over HTTPS from hosted app under this link, I got this error: "The Marketplace can't download your add-on using the provided URL. Provide a publicly accessible URL for your add-on.". Details of this error are described above in Test 4

I read this guide all the time smile

 

When I try and view your Atlassian Connect descriptor (HTTPS) directly I can see that the security certificate does not look valid. You will need a valid HTTPS certificate to install your Atlassian Connect descriptor in production. That is why the Marketplace did not accept your HTTPS version of your descriptor. You need to fix that in order to get it working in production. (Also, you should stop trying to use a http version of your descriptor, I can see that you have tried to install it on a production instance and got the error "Add-on 'simple-addon-on-demand-plugins' specifies a 'baseUrl' with the scheme 'http'." I promise you that addons that don't use HTTPS cannot be installed on a production Cloud instance) :)

Ok I understand, but what about problem described in my Test 2, my question was "Why installation process can not perform post '/installed' as in the Test 1?". I am only afraid that if I deal with the problem of a certificate then I'll get problem from Test 2. Please tell me, where I should find solution? Is this a bug of toolkit atlassian-connect-express, that plugin cannot be installed?

The reason that the Test 2 descriptor failed is because it is not HTTPS: https://goo.gl/K003Ul If you use a descriptor provided via HTTPS using a valid certificate then it will install just fine.

If you want to test the solution without setting up your own certificates, try ngrok https://ngrok.com/ They provide a wild card certificate for a temporary url

Thanks guys for help. I'll test your proposals and I'll inform you of the result, in the near future.

Descriptor provided via HTTPS with valid certificate resolved the problem :-) Thank you.

Awesome! We're just happy that you have you add-on installed in cloud! Have fun and keep asking questions!

Getting Invalid .json descriptor file Error. Please suggest correct format of json file.We are using trail version of JIRA cloud.

@Arsin Effecta try and use the validator first: https://atlassian-connect-validator.herokuapp.com/validate

I have validated the file and result shows as Validation passed. You can refer the file from here. https://46161658.ngrok.io/App/atlassian-connect.json ( or ) This is the file content. { "name": "Hello World", "description": "Atlassian Connect add-on", "key": "net.ArsinEffecta.jira.EffectaPlug", "baseUrl": "https://arsin-it.atlassian.net";, "vendor": { "name": "Arsin, Inc.", "url": "http://arsin.com"; }, "authentication": { "type": "none" }, "apiVersion": 1, "modules": { "generalPages": [ { "url": "/Helloworld.html", "key": "hello-world", "location": "system.top.navigation.bar", "name": { "value": "Greeting" } } ] } }

It cannot have shown as passed because you have semicolons in your json.

1 votes

Just glanced over your post really quickly but it seems that the issue is that you have not created a Marketplace listing for your addon.

Atlassian Cloud production instances will not accept plugin installations from anything other than marketplace.atlssian.com. We remove that restriction for local development.

I would recommend that you create a private listing in the Atlassian Marketplace for your addon and then use the marketplace url for your descriptior to install your addon on your production Atlassian Cloud instance.

See the Atlassian Connect docs guide on this topic for more info: https://developer.atlassian.com/static/connect/docs/latest/developing/cloud-installation.html

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,139 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot