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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.