Unable to Update License due to Untrusted URL

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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:

An unexpected error occurred. Refer to the logs for more information.

From atlassian-jira.log:

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:

  1. JIRA is behind a reverse proxy with these parameters added to server.xml:

    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

  2. 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
  3. 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

Last modified on Nov 18, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.