You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org> on 2006/12/06 16:46:22 UTC

[jira] Updated: (HARMONY-2503) [classlib][net]ServerSocket refuses connection on 0.0.0.0 after successful connection on localhost

     [ http://issues.apache.org/jira/browse/HARMONY-2503?page=all ]

Nikolay Kuznetsov updated HARMONY-2503:
---------------------------------------

    Attachment: test.java

Harmony output:
ok
server: wait created
server: wait loop
server: started
server: wait ok
started server
server: wait for connection
started client
client: started
server: ok
client: connected
client: ok
all finished
ok
server: wait created
server: wait loop
server: started
host==0.0.0.0
server: wait ok
started server
server: wait for connection
started client
client: started
error connecting: -249
java.net.ConnectException: 0.0.0.0/0.0.0.0:8080 - Connection refused
        at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:224)
        at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:496)
        at java.net.Socket.connect(Socket.java:978)
        at java.net.Socket.connect(Socket.java)
        at test$ClientThread.run(test.java:89)
        at java.lang.Thread.run(Unknown Source)

RI output:
ok
server: wait created
server: wait loop
server: started
server: wait ok
started server
server: wait for connection
started client
client: started
server: ok
client: connected
client: ok
all finished
ok
server: wait created
server: wait loop
server: started
host==0.0.0.0
server: wait for connection
server: wait ok
started server
started client
client: started
server: ok
client: connected
client: ok
all finished

> [classlib][net]ServerSocket refuses connection on 0.0.0.0 after successful connection on localhost
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2503
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2503
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: WinXP
>            Reporter: Nikolay Kuznetsov
>         Attachments: test.java
>
>
> ServerSocket listening on 0.0.0.0 (any_address) refuses connection to 0.0.0.0 if prior to this successful connection was established on localhost:8080 inside same JVM i.e. the following sequence of accept/connect actions results in Connection Refused exception
>  
> ServerSocket(localhost:8080).accept()
> Socket.connect(localhost:8080
> ServerSocket(0:8080).accept()
> Socket.connect(0:8080) -> Connection refused
> while reverse set of actions(first connect to 0 and localhost afterwards) works fine:
> ServerSocket(0:8080).accept()
> Socket.connect(0:8080) 
> ServerSocket(localhost:8080).accept()
> Socket.connect(localhost:8080)
> RI works fine in both cases, attached test demonstrates this problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira