Mailing List Archive

Https Xen Connection
I attempting to establish a https connection using the java api
Connection object as follows:



String szIpAddress = "https://myserveripaddress "; //
myserveripaddress=ip address of my xen server

try {

Connection connection = new Connection(szIpAddress,
szUsername, szPassword);

}

catch (Exception ex) {

System.out.println("XEN Exception: "+ex.toString());

}



I'm getting the following XmlRpcException while attempting to establish
a https connection to a Xen Server.



Note: I successfully establish the connection using the http protocol
instead of https.



org.apache.xmlrpc.XmlRpcException: Failed to create output stream: HTTPS
hostname wrong: should be <xxx.yyy.zzz.www>

at
org.apache.xmlrpc.client.XmlRpcSunHttpTransport.writeRequest(XmlRpcSunHt
tpTransport.java:69)

at
org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamT
ransport.java:144)

at
org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTrans
port.java:95)

at
org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHtt
pTransport.java:39)

at
org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.j
ava:53)

at
org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)

at
org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)

at
org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)

at
com.xensource.xenapi.Connection.loginWithPassword(Connection.java:132)

at com.xensource.xenapi.Connection.<init>(Connection.java:60)

at com.avocent.vsi.sample.XenTest.discovery(XenTest.java:38)

at com.avocent.vsi.sample.XenTest.main(XenTest.java:170)

Caused by:

java.io.IOException: HTTPS hostname wrong: should be <xxx.yyy.zzz.www>

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

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

at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Ab
stractDelegateHttpsURLConnection.java:166)

at
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConne
ction.java:832)

at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsU
RLConnectionImpl.java:230)

at
org.apache.xmlrpc.client.XmlRpcSunHttpTransport.writeRequest(XmlRpcSunHt
tpTransport.java:67)

at
org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamT
ransport.java:144)

at
org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTrans
port.java:95)

at
org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHtt
pTransport.java:39)

at
org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.j
ava:53)
Re: Https Xen Connection [ In reply to ]
Hello!

You may want to try to add the port on which xend is using the ssl
protocol on:

> String szIpAddress = ?https://myserveripaddress:<ssl port>?; //



Stefan

xen-api-bounces@lists.xensource.com wrote on 05/14/2008 02:51:28 PM:

> I attempting to establish a https connection using the java api
> Connection object as follows:
>
> String szIpAddress = ?https://myserveripaddress ?; //
> myserveripaddress=ip address of my xen server
> try {
> Connection connection = new Connection(szIpAddress,
> szUsername, szPassword);
> }
> catch (Exception ex) {
> System.out.println("XEN Exception: "+ex.toString());
> }
>
> I?m getting the following XmlRpcException while attempting to
> establish a https connection to a Xen Server.
>
> Note: I successfully establish the connection using the http
> protocol instead of https.
>
> org.apache.xmlrpc.XmlRpcException: Failed to create output stream:
> HTTPS hostname wrong: should be <xxx.yyy.zzz.www>
> at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.
> writeRequest(XmlRpcSunHttpTransport.java:69)
> at org.apache.xmlrpc.client.XmlRpcStreamTransport.
> sendRequest(XmlRpcStreamTransport.java:144)
> at org.apache.xmlrpc.client.XmlRpcHttpTransport.
> sendRequest(XmlRpcHttpTransport.java:95)
> at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.
> sendRequest(XmlRpcSunHttpTransport.java:39)
> at org.apache.xmlrpc.client.XmlRpcClientWorker.
> execute(XmlRpcClientWorker.java:53)
> at org.apache.xmlrpc.client.XmlRpcClient.
> execute(XmlRpcClient.java:166)
> at org.apache.xmlrpc.client.XmlRpcClient.
> execute(XmlRpcClient.java:136)
> at org.apache.xmlrpc.client.XmlRpcClient.
> execute(XmlRpcClient.java:125)
> at com.xensource.xenapi.Connection.
> loginWithPassword(Connection.java:132)
> at com.xensource.xenapi.Connection.<init>(Connection.java:60)
> at com.avocent.vsi.sample.XenTest.discovery(XenTest.java:38)
> at com.avocent.vsi.sample.XenTest.main(XenTest.java:170)
> Caused by:
> java.io.IOException: HTTPS hostname wrong: should be <xxx.yyy.zzz.www>
> at sun.net.www.protocol.https.HttpsClient.
> checkURLSpoofing(HttpsClient.java:495)
> at sun.net.www.protocol.https.HttpsClient.
> afterConnect(HttpsClient.java:419)
> at sun.net.www.protocol.https.
> AbstractDelegateHttpsURLConnection.
> connect(AbstractDelegateHttpsURLConnection.java:166)
> at sun.net.www.protocol.http.HttpURLConnection.
> getOutputStream(HttpURLConnection.java:832)
> at sun.net.www.protocol.https.HttpsURLConnectionImpl.
> getOutputStream(HttpsURLConnectionImpl.java:230)
> at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.
> writeRequest(XmlRpcSunHttpTransport.java:67)
> at org.apache.xmlrpc.client.XmlRpcStreamTransport.
> sendRequest(XmlRpcStreamTransport.java:144)
> at org.apache.xmlrpc.client.XmlRpcHttpTransport.
> sendRequest(XmlRpcHttpTransport.java:95)
> at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.
> sendRequest(XmlRpcSunHttpTransport.java:39)
> at org.apache.xmlrpc.client.XmlRpcClientWorker.
> execute(XmlRpcClientWorker.java:53)
> _______________________________________________
> xen-api mailing list
> xen-api@lists.xensource.com
> http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
Re: Https Xen Connection [ In reply to ]
Yeah I think Stefan would be right as the error seems related to
connecting to the machine not necessarily after it connects and then
cannot find the path, just in case, I know that in order to connect
with the rpc binding: /service/xmlrpc needs to be in the header.

-Rog

On Wed, May 14, 2008 at 2:51 PM, Caruso, Joseph
<Joseph.Caruso@avocent.com> wrote:
> I attempting to establish a https connection using the java api Connection
> object as follows:
>
>
>
> String szIpAddress = "https://myserveripaddress "; //
> myserveripaddress=ip address of my xen server
>
> try {
>
> Connection connection = new Connection(szIpAddress, szUsername,
> szPassword);
>
> }
>
> catch (Exception ex) {
>
> System.out.println("XEN Exception: "+ex.toString());
>
> }
>
>
>
> I'm getting the following XmlRpcException while attempting to establish a
> https connection to a Xen Server.
>
>
>
> Note: I successfully establish the connection using the http protocol
> instead of https.
>
>
>
> org.apache.xmlrpc.XmlRpcException: Failed to create output stream: HTTPS
> hostname wrong: should be <xxx.yyy.zzz.www>
>
> at
> org.apache.xmlrpc.client.XmlRpcSunHttpTransport.writeRequest(XmlRpcSunHttpTransport.java:69)
>
> at
> org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:144)
>
> at
> org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:95)
>
> at
> org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:39)
>
> at
> org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
>
> at
> org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
>
> at
> org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
>
> at
> org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
>
> at
> com.xensource.xenapi.Connection.loginWithPassword(Connection.java:132)
>
> at com.xensource.xenapi.Connection.<init>(Connection.java:60)
>
> at com.avocent.vsi.sample.XenTest.discovery(XenTest.java:38)
>
> at com.avocent.vsi.sample.XenTest.main(XenTest.java:170)
>
> Caused by:
>
> java.io.IOException: HTTPS hostname wrong: should be <xxx.yyy.zzz.www>
>
> at
> sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(HttpsClient.java:495)
>
> at
> sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:419)
>
> at
> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
>
> at
> sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:832)
>
> at
> sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
>
> at
> org.apache.xmlrpc.client.XmlRpcSunHttpTransport.writeRequest(XmlRpcSunHttpTransport.java:67)
>
> at
> org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:144)
>
> at
> org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:95)
>
> at
> org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:39)
>
> at
> org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
>
>
>
> _______________________________________________
> xen-api mailing list
> xen-api@lists.xensource.com
> http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
>
>

_______________________________________________
xen-api mailing list
xen-api@lists.xensource.com
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api