You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by John Southerland <jo...@southerland-consulting.com> on 2005/12/28 20:17:06 UTC

AIX 5.2 Java 1.3.1 and 1.4 SecureWebServer IOException

All,

I have recently tried to move my xmlrpc server app to a new os, AIX 5.2
running Java 1.3.1 and tried 1.4, every time I try to startup a
SecureWebServer, that works fine in Solaris and Linux, I get an IOException
from the constructor with the text: "com.sun.net.ssl.internal.ssl.Provider"

I realize this is most likely an IBM JRE issue, but the security properties
look fine, and I am definitely not overriding the system wide configuration.

This is actually a simple configuration, and since it works well on other
operating systems, I was wondering if anyone else has encountered errors
like this, or has any ideas on how I should continue.  I'm now officially
stumped.

 

Also,

To add some comedy to this https problem, my non secure "backup" non ssl
webserver (also the builtin xmlrpc server) starts fine on the server but the
client gets an IOException on connect with the text "Remote host closed
connection during handshake", not much of a backup connectivity method is
it?

 

So please help me if you can, am I crazy, or is IBM to blame?

Thanks in advance, John

 

John Buren Southerland

Southerland Consulting

801.467.8090(office)

214.734.8099(cell)

john@southerland-consulting.com

 


Re: AIX 5.2 Java 1.3.1 and 1.4 SecureWebServer IOException

Posted by Wade Chandler <hw...@yahoo.com>.
--- John Southerland <jo...@southerland-consulting.com>
wrote:

> All,
> 
> I have recently tried to move my xmlrpc server app
> to a new os, AIX 5.2
> running Java 1.3.1 and tried 1.4, every time I try
> to startup a
> SecureWebServer, that works fine in Solaris and
> Linux, I get an IOException
> from the constructor with the text:
> "com.sun.net.ssl.internal.ssl.Provider"
> 
> I realize this is most likely an IBM JRE issue, but
> the security properties
> look fine, and I am definitely not overriding the
> system wide configuration.
> 
> This is actually a simple configuration, and since
> it works well on other
> operating systems, I was wondering if anyone else
> has encountered errors
> like this, or has any ideas on how I should
> continue.  I'm now officially
> stumped.
> 
>  
> 
> Also,
> 
> To add some comedy to this https problem, my non
> secure "backup" non ssl
> webserver (also the builtin xmlrpc server) starts
> fine on the server but the
> client gets an IOException on connect with the text
> "Remote host closed
> connection during handshake", not much of a backup
> connectivity method is
> it?
> 
>  
> 
> So please help me if you can, am I crazy, or is IBM
> to blame?
> 
> Thanks in advance, John
> 
>  
> 
> John Buren Southerland
> 
> Southerland Consulting
> 
> 801.467.8090(office)
> 
> 214.734.8099(cell)
> 
> john@southerland-consulting.com
> 
>  
> 
> 

I'm pretty sure IBM 1.4 should have the SSL and
support https.  I know I had to do some stuff to get
1.3.1 working though.  I had to install the separate
packages using the AIX install tool.  I downloaded the
packages from IBMs java site....the SSL and HTTPs
stuff is separte.  I then had to load the SSL provider
by:
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new
com.sun.net.ssl.internal.ssl.Provider());

This was for some Axis stuff I was doing.

You can do this with text files in the java
distribution, but I couldn't figure out what all I had
to edit to get this just right in the IBM 1.3.1 VM.

See:
For Sun SSL for 1.3.x:
http://java.sun.com/products/jsse/index-103.html

IBM Java Extensions (native libs have to be installed
and all the goodies for ssl to work
(Java131.ext.security):
http://www-128.ibm.com/developerworks/java/jdk/aix/service.html

1.4.2 should already have the SSL stuff in it by
default, but since your code or XML-RPC which ever is
trying to directly use the Sun packages you'll have to
also install the Sun SSL extensions from above
(possibly).  I had to do some stuff to get Axis
working right on AIX.  The main reason was the
examples and underlying code of this service I had to
create.  

Looking in the XML-RPC SunSSLTransportFactory.java
file which is the transport you will end up using
defaultly I see the provider lines I mention above. 
So, you don't have to add the lines I have provided
above.  Simply installing the IBM ssl extensions for
1.3.1 and adding the Sun SSL packages to your ext
directory of that JDK/JRE or adding the Sun SSL
packages to your ext directory for the 1.4.2/1 (which
ever) directory should get you going.  However, using
the CommonsXmlRpcTransport directly instead of using
the default call methods might be a better thing for
you to do (some additions to your code and maybe a
little refactoring)...I'm not sure if the HttpClient
will use it's own SSL provider or what...someone else
might be able to tell you more about this.

Hope it helps,

Wade

RE: AIX 5.2 Java 1.4 WebServer Garbage in the stream?

Posted by John Southerland <jo...@southerland-consulting.com>.
PS: for posterity that string " b9  /32" is the text equivalent of an ssl
handshake.
Enjoy, John

John Buren Southerland
Southerland Consulting
801.467.8090(office)
214.734.8099(cell)
john@southerland-consulting.com

-----Original Message-----
From: John Southerland [mailto:john@southerland-consulting.com] 
Sent: Thursday, December 29, 2005 4:11 PM
To: hwadechandler-apache@yahoo.com
Cc: xmlrpc-user@ws.apache.org
Subject: RE: AIX 5.2 Java 1.4 WebServer Garbage in the stream?

Woops, it turns out httpd is not working on linux either, I did not fully
implement it because I didn't need it until now, and it got left behind in
the code march.
Sorry for the interrupt, RTFM
Thanks again, John

John Buren Southerland
Southerland Consulting
801.467.8090(office)
214.734.8099(cell)
john@southerland-consulting.com
-----Original Message-----
From: Wade Chandler [mailto:hwadechandler-apache@yahoo.com] 
Sent: Thursday, December 29, 2005 4:01 PM
To: xmlrpc-user@ws.apache.org
Subject: Re: AIX 5.2 Java 1.4 WebServer Garbage in the stream?

--- John Southerland <jo...@southerland-consulting.com>
wrote:

> Wade knocked out my ssl issue in short order, thanks
> again, but I still have
> a connection problem on AIX using http.
> 
> I enabled debug for XmlRpc and tried once again to
> send a message the first
> test, a simple telnet to the port and "GET /
> HTTP/1.0"  returned nothing,
> but printed on the remote in all it's accurate
> glory, however the actually
> xmlrpc request did something more interesting.  I
> didn't capture the raw
> request but it was generated from a linux box
> running jvm 1.5 against the
> remote AIX 5.2 server with a 1.5 jvm as well.
> 
> To make a long setup short, here is the resulting
> output on the server:
> 
>  b9  /32
> 
> java.util.NoSuchElementException
> 
> java.util.NoSuchElementException
> 
>             at
>
java.util.StringTokenizer.nextToken(StringTokenizer.java:347)
> 
>             at
>
org.apache.xmlrpc.WebServer$Connection.run(WebServer.java)
> 
>             at
>
org.apache.xmlrpc.WebServer$Runner.run(WebServer.java)
> 
>             at java.lang.Thread.run(Thread.java:788)
> 
>  
> 
> Anyone seen this before?  Is it network byte order
> versus host byte order
> conversion error or something?
> 
> Once again the same code runs brilliantly on Linux
> and Solaris, fun fun
> 
> Thanks, John
> 
>  
> 
> John Buren Southerland
Should not an issue with the byte order (only matters
for floats and doubles and numbers not character
formatted data), but what appears to be happening (I
haven't looked at the source for WebServer.java, but
it is not checking hasMoreTokens in StringTokenizer
before calling nextToken...I'm not sure exactly what
it is parsing, but if there should be another value
then what really needs to happen is an exception needs
to be thrown stating there should be more elements and
what the real issue is and explain that something
isn't formatted correctly instead of a blind nextToken
read which is what is happening (unless there is no
blind nextToken and hasMoreTokens is checking before
calling nextToken and it is a bug in the IBM jvm).

Wade



RE: AIX 5.2 Java 1.4 WebServer Garbage in the stream?

Posted by John Southerland <jo...@southerland-consulting.com>.
Woops, it turns out httpd is not working on linux either, I did not fully
implement it because I didn't need it until now, and it got left behind in
the code march.
Sorry for the interrupt, RTFM
Thanks again, John

John Buren Southerland
Southerland Consulting
801.467.8090(office)
214.734.8099(cell)
john@southerland-consulting.com
-----Original Message-----
From: Wade Chandler [mailto:hwadechandler-apache@yahoo.com] 
Sent: Thursday, December 29, 2005 4:01 PM
To: xmlrpc-user@ws.apache.org
Subject: Re: AIX 5.2 Java 1.4 WebServer Garbage in the stream?

--- John Southerland <jo...@southerland-consulting.com>
wrote:

> Wade knocked out my ssl issue in short order, thanks
> again, but I still have
> a connection problem on AIX using http.
> 
> I enabled debug for XmlRpc and tried once again to
> send a message the first
> test, a simple telnet to the port and "GET /
> HTTP/1.0"  returned nothing,
> but printed on the remote in all it's accurate
> glory, however the actually
> xmlrpc request did something more interesting.  I
> didn't capture the raw
> request but it was generated from a linux box
> running jvm 1.5 against the
> remote AIX 5.2 server with a 1.5 jvm as well.
> 
> To make a long setup short, here is the resulting
> output on the server:
> 
>  b9  /32
> 
> java.util.NoSuchElementException
> 
> java.util.NoSuchElementException
> 
>             at
>
java.util.StringTokenizer.nextToken(StringTokenizer.java:347)
> 
>             at
>
org.apache.xmlrpc.WebServer$Connection.run(WebServer.java)
> 
>             at
>
org.apache.xmlrpc.WebServer$Runner.run(WebServer.java)
> 
>             at java.lang.Thread.run(Thread.java:788)
> 
>  
> 
> Anyone seen this before?  Is it network byte order
> versus host byte order
> conversion error or something?
> 
> Once again the same code runs brilliantly on Linux
> and Solaris, fun fun
> 
> Thanks, John
> 
>  
> 
> John Buren Southerland
Should not an issue with the byte order (only matters
for floats and doubles and numbers not character
formatted data), but what appears to be happening (I
haven't looked at the source for WebServer.java, but
it is not checking hasMoreTokens in StringTokenizer
before calling nextToken...I'm not sure exactly what
it is parsing, but if there should be another value
then what really needs to happen is an exception needs
to be thrown stating there should be more elements and
what the real issue is and explain that something
isn't formatted correctly instead of a blind nextToken
read which is what is happening (unless there is no
blind nextToken and hasMoreTokens is checking before
calling nextToken and it is a bug in the IBM jvm).

Wade


Re: AIX 5.2 Java 1.4 WebServer Garbage in the stream?

Posted by Wade Chandler <hw...@yahoo.com>.
--- John Southerland <jo...@southerland-consulting.com>
wrote:

> Wade knocked out my ssl issue in short order, thanks
> again, but I still have
> a connection problem on AIX using http.
> 
> I enabled debug for XmlRpc and tried once again to
> send a message the first
> test, a simple telnet to the port and "GET /
> HTTP/1.0"  returned nothing,
> but printed on the remote in all it's accurate
> glory, however the actually
> xmlrpc request did something more interesting.  I
> didn't capture the raw
> request but it was generated from a linux box
> running jvm 1.5 against the
> remote AIX 5.2 server with a 1.5 jvm as well.
> 
> To make a long setup short, here is the resulting
> output on the server:
> 
>  b9  /32
> 
> java.util.NoSuchElementException
> 
> java.util.NoSuchElementException
> 
>             at
>
java.util.StringTokenizer.nextToken(StringTokenizer.java:347)
> 
>             at
>
org.apache.xmlrpc.WebServer$Connection.run(WebServer.java)
> 
>             at
>
org.apache.xmlrpc.WebServer$Runner.run(WebServer.java)
> 
>             at java.lang.Thread.run(Thread.java:788)
> 
>  
> 
> Anyone seen this before?  Is it network byte order
> versus host byte order
> conversion error or something?
> 
> Once again the same code runs brilliantly on Linux
> and Solaris, fun fun
> 
> Thanks, John
> 
>  
> 
> John Buren Southerland
Should not an issue with the byte order (only matters
for floats and doubles and numbers not character
formatted data), but what appears to be happening (I
haven't looked at the source for WebServer.java, but
it is not checking hasMoreTokens in StringTokenizer
before calling nextToken...I'm not sure exactly what
it is parsing, but if there should be another value
then what really needs to happen is an exception needs
to be thrown stating there should be more elements and
what the real issue is and explain that something
isn't formatted correctly instead of a blind nextToken
read which is what is happening (unless there is no
blind nextToken and hasMoreTokens is checking before
calling nextToken and it is a bug in the IBM jvm).

Wade

AIX 5.2 Java 1.4 WebServer Garbage in the stream?

Posted by John Southerland <jo...@southerland-consulting.com>.
Wade knocked out my ssl issue in short order, thanks again, but I still have
a connection problem on AIX using http.

I enabled debug for XmlRpc and tried once again to send a message the first
test, a simple telnet to the port and "GET / HTTP/1.0"  returned nothing,
but printed on the remote in all it's accurate glory, however the actually
xmlrpc request did something more interesting.  I didn't capture the raw
request but it was generated from a linux box running jvm 1.5 against the
remote AIX 5.2 server with a 1.5 jvm as well.

To make a long setup short, here is the resulting output on the server:

 b9  /32

java.util.NoSuchElementException

java.util.NoSuchElementException

            at java.util.StringTokenizer.nextToken(StringTokenizer.java:347)

            at org.apache.xmlrpc.WebServer$Connection.run(WebServer.java)

            at org.apache.xmlrpc.WebServer$Runner.run(WebServer.java)

            at java.lang.Thread.run(Thread.java:788)

 

Anyone seen this before?  Is it network byte order versus host byte order
conversion error or something?

Once again the same code runs brilliantly on Linux and Solaris, fun fun

Thanks, John

 

John Buren Southerland

Southerland Consulting

801.467.8090(office)

214.734.8099(cell)

john@southerland-consulting.com

  _____  

From: John Southerland [mailto:john@southerland-consulting.com] 
Sent: Wednesday, December 28, 2005 2:17 PM
To: xmlrpc-user@ws.apache.org
Subject: AIX 5.2 Java 1.3.1 and 1.4 SecureWebServer IOException

 

All,

I have recently tried to move my xmlrpc server app to a new os, AIX 5.2
running Java 1.3.1 and tried 1.4, every time I try to startup a
SecureWebServer, that works fine in Solaris and Linux, I get an IOException
from the constructor with the text: "com.sun.net.ssl.internal.ssl.Provider"

I realize this is most likely an IBM JRE issue, but the security properties
look fine, and I am definitely not overriding the system wide configuration.

This is actually a simple configuration, and since it works well on other
operating systems, I was wondering if anyone else has encountered errors
like this, or has any ideas on how I should continue.  I'm now officially
stumped.

 

Also,

To add some comedy to this https problem, my non secure "backup" non ssl
webserver (also the builtin xmlrpc server) starts fine on the server but the
client gets an IOException on connect with the text "Remote host closed
connection during handshake", not much of a backup connectivity method is
it?

 

So please help me if you can, am I crazy, or is IBM to blame?

Thanks in advance, John

 

John Buren Southerland

Southerland Consulting

801.467.8090(office)

214.734.8099(cell)

john@southerland-consulting.com