Re: [classlib] Uncertain behavior of new Socket(0.0.0.0, 1099);
Hello Geir, I created new JIRA: HARMONY-946 on this issue. = Warm Regards, Victor Martynov, Intel Middleware Product Division On 7/20/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: We have a bug. 0.0.0.0 should be all adapters, and is legit. Can you file a JIRA? Victor A Martynov wrote: Hello Mikhail, Here are the results of running the modified test: --- import java.net.*; public class Test { public static void main(String args[]) throws Throwable { ServerSocket ss = new ServerSocket(1099, 0, InetAddress.getByName(0.0.0.0)); System.out.println(ss.getInetAddress()); Socket s = new Socket(0.0.0.0, 1099); } } --- c:\testjava Test /0.0.0.0 c:\testC:/Harmony/bin/ij -version Apache Harmony DRLVM HEAD-4807 (2006-05-02), Windows/ia32/msvc 1310, debug c:\testC:/Harmony/bin/ij Test /0.0.0.0 java.net.ConnectException: 0.0.0.0/0.0.0.0:1099 - The address is not available at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:238) at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:200) at java.net.Socket.startupSocket(Socket.java:715) at java.net.Socket.init(Socket.java:139) at Test.main(Test.java:10) = Warm Regards, Victor Martynov, Intel Middleware Product Division On 7/20/06, Mikhail Fursov [EMAIL PROTECTED] wrote: Add this line to the test to clarify the situation: System.out.println(ss.getInetAddress()); I think that for PC with multiple network adapters serversocket IP must be specified manually. On 7/20/06, Victor A Martynov [EMAIL PROTECTED] wrote: Hello, I'm having trouble with an application. This problem concerns creating java.net.Socket on host 0.0.0.0. The test below illustrates this problem: import java.net.*; public class Test { public static void main(String args[]) throws Throwable { ServerSocket ss = new ServerSocket(1099); Socket s = new Socket(0.0.0.0, 1099); } } The output on RI and on Harmony differs: c:\testjava Test c:\testC:/Harmony/bin/ij Test java.net.ConnectException: 0.0.0.0/0.0.0.0:1099 - The address is not available at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:238) at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:200) at java.net.Socket.startupSocket(Socket.java:715) at java.net.Socket.init(Socket.java:139) at Test.main(Test.java:7) I wonder whether it is a bug in RI or a bug in LUNI of Harmony? = Warm Regards, Victor Martynov, Intel Middleware Product Division -- Mikhail Fursov - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[classlib] Uncertain behavior of new Socket(0.0.0.0, 1099);
Hello, I'm having trouble with an application. This problem concerns creating java.net.Socket on host 0.0.0.0. The test below illustrates this problem: import java.net.*; public class Test { public static void main(String args[]) throws Throwable { ServerSocket ss = new ServerSocket(1099); Socket s = new Socket(0.0.0.0, 1099); } } The output on RI and on Harmony differs: c:\testjava Test c:\testC:/Harmony/bin/ij Test java.net.ConnectException: 0.0.0.0/0.0.0.0:1099 - The address is not available at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:238) at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:200) at java.net.Socket.startupSocket(Socket.java:715) at java.net.Socket.init(Socket.java:139) at Test.main(Test.java:7) I wonder whether it is a bug in RI or a bug in LUNI of Harmony? = Warm Regards, Victor Martynov, Intel Middleware Product Division
Re: [classlib] Uncertain behavior of new Socket(0.0.0.0, 1099);
Hello Mark, I run the example on MS Windows XP, Harmony classlib+DRLVM dated 11 july 2006. c:\testc:\Harmony\bin\ij -version Apache Harmony DRLVM HEAD-4807 (2006-05-02), Windows/ia32/msvc 1310, debug = Warm Regards, Victor Martynov, Intel Middleware Product Division On 7/20/06, Mark Hindess [EMAIL PROTECTED] wrote: On 20 July 2006 at 15:34, Victor A Martynov [EMAIL PROTECTED] wrote: Hello, I'm having trouble with an application. This problem concerns creating java.net.Socket on host 0.0.0.0. What platform? Works for me on Linux (debian testing). -Mark. The test below illustrates this problem: import java.net.*; public class Test { public static void main(String args[]) throws Throwable { ServerSocket ss = new ServerSocket(1099); Socket s = new Socket(0.0.0.0, 1099); } } The output on RI and on Harmony differs: c:\testjava Test c:\testC:/Harmony/bin/ij Test java.net.ConnectException: 0.0.0.0/0.0.0.0:1099 - The address is not available at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:238) at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:200) at java.net.Socket.startupSocket(Socket.java:715) at java.net.Socket.init(Socket.java:139) at Test.main(Test.java:7) I wonder whether it is a bug in RI or a bug in LUNI of Harmony? = Warm Regards, Victor Martynov, Intel Middleware Product Division --=_Part_57416_17500570.1153395298489-- - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [classlib] Uncertain behavior of new Socket(0.0.0.0, 1099);
Hello Mikhail, Here are the results of running the modified test: --- import java.net.*; public class Test { public static void main(String args[]) throws Throwable { ServerSocket ss = new ServerSocket(1099, 0, InetAddress.getByName(0.0.0.0)); System.out.println(ss.getInetAddress()); Socket s = new Socket(0.0.0.0, 1099); } } --- c:\testjava Test /0.0.0.0 c:\testC:/Harmony/bin/ij -version Apache Harmony DRLVM HEAD-4807 (2006-05-02), Windows/ia32/msvc 1310, debug c:\testC:/Harmony/bin/ij Test /0.0.0.0 java.net.ConnectException: 0.0.0.0/0.0.0.0:1099 - The address is not available at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:238) at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:200) at java.net.Socket.startupSocket(Socket.java:715) at java.net.Socket.init(Socket.java:139) at Test.main(Test.java:10) = Warm Regards, Victor Martynov, Intel Middleware Product Division On 7/20/06, Mikhail Fursov [EMAIL PROTECTED] wrote: Add this line to the test to clarify the situation: System.out.println(ss.getInetAddress()); I think that for PC with multiple network adapters serversocket IP must be specified manually. On 7/20/06, Victor A Martynov [EMAIL PROTECTED] wrote: Hello, I'm having trouble with an application. This problem concerns creating java.net.Socket on host 0.0.0.0. The test below illustrates this problem: import java.net.*; public class Test { public static void main(String args[]) throws Throwable { ServerSocket ss = new ServerSocket(1099); Socket s = new Socket(0.0.0.0, 1099); } } The output on RI and on Harmony differs: c:\testjava Test c:\testC:/Harmony/bin/ij Test java.net.ConnectException: 0.0.0.0/0.0.0.0:1099 - The address is not available at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:238) at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:200) at java.net.Socket.startupSocket(Socket.java:715) at java.net.Socket.init(Socket.java:139) at Test.main(Test.java:7) I wonder whether it is a bug in RI or a bug in LUNI of Harmony? = Warm Regards, Victor Martynov, Intel Middleware Product Division -- Mikhail Fursov
Re: [classlib] Uncertain behavior of new Socket(0.0.0.0, 1099);
Hello Mark, I checked the behavior of the test on Linux. It seems that the problem exists on MS Windows only: -- [EMAIL PROTECTED]:~ uname -a Linux server 2.6.5-7.145lxset1-smp #1 SMP Thu Jan 27 09:19:29 UTC 2005 i686 i686 i386 GNU/Linux [EMAIL PROTECTED]:~ Harmony/bin/ij -version Apache Harmony DRLVM HEAD-4807 (2006-05-02), Linux/ia32/gcc 3.3.4, debug [EMAIL PROTECTED]:~ Harmony/bin/ij Test /0.0.0.0 [EMAIL PROTECTED]:~ java Test /0.0.0.0 [EMAIL PROTECTED]:~ -- The fact that Windows and Linux version behavior is different makes me think that it is a bug in LUNI rather than the bug in RI. = Warm Regards, Victor Martynov, Intel Middleware Product Division On 7/20/06, Mark Hindess [EMAIL PROTECTED] wrote: On 20 July 2006 at 15:34, Victor A Martynov [EMAIL PROTECTED] wrote: Hello, I'm having trouble with an application. This problem concerns creating java.net.Socket on host 0.0.0.0. What platform? Works for me on Linux (debian testing). -Mark. The test below illustrates this problem: import java.net.*; public class Test { public static void main(String args[]) throws Throwable { ServerSocket ss = new ServerSocket(1099); Socket s = new Socket(0.0.0.0, 1099); } } The output on RI and on Harmony differs: c:\testjava Test c:\testC:/Harmony/bin/ij Test java.net.ConnectException: 0.0.0.0/0.0.0.0:1099 - The address is not available at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:238) at org.apache.harmony.luni.net.PlainSocketImpl.connect( PlainSocketImpl.java:200) at java.net.Socket.startupSocket(Socket.java:715) at java.net.Socket.init(Socket.java:139) at Test.main(Test.java:7) I wonder whether it is a bug in RI or a bug in LUNI of Harmony? = Warm Regards, Victor Martynov, Intel Middleware Product Division --=_Part_57416_17500570.1153395298489-- - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]