ср, 4 дек. 2019 г. в 22:38, Christopher Schultz <ch...@christopherschultz.net>:
> Konstantin,
>
> On 12/4/19 13:33, Konstantin Kolinko wrote:
> > ср, 4 дек. 2019 г. в 20:28, Christopher Schultz
> > <ch...@christopherschultz.net>:
> >>
> >> All,
> >>
> >> I feel like I should be able to figure this out on my own, but
> >> I'm drawing a blank.
> >>
> >> I'm trying to upgrade from Apache Tomcat 8.0.35 to Apache Tomcat
> >> 8.5.35 and I'm getting errors on a certain portion of the
> >> conf/server.xml configuration.
> >>
> >> I copy have a perfect copy/paste of the config file here but
> >> basically this is configuring a keystore for TLS. Something like
> >> this:
> >>
> >> <Connector [...] keystoreFile="E:\path\to\keystore.jks" [...] />
> >>
> >> The error is "unknown protocol: e". Clearly,
> >> Tomcat/Java/URL/whatever thinks that "E:" is a protocol. No
> >> problem... this has to be a file URL, so let's make it a file
> >> URL: [...]
> >
> > Chris,
> >
> > 1) Do know where that message is produced? (Stacktrace? What
> > version of Tomcat?)
> >
> > E.g. it may be that the code has several attempts to use the value
> > a) as file path, b) as URL,  and you only see the message from the
> > second attempt b), but it is a) that fails.
>
> I can get all that. I don't have access ATM. This was definitely being
> called through createSSLContext() and getStore() while loading the
> keystore. I'll write back when I have that exact info.
>
> > Is your keystoreFile path correct?
>
> Yes, if you ignore the fact that I cannot figure out how to "spell" it
> properly :)
>
> This works without error on the same Java version but using Tomcat 8.0.35.

Looking at the code, Tomcat 8.5 was refactored to use ConfigFileLoader there.
The message produced by ConfigFileLoader is rather misleading.
It is actually a "new File(location).isFile()" call that returns "false".

Looking at the sources of 8.5.x, the call path is probably the following:
o.a.t.util.net.SSLHostConfigCertificate#getCertificateKeystore():

            result = SSLUtilBase.getStore(getCertificateKeystoreType(),
                    getCertificateKeystoreProvider(),
getCertificateKeystoreFile(),
                    getCertificateKeystorePassword());

o.a.t.util.net.SSLUtilBase#getStore(...) L197

                    istream = ConfigFileLoader.getInputStream(path);

org.apache.tomcat.util.file.ConfigFileLoader

https://github.com/apache/tomcat/blob/8.5.x/java/org/apache/tomcat/util/file/ConfigFileLoader.java#L79

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to