Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-33340

Auto Look and Feel fails with incorrect Base URL

    XMLWordPrintable

Details

    Description

      When an incorrectly defined Base URL is set, the "Auto Look and Feel" option results in browser errror.

      Common scenario could be SSL without the proper certs, etc. Especially after a migration/upgrade.

      • Browser:
        Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.
        
      • The following would appear in logs
        2013-05-30 09:42:10,432 http-bio-127.0.0.1-18000-exec-16 ERROR      [500ErrorPage.jsp] Exception caught in 500 page javax.imageio.IIOException: Can't get input stream from URL!
        java.lang.RuntimeException: javax.imageio.IIOException: Can't get input stream from URL!
        	at com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.getLogoInfo(AutoLookAndFeelManager.java:245)
        	at com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.generateFromLogo(AutoLookAndFeelManager.java:53)
        	at com.atlassian.jira.lookandfeel.EditLookAndFeel.doAutoUpdateColors(EditLookAndFeel.java:368)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        	at java.lang.reflect.Method.invoke(Unknown Source)
        	at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
        	at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
        ...
        
        Caused by: javax.imageio.IIOException: Can't get input stream from URL!
        	at javax.imageio.ImageIO.read(Unknown Source)
        	at com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.getLogoInfo(AutoLookAndFeelManager.java:240)
        	... 193 more
        Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        	at sun.security.ssl.Alerts.getSSLException(Unknown Source)
        	at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
        	at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        	at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        	at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
        	at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
        	at sun.security.ssl.Handshaker.processLoop(Unknown Source)
        	at sun.security.ssl.Handshaker.process_record(Unknown Source)
        	at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
        	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
        	at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        	at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        	at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
        	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
        	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
        	at java.net.URL.openStream(Unknown Source)
        	... 195 more
        Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        	at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
        	at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
        	at sun.security.validator.Validator.validate(Unknown Source)
        	at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
        	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
        	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
        	... 208 more
        Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
        	at java.security.cert.CertPathBuilder.build(Unknown Source)
        	... 214 more
        
      • In this case, JIRA needed a SSL cert installed into Java

      This may also occur if the URL is simply badly defined, like http://wrongurl:8001

      Quick reproduce:
      • Fresh JIRA install, http://localhost:8080
      • Edit Base URL to: https://localhost:8080
      • Navigate to Look and Feel
      • Upload a logo
      • Click the "To apply a color scheme that matches your logo, click here." option
      • Browser/logs error

      Expectation: re-color works or some message about the base URL being ill-defined.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dchan David Chan
              Votes:
              3 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: