Trusted Application Authentication IPv6 Exception

Troubleshooting JIRA Integration

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

While trying to set up an Application Link between JIRA and Stash using Trusted Applications, the following exception is logged in atlassian-stash.log:

SEVERE: Servlet.service() for servlet [default] in context with path [] threw exception
java.lang.IllegalArgumentException: '0:0:0:0:0:0:0:1%0' is not an IP string literal.
	at com.atlassian.ip.InetAddresses.forString(InetAddresses.java:64)
	at com.atlassian.ip.IPMatcher.matches(IPMatcher.java:46)
	at com.atlassian.security.auth.trustedapps.AtlassianIPMatcher.match(AtlassianIPMatcher.java:51)
	at com.atlassian.security.auth.trustedapps.DefaultRequestValidator.validateRemoteRequestIP(DefaultRequestValidator.java:34)
	at com.atlassian.security.auth.trustedapps.DefaultRequestValidator.validate(DefaultRequestValidator.java:26)
	at com.atlassian.security.auth.trustedapps.DefaultTrustedApplication.checkRequest(DefaultTrustedApplication.java:117)
	at com.atlassian.security.auth.trustedapps.DefaultTrustedApplication.decode(DefaultTrustedApplication.java:88)
	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationFilterAuthenticator.authenticate(TrustedApplicationFilterAuthenticator.java:102)

This happens when trying to view the Source tab on a JIRA issue which displays a HTTP 500 error.

Cause

Currently, application links can exhibit some incorrect behavior when IPv6 is enabled due to the way Java deals with IPv6:

Resolution

  • Users can force Java to use IPv4 by adding by appending -Djava.net.preferIPv4Stack=true to JVM_REQUIRED_ARGS or JVM_SUPPORT_RECOMMENDED_ARGS in <Stash installation directory>/bin/setenv.sh

Last modified on Mar 30, 2016

Was this helpful?

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