help:::HTTPS hostname wrong: should be <localhost>

Gopalan Suresh Raj ipersist at gmail.com
Wed Sep 22 09:33:24 EDT 2004


Hello Yourghost

I am gussing that you have a certificate that is either not properly
generated or is not installed in your jks keystore.

I am assuming you are using 1.4.x, otherwise you'd have to install
JSSE separately.

To generate the certificate you could do this (substitute argument
values as it suits your system).

%JAVA_HOME%\bin\keytool -delete -alias tomcat -keypass changeit

%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keypass changeit -keyalg RSA

%JAVA_HOME%\bin\keytool -export -alias tomcat -keypass changeit  -file
%FILE_NAME%

%JAVA_HOME%\bin\keytool -import -file server.crt -keypass changeit 
-keystore %JAVA_HOME%/jre/lib/security/cacerts

%JAVA_HOME%\bin\keytool -import -file server.crt -keystore
%JAVA_HOME%\jre\lib\security\cacert

Cheers
Gopalan.


On Wed, 22 Sep 2004 13:25:05 +0800, yourghost <yourghost at 133sh.com> wrote:
> HI,i an using CAS as SSO for our university,but when configering it i have this error.i build an cert on the server ,but when i attempt to access the page: http://localhost:8080/servlets-examples/servlet/HelloWorldExample, and login by user/user, it redirect me to the page http://localhost:8080/servlets-examples/servlet/HelloWorldExample?ticket=ST-2-YHQbGkH6O9zlGZQ9quX8 ,bu it can not be display correctly , the error information is below.
> 
> HTTP Status 500 -
> 
> --------------------------------------------------------------------------------
> 
> type Exception report
> 
> message
> 
> description The server encountered an internal error () that prevented it from fulfilling this request.
> 
> exception
> 
> javax.servlet.ServletException: HTTPS hostname wrong:  should be <localhost>
>         edu.yale.its.tp.cas.client.filter.CASFilter.getAuthenticatedUser(CASFilter.java:254)
>         edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFilter.java:184)
> 
> root cause
> 
> java.io.IOException: HTTPS hostname wrong:  should be <localhost>
>         sun.net.www.protocol.https.HttpsClient.b(DashoA6275)
>         sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
>         sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
>         sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:617)
>         sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(DashoA6275)
>         edu.yale.its.tp.cas.util.SecureURL.retrieve(SecureURL.java:70)
>         edu.yale.its.tp.cas.client.ServiceTicketValidator.validate(ServiceTicketValidator.java:212)
>         edu.yale.its.tp.cas.client.filter.CASFilter.getAuthenticatedUser(CASFilter.java:219)
>         edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFilter.java:184)
> 
> what is the problem ? thank u for reply !!
> 
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
> 



-- 
Co-Author of:
1. Professional JMS Programming (Wrox Press)
2. Enterprise Java Computing : Applications and Architecture
(Cambridge University Press)
3. The Awesome Power of JavaBeans (Manning Publications)

________________________________________________
Copyright (c) 2004, Gopalan Suresh Raj. All Rights Reserved. Visit me
at Web Cornucopia at http://my.execpc.com/~gopalan/

Web Cornucopia - The Ultimate Resource for developing Distributed,
multi-tier, Enterprise Solutions using COM+/Windows DNA, Java/J2EE,
CCM/CORBA 3.0, The Microsoft .NET Framework, and all their related
technologies.



More information about the cas mailing list