Murphy316
Murphy316

Reputation: 766

SSL Servlet Implementation Issue : received a record that exceeded the maximum permissible length

I am having problem using SSL with my application. I did the following:

I added the following passage to my security-contraint tag:

 <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>

and added the following in my Server.xml in Tomcat

<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="c:/keystore.key"
keystorePass="mypassword" />

Now at

https://localhost:8443/Appname/page.jsp

I get the following

Secure Connection Failed
An error occurred during a connection to localhost:8443.

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)
  The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
  Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.

Any suggestions ?

Upvotes: 1

Views: 13371

Answers (3)

Mostafa Soliman
Mostafa Soliman

Reputation: 1

in case anybody is still facing this issue, it could be that you are trying to run this on "http" and not "https", if you are using jetbrains rider, be sure to use the https one at the top right next to the run button

Upvotes: 0

Jagadeesh
Jagadeesh

Reputation: 1

It also depends on the browser you are using. Myself had the same issue in my local environment. I have tried in Firefox and Chrome and faced this issue. But when I tried in Internet Explorer after reading couple post on the google, it worked with no issues.

-Thanks

Upvotes: 0

Joachim Sauer
Joachim Sauer

Reputation: 308041

You must set SSLEnabled to true on your connector.

<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="c:/keystore.key"
keystorePass="mypassword"
SSLEnabled="true" />

Upvotes: 4

Related Questions