[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New work on java-package



On 03/27/2012 10:12 AM, Emmanuel Bourg wrote:
> Le 20/03/2012 12:41, Andrew Haley a écrit :
>> Comments like this are infuriating.  I want to make OpenJDK
>> competitive, but I can't do anything with this because I don't know
>> what you're talking about.  I can't reproduce the problem, so I can't
>> fix it.  Is there anything more frustrating than being told there's
>> a problem, but not what it is?  It's like something out of Kafka.
> 
> There are indeed issues with OpenJDK that do not exist with the Oracle 
> JRE. Here is an issue I reported recently:
> 
> Tomcat with authbind on OpenVZ throws "SocketException: Cannot allocate 
> memory" (works with sun-java6)
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659293
> 
> That's the only hurdle that prevents me from migrating my production 
> servers to OpenJDK (and the reason why I contributed some changes to 
> java-package).

I think the problem is in authbind: it only supports IPv4.

Try this:

 $ authbind --depth 2 java -Djava.net.preferIPv4Stack=true ListenTest
ServerSocket[addr=localhost/127.0.0.1,port=0,localport=80]

Andrew.

import java.net.*;

public class ListenTest {
    public static void main(String[] args)
        throws Throwable {
        ServerSocket s = new ServerSocket(80, 0, InetAddress.getByName("localhost"));
        System.out.println(s);
    }
}


Reply to: