You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by Colm O hEigeartaigh <co...@apache.org> on 2018/03/14 11:56:04 UTC

Re: Syncope-console https java.io.IOException: IOException invoking https://localhost/syncope/rest/platform: HTTPS hostname wrong: should be

Try adding: -dname "cn=localhost" as an option when creating the keystore
using keytool, maybe there is a problem when you are specifying it manually.

Colm.

On Mon, Mar 12, 2018 at 3:36 AM, Ravindra Singareddy <singareddy@hotmail.com
> wrote:

> Hi All,
>
> I am running into issue, when running syncope-console in https with self
> signed certificates in Wildfly.
>
>
>
> Here are commands are used for signing the certificate
>
>
>
>
>
> cd /opt/bitnami/wildfly/standalone/configuration
>
> sudo keytool -genkey -alias server -keyalg RSA -validity 3650 -keysize
> 2048 -keystore server.keystore
>
> sudo chown wildfly:wildfly ./server.keystore
>
>
>
> Used CN name as localhost
>
>
>
> (https://docs.bitnami.com/aws/infrastructure/wildfly/ )
>
>
>
> I am able to successfully deploy syncope.war file and when deploying
> syncope-console.war giving following error:
>
> Your help in this regard, greatly appreciated.
>
> Thanks
>
>
>
> Ravi
>
> ____________________________________________________________
> ____________________________________
>
>
>
> Caused by: javax.ws.rs.ProcessingException: java.io.IOException:
> IOException invoking https://localhost/syncope/rest/platform: HTTPS
> hostname wrong:  should be <localhost>
>
>         at org.apache.cxf.jaxrs.client.AbstractClient.
> checkClientException(AbstractClient.java:608)
>
>         at org.apache.cxf.jaxrs.client.AbstractClient.preProcessResult(
> AbstractClient.java:584)
>
>         at org.apache.cxf.jaxrs.client.ClientProxyImpl.
> doChainedInvocation(ClientProxyImpl.java:783)
>
>         at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(
> ClientProxyImpl.java:235)
>
>         at com.sun.proxy.$Proxy495.platform(Unknown Source)
>
>         at org.apache.syncope.client.console.SyncopeConsoleSession.
> <init>(SyncopeConsoleSession.java:109)
>
>         ... 63 more
>
> Caused by: java.io.IOException: IOException invoking
> https://localhost/syncope/rest/platform: HTTPS hostname wrong:  should be
> <localhost>
>
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(
> NativeConstructorAccessorImpl.java:62)
>
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> DelegatingConstructorAccessorImpl.java:45)
>
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.
> mapException(HTTPConduit.java:1390)
>
>         at org.apache.cxf.transport.http.HTTPConduit$
> WrappedOutputStream.close(HTTPConduit.java:1374)
>
>         at org.apache.cxf.transport.AbstractConduit.close(
> AbstractConduit.java:56)
>
>         at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.
> java:658)
>
>         at org.apache.cxf.interceptor.MessageSenderInterceptor$
> MessageSenderEndingInterceptor.handleMessage(
> MessageSenderInterceptor.java:62)
>
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:308)
>
>         at org.apache.cxf.jaxrs.client.AbstractClient.
> doRunInterceptorChain(AbstractClient.java:681)
>
>         at org.apache.cxf.jaxrs.client.ClientProxyImpl.
> doChainedInvocation(ClientProxyImpl.java:781)
>
>         ... 66 more
>
> Caused by: java.io.IOException: HTTPS hostname wrong:  should be
> <localhost>
>
>         at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(
> HttpsClient.java:649)
>
>         at sun.net.www.protocol.https.HttpsClient.afterConnect(
> HttpsClient.java:573)
>
>         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnec
> tion.connect(AbstractDelegateHttpsURLConnection.java:185)
>
>         at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(
> HttpURLConnection.java:1564)
>
>         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(
> HttpURLConnection.java:1492)
>
>         at java.net.HttpURLConnection.getResponseCode(
> HttpURLConnection.java:480)
>
>         at sun.net.www.protocol.https.HttpsURLConnectionImpl.
> getResponseCode(HttpsURLConnectionImpl.java:347)
>
>         at org.apache.cxf.transport.http.URLConnectionHTTPConduit$
> URLConnectionWrappedOutputStream$2.run(URLConnectionHTTPConduit.java:379)
>
>         at org.apache.cxf.transport.http.URLConnectionHTTPConduit$
> URLConnectionWrappedOutputStream$2.run(URLConnectionHTTPConduit.java:375)
>
>         at java.security.AccessController.doPrivileged(Native Method)
>
>
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: Syncope-console https java.io.IOException: IOException invoking https://localhost/syncope/rest/platform: HTTPS hostname wrong: should be

Posted by Ravindra Singareddy <si...@hotmail.com>.
Thanks Colm. The issue was with the Amazon Webservices instance and host name is mapped to internal host name and on the certificate given localhost as cn name. The resolution will be to change hostname on the virtual name and which matches with the certificate cn name.

- Ravi

<http://www.ooftish.com>


________________________________
From: Colm O hEigeartaigh <co...@apache.org>
Sent: Wednesday, March 14, 2018 11:56 AM
To: user@syncope.apache.org
Subject: Re: Syncope-console https java.io.IOException: IOException invoking https://localhost/syncope/rest/platform: HTTPS hostname wrong: should be <localhost>

Try adding: -dname "cn=localhost" as an option when creating the keystore using keytool, maybe there is a problem when you are specifying it manually.

Colm.

On Mon, Mar 12, 2018 at 3:36 AM, Ravindra Singareddy <si...@hotmail.com>> wrote:

Hi All,

I am running into issue, when running syncope-console in https with self signed certificates in Wildfly.



Here are commands are used for signing the certificate





cd /opt/bitnami/wildfly/standalone/configuration

sudo keytool -genkey -alias server -keyalg RSA -validity 3650 -keysize 2048 -keystore server.keystore

sudo chown wildfly:wildfly ./server.keystore



Used CN name as localhost



(https://docs.bitnami.com/aws/infrastructure/wildfly/ )



I am able to successfully deploy syncope.war file and when deploying syncope-console.war giving following error:

Your help in this regard, greatly appreciated.

Thanks



Ravi

________________________________________________________________________________________________



Caused by: javax.ws.rs<http://javax.ws.rs>.ProcessingException: java.io.IOException: IOException invoking https://localhost/syncope/rest/platform: HTTPS hostname wrong:  should be <localhost>

        at org.apache.cxf.jaxrs.client.AbstractClient.checkClientException(AbstractClient.java:608)

        at org.apache.cxf.jaxrs.client.AbstractClient.preProcessResult(AbstractClient.java:584)

        at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:783)

        at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:235)

        at com.sun.proxy.$Proxy495.platform(Unknown Source)

        at org.apache.syncope.client.console.SyncopeConsoleSession.<init>(SyncopeConsoleSession.java:109)

        ... 63 more

Caused by: java.io.IOException: IOException invoking https://localhost/syncope/rest/platform: HTTPS hostname wrong:  should be <localhost>

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1390)

        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1374)

        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)

        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:658)

        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)

        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)

        at org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:681)

        at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:781)

        ... 66 more

Caused by: java.io.IOException: HTTPS hostname wrong:  should be <localhost>

        at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(HttpsClient.java:649)

        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:573)

        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)

        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)

        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)

        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)

        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347)

        at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream$2.run(URLConnectionHTTPConduit.java:379)

        at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream$2.run(URLConnectionHTTPConduit.java:375)

        at java.security.AccessController.doPrivileged(Native Method)





--
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com