ec2-api-tools with java-6-openjdk fail with java.net.SocketException

Bug #542395 reported by Scott Moser
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-6 (Debian)
Fix Released
Unknown
openjdk-6 (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Lucid by Scott Moser

Bug Description

Binary package hint: ec2-api-tools

+ ec2-describe-images --private-key pk.pem --cert cert.pem ami-8924cbe0
Unexpected error:
java.net.SocketException: Invalid argument or cannot assign requested address
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:542)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:570)
...
       at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
        at $Proxy12.describeImages(Unknown Source)
        at com.amazon.aes.webservices.client.Jec2.describeImages(Jec2.java:485)
        at com.amazon.aes.webservices.client.cmd.DescribeImages.invokeOnline(DescribeImages.java:160)
        at com.amazon.aes.webservices.client.cmd.BaseCmd.invoke(BaseCmd.java:742)
        at com.amazon.aes.webservices.client.cmd.DescribeImages.main(DescribeImages.java:171)

Other info about java:
$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 40 2010-03-15 13:16 /etc/alternatives/java -> /usr/lib/jvm/java-6-openjdk/jre/bin/java
$ dpkg -S /usr/lib/jvm/java-6-openjdk/jre/bin/java
openjdk-6-jre-headless: /usr/lib/jvm/java-6-openjdk/jre/bin/java
$ dpkg-query --show openjdk-6-jre-headless
openjdk-6-jre-headless 6b18~pre2-1ubuntu1

ProblemType: Bug
Architecture: amd64
Date: Fri Mar 19 22:46:27 2010
Dependencies:

DistroRelease: Ubuntu 10.04
Package: ec2-api-tools 1.3.46266-0ubuntu1
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-16.25-server
SourcePackage: ec2-api-tools
Uname: Linux 2.6.32-16-server x86_64

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

I just verified that the following "fixes" the problem:
 - enable partner repo
 - apt-get install sun-java6-jdk
 - update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java

So, the problem is with ec2-api-tools on top of openjdk

summary: - ec2-api-tools fail with java.net.SocketException
+ ec2-api-tools with java-6-openjdk fail with java.net.SocketException
+ using
Chuck Short (zulcss)
Changed in ec2-api-tools (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Scott Moser (smoser) wrote : Re: ec2-api-tools with java-6-openjdk fail with java.net.SocketException using

Also verified that this works around the problem while still using openjdk:
$ EC2_JVM_ARGS=-Djava.net.preferIPv4Stack=true ec2-describe-images

Note, ec2-describe-images calls ec2-cmd, and ec2-cmd has:
 exec java $EC2_JVM_ARGS $cygprop -classpath "$CP" com.amazon.aes.webservices.client.cmd.$CMD "$@"

so the EC2_JVM_ARGS is passed through.

summary: ec2-api-tools with java-6-openjdk fail with java.net.SocketException
- using
affects: ec2-api-tools (Ubuntu) → openjdk-6 (Ubuntu)
Revision history for this message
Matthias Klose (doko) wrote :

please could you recheck with 6b18~pre3-0ubuntu1 ?

Revision history for this message
Scott Moser (smoser) wrote :

$ dpkg-query --show openjdk-6-jre-headless
openjdk-6-jre-headless 6b18~pre3-0ubuntu1
$ unset EC2_JVM_ARGS
$ ec2-describe-images --private-key pk.pem --cert cert.pem ami-a108e7c8
IMAGE ami-a108e7c8 099720109477/ebs/ubuntu-images-milestone/ubuntu-lucid-10.04-beta1-amd64-server-20100317 099720109477 available public x86_64 machine aki-9309e6fa ebs
BLOCKDEVICEMAPPING /dev/sda1 snap-977763fe 15

Changed in openjdk-6 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Matthias Klose (doko) wrote :

fixed in 6b18~pre3-0ubuntu1

Changed in openjdk-6 (Debian):
status: Unknown → Fix Released
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.