You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ali Sadik Kumlali (JIRA)" <ji...@apache.org> on 2006/05/12 23:04:08 UTC

[jira] Created: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

"Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
--------------------------------------------------------------------------------------------

         Key: AXIS2-725
         URL: http://issues.apache.org/jira/browse/AXIS2-725
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug

    Versions: 1.0    
 Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
    Reporter: Ali Sadik Kumlali


When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.

Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?

Anyway, in either case, it should not throw such exception.

-- 
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


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Jaliya Ekanayake (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12383383 ] 

Jaliya Ekanayake commented on AXIS2-725:
----------------------------------------

I would like to suggest the approach where we use only one port per jvm. 

The reasons for not using many ports.

We need to all of them across firewalls.
It is so hard to debug by monitoring SOAP messages (using TCPMon or some other)

We use the above approach in Sandesha1 and the last client simply closes the Listener.



> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali

>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12415320 ] 

Deepal Jayasinghe commented on AXIS2-725:
-----------------------------------------

I found the problem it is due to your sharing same OM element for both invocation, if you change your code to following it will work perfectly

sender = new ServiceClient(confCtx, null);
            sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
            sender.setOptions(options);
            
            OMElement payload1 = ClientUtil.getEchoOMElement();
            
            sender.sendReceiveNonBlocking(payload1, callback);

            //Non-Blocking Invocation
            sender2 = new ServiceClient(confCtx, null);
            sender2.engageModule(new QName(Constants.MODULE_ADDRESSING));
            sender2.setOptions(options);
            
            OMElement payload2 = ClientUtil.getEchoOMElement();
            
            sender2.sendReceiveNonBlocking(payload2, callback2);

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.log.txt, log4j.properties, message_flow.txt, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Ali Sadik Kumlali (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-725?page=all ]

Ali Sadik Kumlali updated AXIS2-725:
------------------------------------

    Attachment: server.log.txt

server log has been attached.

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.log.txt, message_flow.txt, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Ali Sadik Kumlali (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12415100 ] 

Ali Sadik Kumlali commented on AXIS2-725:
-----------------------------------------

Thanks Deepal. I don't know whether you ran the code against the latest SVN. I'll try it with Axis2-1.0 without doing any modification and will let you know.

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.log.txt, message_flow.txt, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Sanjiva Weerawarana (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12383362 ] 

Sanjiva Weerawarana commented on AXIS2-725:
-------------------------------------------

While that may avoid the issue, we should fix it .. just need to loop until we get a free port. 

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali

>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


[jira] Updated: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Ali Sadik Kumlali (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-725?page=all ]

Ali Sadik Kumlali updated AXIS2-725:
------------------------------------

    Attachment: EchoNonBlockingDualClient.java
                message_flow.txt
                client.log.txt

Sample code, message flow and client log has been attached.

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.log.txt, message_flow.txt, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


[jira] Resolved: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-725?page=all ]
     
Deepal Jayasinghe resolved AXIS2-725:
-------------------------------------

    Resolution: Fixed

marking as fixed

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.java, client.log.txt, log4j.properties, message_flow.txt, message_flow_2.txt, server.java, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Ali Sadik Kumlali (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12412044 ] 

Ali Sadik Kumlali commented on AXIS2-725:
-----------------------------------------

Thanks Deepal. What I've got from your comments are:
- If I invoke the service from different JVMs, then JVM_Bind exception occurs because it loads the port from the config file.
- Within the same JVM, if I invoke the service twice 
   - Without passing the same configuration context, then JVM_Bind exception occurs.
   - By passing the same configuration context, then no JVM_Bind exception occurs.

I did what you said and did not see JVM_Bind exception. But this time server sends an interesting exception. You can find my test code, message flow (captured by sniffer), server log and client log files attached. I think that is related to another issue AXIS2-741.


> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe

>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Ali Sadik Kumlali (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12415541 ] 

Ali Sadik Kumlali commented on AXIS2-725:
-----------------------------------------

When I apply your change, the second request caused bouncing messaging.

I'll attach the message_flow.txt

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.log.txt, log4j.properties, message_flow.txt, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12412019 ] 

Deepal Jayasinghe commented on AXIS2-725:
-----------------------------------------

Solution to the problem
  - First create configuration context (any way you like)
  - Next create ServiceClient using that
  - do the service invocation
 I- f you want to have many of them , then create all service client using the above configuration context.

  (ServiceClient correctly handle Listener manager setting up and transport start up )

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe

>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


[jira] Updated: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Ali Sadik Kumlali (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-725?page=all ]

Ali Sadik Kumlali updated AXIS2-725:
------------------------------------

    Attachment: log4j.properties

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.log.txt, log4j.properties, message_flow.txt, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-725?page=all ]

Deepal Jayasinghe updated AXIS2-725:
------------------------------------

    Attachment: server.java

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.java, client.log.txt, log4j.properties, message_flow.txt, message_flow_2.txt, server.java, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Sanjiva Weerawarana (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12394627 ] 

Sanjiva Weerawarana commented on AXIS2-725:
-------------------------------------------

You're absolutely right Jaliya .. and we have the capability thru ListenerManager (thru a static config context approach; that's how we solve the problem for the servlet case). It may be that we're not setting that for the SimpleAxisServer; so this is a bug which should not require a workaround.

I mistakenly read the original issue as the user wanted to start two servers for some reason; my bad.

In any case though, the code must loop thru to find an available port; its certainly possible port 6060 is taken by someone else.

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali

>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12417762 ] 

Deepal Jayasinghe commented on AXIS2-725:
-----------------------------------------

I test on current SVN , and it works for me , can you please confirm me.
I am attaching both client and server code for ur refernce 

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.log.txt, log4j.properties, message_flow.txt, message_flow_2.txt, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-725?page=all ]

Deepal Jayasinghe reassigned AXIS2-725:
---------------------------------------

    Assign To: Deepal Jayasinghe

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe

>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12415096 ] 

Deepal Jayasinghe commented on AXIS2-725:
-----------------------------------------

I ran your service with following modified EchoNonBlockingDualClient and I got the following response

env:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing"><soapenv:Header><wsa:To>http://192.168.1.194:6060/axis2/services/annonService3502256/annonOutInOp</wsa:To><wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address></wsa:ReplyTo><wsa:From><wsa:Address>http://127.0.0.1:8080/axis2/services/MyService</wsa:Address></wsa:From><wsa:FaultTo><wsa:Address>http://127.0.0.1:8080/axis2/services/MyService</wsa:Address></wsa:FaultTo><wsa:MessageID>urn:uuid:58249018EE9E642452114966682500413</wsa:MessageID><wsa:Action>urn:echo</wsa:Action><wsa:RelatesTo wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply">urn:uuid:24B7987B787320551E11496668246842</wsa:RelatesTo></soapenv:Header><soapenv:Body><example1:echo xmlns:example1="http://example1.org/example1" xmlns:tns="http://ws.apache.org/axis2"><example1:Text>Axis2 Echo String </example1:Text></example1:echo></soapenv:Body></soapenv:Envel
 ope>

And I did not get any exception.


Modified Class

 ConfigurationContext confCtx =
                    ConfigurationContextFactory.createConfigurationContextFromFileSystem("repolocation", null);

            //Non-Blocking Invocation
            sender = new ServiceClient(confCtx, null);
            sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
            sender.setOptions(options);
            sender.sendReceiveNonBlocking(payload, callback);

            //Non-Blocking Invocation
            sender2 = new ServiceClient(confCtx, null);
            sender2.engageModule(new QName(Constants.MODULE_ADDRESSING));
            sender2.setOptions(options);
            sender2.sendReceiveNonBlocking(payload, callback2);



Can you please check whether it is working for you ?

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.log.txt, message_flow.txt, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Ali Sadik Kumlali (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12415125 ] 

Ali Sadik Kumlali commented on AXIS2-725:
-----------------------------------------

With the out-of-the box Axis2-1.0, I run into the same behaviour. If you put log4j.properties in the client's classpath you should get  "org.apache.axis2.AxisFault: Transport error 500 . Error Message...". I'll attach the log4j.properties file, too.

Actually, as you posted out, there is only one response for two requests since our second request causes an error. It is clearly seen in sniffer output (message_flow.txt).


> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.log.txt, message_flow.txt, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-725?page=all ]

Deepal Jayasinghe updated AXIS2-725:
------------------------------------

    Attachment: client.java

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.java, client.log.txt, log4j.properties, message_flow.txt, message_flow_2.txt, server.java, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Ali Sadik Kumlali (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-725?page=all ]

Ali Sadik Kumlali updated AXIS2-725:
------------------------------------

    Attachment: message_flow_2.txt

message_flow_2.txt was added.

P.S.: Sorry for the delay. I consistently ran into uploading problem.

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.log.txt, log4j.properties, message_flow.txt, message_flow_2.txt, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Chamikara Jayalath (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12383352 ] 

Chamikara Jayalath commented on AXIS2-725:
------------------------------------------

You can avoid this by sharing your configuration context between the invocations.
But if ur requirement is to use different configuration contexts (or different repos.) you can set the listner port dynamically using following code.

TransportInDescription transportIn = serviceClient.getAxisService().getAxisConfiguration().getTransportIn(new  QName (Constants.TRANSPORT_HTTP));
if (transportIn!=null) {
		Parameter param = transportIn.getParameter(TransportListener.PARAM_PORT);
		param.setValue("6061");
}

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali

>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


[jira] Commented: (AXIS2-725) "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-725?page=comments#action_12417764 ] 

Deepal Jayasinghe commented on AXIS2-725:
-----------------------------------------

EchoService is look like

public class EchoService {

    public String echo(String str) {
        return str;
    }

}

> "Address already in use: JVM_Bind" exception while creating second SimpleHTTPServer instance
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS2-725
>          URL: http://issues.apache.org/jira/browse/AXIS2-725
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Win2K Pro and WinXP Pro, JDK 1.4, Tomcat 5.5
>     Reporter: Ali Sadik Kumlali
>     Assignee: Deepal Jayasinghe
>  Attachments: EchoNonBlockingDualClient.java, client.java, client.log.txt, log4j.properties, message_flow.txt, message_flow_2.txt, server.java, server.log.txt
>
> When I run two EchoNonBlockingDualClient sample at the same time, first one successfully starts SimpleHTTPServer on port 6060 and the second one gets an java.net.BindException: Address already in use: JVM_Bind" while trying to start the server.
> Doesn't I have an option to listen all the responses for its dedicated port? For example 6060 for the first instance, 6061 for the second one, and so on. Or, should i assume Axis2 to use the same port for the responses of all the long running transactions?
> Anyway, in either case, it should not throw such exception.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org