Tomcat Configuration SSL Error Resolution: Java.lang.IllegalArgumentException:Invalid character (CR or LF) found in method Nam__tomcat

Source: Internet
Author: User

Certificate authentication for HTTPS protocol was configured in Tomcat's server.xml using CAS single point of entry, but the access times were wrong:

INFO [http-nio-8443-exec-4] org.apache.coyote.http11.AbstractHttp11Processor.process Error parsing HTTP request Header
 note:further occurrences of HTTP header parsing errors'll is logged at the DEBUG level.
 Java.lang.IllegalArgumentException:Invalid character (CR or LF) found in
    Org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine (abstractnioinputbuffer.java:228)

Toss for a long time, search other people's answers mostly because of SSL configuration problem, but I copy a few bloggers of the configuration always error.

The reason for the error is because I stole a little lazy .... The direct copy configuration parameter, does not cancel the annotation own configuration, causes the configuration incomplete error.

The following server.xml:

<!--copy configuration-->
 <!--<connector port= "8443" maxhttpheadersize= "1048576" 
     maxthreads= "150" minsparethreads= "maxsparethreads="    
     enablelookups= "false" disableuploadtimeout= "true"    
     acceptcount= "Scheme=" "https" secure= "true"    
     clientauth= "false" sslprotocol= "TLS" keystorefile= "F:/keys/my.keystore" keystorepass= "Xz19950122xz"/> 
 -->

 <!--with its own configuration, uncomment, plus keystorefile and Keystorepass-->
 < Connector port= "8443" protocol= "Org.apache.coyote.http11.Http11NioProtocol" "maxthreads="
               true "Scheme=" https "secure=" true "
               clientauth=" false "sslprotocol=" TLS "
               keystorefile=" F:/keys/my.keystore " keystorepass= "Xz19950122xz"/> 

After modifying the 8443 port of HTTPS again, the browser successfully jumps:

Your connection is not a private connection

an attacker may attempt to steal your information from the localhost (for example, a password, communication content, or credit card information). For more information

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.