Unable to Update License due to Untrusted URL
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
JIRA admin fails to update a JIRA Application license from the Versions & licenses page. JIRA throws this message in the GUI:
1
An unexpected error occurred. Refer to the logs for more information.
From atlassian-jira.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
2018-07-24 09:21:07,059 http-nio-8080-exec-6 ERROR jiraprdadmin 561x84079x1 dsvxqi 10.0.3.4:42110,10.0.1.4 /rest/plugins/applications/1.0/installed/jira-software/license [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
java.lang.NullPointerException
at com.atlassian.plugins.whitelist.core.matcher.MatcherUtils.compare(MatcherUtils.java:59)
at com.atlassian.plugins.whitelist.core.matcher.MatcherUtils.compare(MatcherUtils.java:78)
at com.atlassian.plugins.whitelist.core.matcher.SelfUrlMatcher.apply(SelfUrlMatcher.java:27)
at com.atlassian.plugins.whitelist.core.AbstractWhitelist.isAllowed(AbstractWhitelist.java:41)
at com.atlassian.plugins.cors.WhitelistBasedCorsDefaults.allowsOrigin(WhitelistBasedCorsDefaults.java:51)
... 2 filtered
at com.google.common.collect.Iterators.indexOf(Iterators.java:778)
at com.google.common.collect.Iterators.any(Iterators.java:684)
at com.google.common.collect.Iterables.any(Iterables.java:623)
... 13 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
... 1 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
... 41 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 53 filtered
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
... 16 filtered
at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
... 19 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 10 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 4 filtered
at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
... 26 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 23 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Cause
JIRA is not being accessed from its Base URL, or the Base URL is not set correctly, leading to a problem with the untrusted URL.
A typical scenario is:
JIRA is behind a reverse proxy with these parameters added to
server.xml
:1
proxyName="jira.company.com" proxyPort="443" scheme="https"
This means JIRA's Base URL should be set to https://jira.company.com, and JIRA admin is supposed to access JIRA via that URL to update the license
JIRA's Base URL is however set to a different URL e.g. http://jira.local.com or even using a wrong URL format e.g. just
jira.local.com
JIRA admin accesses the wrong Base URL to update the license, leading to the error
Resolution
As JIRA admin:
Make sure JIRA's Base URL is set correctly
Make sure to access JIRA via its correct Base URL to update the license
Was this helpful?