UnknownhostException in 32 bit Java 6 on 64 bit Ubuntu 8.04

Bug #358776 reported by mark plutowski
2
Affects Status Importance Assigned to Milestone
sun-java6 (Ubuntu)
New
Undecided
Unassigned

Bug Description

The problem occurs only when using 32-bit java on 64-bit Ubuntu8.04. The same version of 32-bit Java run on a 32-bit Ubuntu 8.04 runs fine, and so does the same version of 64-bit Java run on a 64-bit Ubuntu 8.04.

Case 1: 32 bit Ubuntu 8.04 (succeeds)

Ubuntu 8.04:

mark@devserver:~/requesthandler$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.1"

32 bit Ubuntu:

mark@devserver:~/requesthandler$ uname -a
Linux mv-dev-markp 2.6.24-22-386 #1 Mon Nov 24 17:51:53 UTC 2008 i686 GNU/Linux

Java version:

mark@devserver:~/requesthandler$ java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

This command runs normally:

mark@devserver:~/requesthandler$ java -jar bin/RequestHandler.jar -p TestPubId
[...]
13:56:24,488 INFO RequestHandler:268 - Request queue is empty for pubid='TestPubId'

====================

Case 2: 64 bit java on 64 Ubuntu 8.04 (succeeds)

Ubuntu 8.04:

root@server1:~/requesthandler# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.2"

64 bit Ubuntu:

root@server1:~/requesthandler# uname -a
Linux sj-stage-cp1 2.6.22-14-server #1 SMP Tue Feb 12 03:10:53 UTC 2008 x86_64 GNU/Linux

Java version:

root@server1:~/requesthandler# java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)

This command runs normally:

root@server1:~/requesthandler# java -jar bin/RequestHandler.jar -p TestPubId
[...]
14:05:31,934 INFO RequestHandler:268 - Request queue is empty for pubid='TestPubId'

====================

Case 3: 32 bit java on 64 Ubuntu 8.04 (FAILS)

Ubuntu 8.04:

root@server1:~/requesthandler# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.2"

64 bit Ubuntu:

root@server1:~/requesthandler# uname -a
Linux sj-stage-cp1 2.6.22-14-server #1 SMP Tue Feb 12 03:10:53 UTC 2008 x86_64 GNU/Linux

Java version:

root@server1:~/requesthandler# java32 -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

root@server1:~/requesthandler# which java32
/usr/bin/java32

root@server1:~/requesthandler# ls -la /usr/bin/java32
lrwxrwxrwx 1 root root 37 2008-07-10 20:32 /usr/bin/java32 -> /usr/lib/jvm/ia32-java-6-sun/bin/java

This command FAILS:

root@server1:~/requesthandler# java32 -jar bin/RequestHandler.jar -p TestPubId

[...]
14:09:49,794 ERROR RequestHandler:1642 - EXCEPTION: queue.amazonaws.com, java.net.UnknownHostException: queue.amazonaws.com
Exception in thread "main" java.lang.Exception: com.xerox.amazonws.sqs.SQSException: queue.amazonaws.com
at clipmgr.RequestHandler.getMessageQueueByName(RequestHandler.java:1648)
at clipmgr.RequestHandler.processRequest(RequestHandler.java:230)
at clipmgr.RequestHandler.main(RequestHandler.java:163)
Caused by: com.xerox.amazonws.sqs.SQSException: queue.amazonaws.com
at com.xerox.amazonws.sqs.QueueService.listMessageQueues(QueueService.java:184)
at com.xerox.amazonws.sqs.SQSUtils.getMessageQueue(SQSUtils.java:104)
at com.xerox.amazonws.sqs.SQSUtils.connectToQueue(SQSUtils.java:63)
at com.xerox.amazonws.sqs.SQSUtils.connectToQueue(SQSUtils.java:44)
at clipmgr.RequestHandler.getMessageQueueByName(RequestHandler.java:1633)
... 2 more
Caused by: java.net.UnknownHostException: queue.amazonaws.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:394)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:123)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:82)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:127)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at com.xerox.amazonws.common.AWSQueryConnection.makeRequest(AWSQueryConnection.java:154)
at com.xerox.amazonws.sqs.QueueService.listMessageQueues(QueueService.java:174)
... 6 more

Revision history for this message
Don Brown (mrdon) wrote :

FWIW, I was able to work around it by installing lib32nss-mdns. See bug 220530

Revision history for this message
mark plutowski (mark-keystream) wrote : Re: [Bug 358776] Re: UnknownhostException in 32 bit Java 6 on 64 bit Ubuntu 8.04
Download full text (5.7 KiB)

Thanks, I'll give that a try too. There was a solution that worked for me
for the problem I described here, that involved modifying a naming service
setting, but jstatd is still having problems, so hopefully your suggestion
will help.

On Sun, Apr 26, 2009 at 12:38 AM, Don Brown <email address hidden> wrote:

> FWIW, I was able to work around it by installing lib32nss-mdns. See bug
> 220530
>
> --
> UnknownhostException in 32 bit Java 6 on 64 bit Ubuntu 8.04
> https://bugs.launchpad.net/bugs/358776
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “sun-java6” source package in Ubuntu: New
>
> Bug description:
> The problem occurs only when using 32-bit java on 64-bit Ubuntu8.04. The
> same version of 32-bit Java run on a 32-bit Ubuntu 8.04 runs fine, and so
> does the same version of 64-bit Java run on a 64-bit Ubuntu 8.04.
>
>
> Case 1: 32 bit Ubuntu 8.04 (succeeds)
>
> Ubuntu 8.04:
>
> mark@devserver:~/requesthandler$ cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=8.04
> DISTRIB_CODENAME=hardy
> DISTRIB_DESCRIPTION="Ubuntu 8.04.1"
>
>
> 32 bit Ubuntu:
>
> mark@devserver:~/requesthandler$ uname -a
> Linux mv-dev-markp 2.6.24-22-386 #1 Mon Nov 24 17:51:53 UTC 2008 i686
> GNU/Linux
>
>
> Java version:
>
> mark@devserver:~/requesthandler$ java -version
> java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
>
>
> This command runs normally:
>
> mark@devserver:~/requesthandler$ java -jar bin/RequestHandler.jar -p
> TestPubId
> [...]
> 13:56:24,488 INFO RequestHandler:268 - Request queue is empty for
> pubid='TestPubId'
>
>
> ====================
>
>
> Case 2: 64 bit java on 64 Ubuntu 8.04 (succeeds)
>
> Ubuntu 8.04:
>
> root@server1:~/requesthandler# cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=8.04
> DISTRIB_CODENAME=hardy
> DISTRIB_DESCRIPTION="Ubuntu 8.04.2"
>
>
> 64 bit Ubuntu:
>
> root@server1:~/requesthandler# uname -a
> Linux sj-stage-cp1 2.6.22-14-server #1 SMP Tue Feb 12 03:10:53 UTC 2008
> x86_64 GNU/Linux
>
>
> Java version:
>
> root@server1:~/requesthandler# java -version
> java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)
>
> This command runs normally:
>
> root@server1:~/requesthandler# java -jar bin/RequestHandler.jar -p
> TestPubId
> [...]
> 14:05:31,934 INFO RequestHandler:268 - Request queue is empty for
> pubid='TestPubId'
>
>
> ====================
>
> Case 3: 32 bit java on 64 Ubuntu 8.04 (FAILS)
>
> Ubuntu 8.04:
>
> root@server1:~/requesthandler# cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=8.04
> DISTRIB_CODENAME=hardy
> DISTRIB_DESCRIPTION="Ubuntu 8.04.2"
>
>
> 64 bit Ubuntu:
>
> root@server1:~/requesthandler# uname -a
> Linux sj-stage-cp1 2.6.22-14-server #1 SMP Tue Feb 12 03:10:53 UTC 2008
> x86_64 GNU/Linux
>
>
> Java version:
>
> root@server1:~/requesthandler# java32 -version
> java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
>
> root@server1:~/request...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.