Forums

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

How to find IP of my JIRA cloud instance

Shravan Pandita July 21, 2022

I want to make some REST API call to an external system from my JIRA cloud instance so I need to whitelist my cloud instance IP. Where can I find the IP of my cloud instance

3 answers

1 vote
Alexis Robert
Community Champion
July 21, 2022

Hi @Shravan Pandita ,

 

you can find here the list of IP addresses used by Atlassian Cloud products : https://support.atlassian.com/organization-administration/docs/ip-addresses-and-domains-for-atlassian-cloud-products/

 

You'll see that they have a section for Outgoing Connections here : https://support.atlassian.com/organization-administration/docs/ip-addresses-and-domains-for-atlassian-cloud-products/#Outgoing-Connections

You can use this for your whitelist.

 

Let me know if this helps,

 

--Alexis

Shravan Pandita July 21, 2022

Thanks Alexis for the reply

0 votes
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.
July 21, 2022

@Alexis Robert has given you all the data you need to solve this problem, but I want to add a little bit.  

The IP address of your Cloud system may change, without any warning or notice.  If you set things up as Alexis suggests, you won't have a problem with it.

Shravan Pandita July 25, 2022

Hi Nic,

I have whitelisted the range provided in above document given by Atlassian, but still I am not able to connect to my external API. It gives request timeout error. Just to add when I run the ping command for my local Jira instance (cloud instance from where I need to connect to external API), the IP is different from the range. It's starting numbers are the same but the last digit is different.

Example

Atlassian Range is 104.192.137.240/28 whereas my ping result is 104.192.137.19 and sometimes 104.192.137.20.

This range ,I guess is not covered in the Atlassian IP range. Kindly advise.

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.
July 25, 2022

The /28 in the range tells you how many bits to look at.  The usual one I see and use most often is 24 - 192.168.1.0/24 is a range from 192.168.1.1 to 192.168.1.255

The 19 and 20 numbers you are seeing are within the 104.192.137.240/28 range.

Shravan Pandita July 26, 2022

Hey Nic, 

Thanks for your prompt reply. I will check this if my issue gets resolved. I need to ask a different question may be in parts, kindly can you advise also on the same.

1. I need to deploy Script runner code to our cloud instance. How can we do that , is there any XML way possible to achieve the same.

2. Is there any re-try mechanism available in cloud script runner. By this I mean, if my API fails for the first time it should be automatically re-tried.

3. Do we have provision such that I can lock a transaction, Example if my comment is getting updated from external API for an issue ,and it is taking time then no subsequent comment should be updated until first one is completed.

Hope I have not asked lots of questions and you can answer my queries.

Thanks in Advance

Shravan Pandita

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.
July 26, 2022
  1. Go to Admin -> manage apps and install it.  It's a one-off action, that should always be a conscious decision by a human admin,  there's no point in looking for XML or other automations.
  2. You can write one - if an action fails, the response will tell you so and you can code to re-try it.
  3. Changes are atomic and effectively queued - you can't have a situation where someone makes a comment at the same time that another is being updated.  One action is always going to be requested and completed before another can be made.
Shravan Pandita July 26, 2022

Thanks Nic for your reply.

 

1. For this point what I meant was , I need to deploy my scripts from lower(DEV) to PROD environments. what should be the approach for the same. Is there any XML based approach where I can export my scripts from one environment and then import in another.

 

3. From your explanation, what I understand is that if I pull some updates from external system like Service Now  to JIRA and I have an issue comment which I need to update, then first comment will always be updated first, it will never happen that second comment got through first. What happens if first comment processing took time to complete and I got the second comment as well.

 

Thanks IN Advance

Shravan Pandita

Shravan Pandita August 4, 2022

Hi Nic,

I have whitelisted the IPs mentioned in the above links of Atlassian but still I get timeout exception on hitting the REST API(I am testing with a  GET). I am getting below error, can you help or advise what should I do to resolve this.

 

io.github.openunirest.http.exceptions.UnirestException: org.apache.http.conn.ConnectTimeoutException: Connect to [my external URL]:443 [my external URL] failed: connect timed out at io.github.openunirest.request.HttpClientHelper.request(HttpClientHelper.java:41) at io.github.openunirest.request.BaseRequest.request(BaseRequest.java:92) at io.github.openunirest.request.BaseRequest.asObject(BaseRequest.java:147) at io.github.openunirest.request.BaseRequest$asObject.call(Unknown Source) at Script1.get(Script1.groovy:22) at Script1$get$0.callCurrent(Unknown Source) at Script1.run(Script1.groovy:4) at Script1$run.call(Unknown Source) at Script1$run.call(Unknown Source) at com.adaptavist.sr.cloud.workflow.AbstractScript.evaluate(AbstractScript.groovy:33) at com.adaptavist.sr.cloud.events.ScriptExecution.run(ScriptExecution.groovy:29) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at ConsoleScriptExecution1_groovyProxy.run(Unknown Source)

 

Also logs show this error.

Connection timed out to connect to GET https://my URL. Your request failed due to connect timeout which is set up to 5000 msPlease remember though that the maximum invocation time of your code is 120 seconds, read more on https://docs.adaptavist.com/sr4jc/latest/about-scriptrunner-for-jira-cloud/limitations 

Regards

Shravan

0 votes
Mayur Jadhav
Community Champion
July 21, 2022

Hi @Shravan Pandita ,

I don't think so you can find the IP of your cloud instance, but Atlassian has created a document on IP addresses and domains for Atlassian cloud products.

Please have a look and whitelist all the IPs mentioned in the document.

 

Cheers,

Mayur

Shravan Pandita July 21, 2022

Thanks Mayur for your reply

Like Mayur Jadhav likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events