Configuring CAS error no Certificate file specified or invalid file format

Source: Internet
Author: User

After configuring the Tomcat certificate KeyStore file, the error has been started: (Tomcat version: apache-tomcat-6.0.43)

Tomcat configuration:

    <ConnectorPort= "8443"Protocol= "http/1.1"sslenabled= "true"MaxThreads= "Max"Scheme= "https"Secure= "true"ClientAuth= "false"Sslprotocol= "TLS"Keystorefile= "Conf/tomcat.keystore"Keystorepass= "123456" />
Tomcat.keystore Location:

Error message:
Severity: Error Initializing Endpoint
Java.lang.Exception:No Certificate file specified or invalid file format
At Org.apache.tomcat.jni.SSLContext.setCertificate (Native Method)
At Org.apache.tomcat.util.net.AprEndpoint.init (aprendpoint.java:836)
At Org.apache.coyote.http11.Http11AprProtocol.init (http11aprprotocol.java:109)
At Org.apache.catalina.connector.Connector.initialize (connector.java:1123)
At Org.apache.catalina.core.StandardService.initialize (standardservice.java:703)
At Org.apache.catalina.core.StandardServer.initialize (standardserver.java:843)
At Org.apache.catalina.startup.Catalina.load (catalina.java:538)
At Org.apache.catalina.startup.Catalina.load (catalina.java:562)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)
At Java.lang.reflect.Method.invoke (method.java:597)
At Org.apache.catalina.startup.Bootstrap.load (bootstrap.java:261)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:413)
2015-3-3 16:05:52 Org.apache.catalina.core.StandardService Initialize
Severity: Failed to initialize connector [connector[http/1.1-8443]]
Lifecycleexception:protocol handler initialization failed:java.lang.Exception:No Certificate file specified or invalid File format
At Org.apache.catalina.connector.Connector.initialize (connector.java:1125)
At Org.apache.catalina.core.StandardService.initialize (standardservice.java:703)
At Org.apache.catalina.core.StandardServer.initialize (standardserver.java:843)
At Org.apache.catalina.startup.Catalina.load (catalina.java:538)
At Org.apache.catalina.startup.Catalina.load (catalina.java:562)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25)
At Java.lang.reflect.Method.invoke (method.java:597)
At Org.apache.catalina.startup.Bootstrap.load (bootstrap.java:261)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:413)

Workaround:
Different Tomcat version number SSL configuration is different, you use if is tomcat6.0 words:

<connector protocol= "org.apache.coyote.http11.Http11NioProtocol" port= "8443" minsparethreads= "5"
Maxsparethreads= "enablelookups=" true "disableuploadtimeout=" true "acceptcount=" "maxthreads=" 200 "
Scheme= "https" secure= "true" sslenabled= "true" Clientauth= "false" sslprotocol= "TLS"
Keystorefile= "F:/apache-tomcat/server.keystore" keystorepass= "password"/>

So change the config file to
    <ConnectorPort= "8443"Protocol= "Org.apache.coyote.http11.Http11NioProtocol"sslenabled= "true"MaxThreads= "Max"Scheme= "https"Secure= "true"ClientAuth= "false"Sslprotocol= "TLS"Keystorefile= "Conf/tomcat.keystore"Keystorepass= "123456" />

The problem is solved.

It is worth mentioning that Tomcat is also fraught ah, server.xml in the sample configuration of annotations is

Protocol= "http/1.1"
<!--
<connector port= "8443" protocol= "http/1.1" sslenabled= "true"
maxthreads= "Scheme=" "https" secure= "true"
Clientauth= "false" sslprotocol= "TLS"/>
-
Really is too the pit Father!!!


Configuring CAS error no Certificate file specified or invalid file format

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.