You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Michael Sutter <Mi...@ipe.fzk.de> on 2008/08/29 16:17:34 UTC
Client closing TCP connection
Hello everybody,
I have a problem with my Axis2 Java client polling a Axis2C server. The
client
is polling a status method of my server every ten seconds. After running
some
hours a always got a exception on client side, that to many files are
opened.
So I searched where the problem is coming from and I found out, that the
TCP
connections of my client are not closed after the operation is performed.
With lsof I see a increasing number of opened TCP connections like this:
java 11035 auger 12u IPv6 2621843 TCP
ipecdas.fzk.de:45114->192.168.12.100:http (CLOSE_WAIT)
with the close_wait state. Is there any solution how I can close the
connection
from the Axis api? I tried stub.cleanup() and I always instantiated my
stub new
for every query. Nevertheless, both solutions don't fixed my problem.
Kind regard
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Client closing TCP connection
Posted by keith chapman <ke...@gmail.com>.
Hi Michael,
Are you using the same instance of the service client over and over
again or instantiating it each time?
Thanks,
Keith.
On Mon, Sep 1, 2008 at 5:00 PM, Michael Sutter
<Mi...@ipe.fzk.de> wrote:
> Hello Keith,
>
> I played a bit with the option and found out that I can use it
> when
> 1. instantiate the stub
> 2. query the service
> 3. set the option
> 4. instantiate the stub new for every ten second
>
> If it is working I can't say at the moment - the application
> must run for some hours.
>
> Was this with you meant in your mail?
>
> Kind regards
> Michael
>
> Michael Sutter wrote:
>
> Hello Keith,
>
> I'm a little bit confused about your reply. Did you really mean that I
> should
> set a new service client? Isn't the service client already set after
> initializing
> my stub object?
>
> What I have done is:
> MyStub myStub = new MyStub(....);
> myStub.._getServiceClient().getOptions().setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
> true);
>
> Is this what you mean?
> Nevertheless if I set the option I always got a AxisFault:
> Attempted read on closed stream.
>
> Maybe I have done something wrong?
>
> Kind regards
> Michael
>
> keith chapman wrote:
>
> Hi Michael,
>
> Can you try setting the property below.
>
> stub._setServiceClient.getOptions.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
> true);
>
> Thanks,
> Keith.
>
> On Fri, Aug 29, 2008 at 7:47 PM, Michael Sutter
> <Mi...@ipe.fzk.de> wrote:
>
>
> Hello everybody,
>
> I have a problem with my Axis2 Java client polling a Axis2C server. The
> client
> is polling a status method of my server every ten seconds. After running
> some
> hours a always got a exception on client side, that to many files are
> opened.
>
> So I searched where the problem is coming from and I found out, that the TCP
> connections of my client are not closed after the operation is performed.
> With lsof I see a increasing number of opened TCP connections like this:
> java 11035 auger 12u IPv6 2621843 TCP
> ipecdas.fzk.de:45114->192.168.12.100:http (CLOSE_WAIT)
>
> with the close_wait state. Is there any solution how I can close the
> connection
> from the Axis api? I tried stub.cleanup() and I always instantiated my stub
> new
> for every query. Nevertheless, both solutions don't fixed my problem.
>
> Kind regard
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
>
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Client closing TCP connection
Posted by Michael Sutter <Mi...@ipe.fzk.de>.
Hello Keith,
I played a bit with the option and found out that I can use it
when
1. instantiate the stub
2. query the service
3. set the option
4. instantiate the stub new for every ten second
If it is working I can't say at the moment - the application
must run for some hours.
Was this with you meant in your mail?
Kind regards
Michael
Michael Sutter wrote:
> Hello Keith,
>
> I'm a little bit confused about your reply. Did you really mean that I
> should
> set a new service client? Isn't the service client already set after
> initializing
> my stub object?
>
> What I have done is:
> MyStub myStub = new MyStub(....);
> myStub.._getServiceClient().getOptions().setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
> true);
>
> Is this what you mean?
> Nevertheless if I set the option I always got a AxisFault:
> Attempted read on closed stream.
>
> Maybe I have done something wrong?
>
> Kind regards
> Michael
>
> keith chapman wrote:
>> Hi Michael,
>>
>> Can you try setting the property below.
>>
>> stub._setServiceClient.getOptions.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
>> true);
>>
>> Thanks,
>> Keith.
>>
>> On Fri, Aug 29, 2008 at 7:47 PM, Michael Sutter
>> <Mi...@ipe.fzk.de> wrote:
>>
>>> Hello everybody,
>>>
>>> I have a problem with my Axis2 Java client polling a Axis2C server. The
>>> client
>>> is polling a status method of my server every ten seconds. After running
>>> some
>>> hours a always got a exception on client side, that to many files are
>>> opened.
>>>
>>> So I searched where the problem is coming from and I found out, that the TCP
>>> connections of my client are not closed after the operation is performed.
>>> With lsof I see a increasing number of opened TCP connections like this:
>>> java 11035 auger 12u IPv6 2621843 TCP
>>> ipecdas.fzk.de:45114->192.168.12.100:http (CLOSE_WAIT)
>>>
>>> with the close_wait state. Is there any solution how I can close the
>>> connection
>>> from the Axis api? I tried stub.cleanup() and I always instantiated my stub
>>> new
>>> for every query. Nevertheless, both solutions don't fixed my problem.
>>>
>>> Kind regard
>>> Michael
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>>
>>
>>
>>
>>
Re: Client closing TCP connection
Posted by Michael Sutter <Mi...@ipe.fzk.de>.
Hello Keith,
I'm a little bit confused about your reply. Did you really mean that I
should
set a new service client? Isn't the service client already set after
initializing
my stub object?
What I have done is:
MyStub myStub = new MyStub(....);
myStub.._getServiceClient().getOptions().setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
true);
Is this what you mean?
Nevertheless if I set the option I always got a AxisFault:
Attempted read on closed stream.
Maybe I have done something wrong?
Kind regards
Michael
keith chapman wrote:
> Hi Michael,
>
> Can you try setting the property below.
>
> stub._setServiceClient.getOptions.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
> true);
>
> Thanks,
> Keith.
>
> On Fri, Aug 29, 2008 at 7:47 PM, Michael Sutter
> <Mi...@ipe.fzk.de> wrote:
>
>> Hello everybody,
>>
>> I have a problem with my Axis2 Java client polling a Axis2C server. The
>> client
>> is polling a status method of my server every ten seconds. After running
>> some
>> hours a always got a exception on client side, that to many files are
>> opened.
>>
>> So I searched where the problem is coming from and I found out, that the TCP
>> connections of my client are not closed after the operation is performed.
>> With lsof I see a increasing number of opened TCP connections like this:
>> java 11035 auger 12u IPv6 2621843 TCP
>> ipecdas.fzk.de:45114->192.168.12.100:http (CLOSE_WAIT)
>>
>> with the close_wait state. Is there any solution how I can close the
>> connection
>> from the Axis api? I tried stub.cleanup() and I always instantiated my stub
>> new
>> for every query. Nevertheless, both solutions don't fixed my problem.
>>
>> Kind regard
>> Michael
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>
>
>
>
Re: Client closing TCP connection
Posted by keith chapman <ke...@gmail.com>.
Hi Michael,
Can you try setting the property below.
stub._setServiceClient.getOptions.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
true);
Thanks,
Keith.
On Fri, Aug 29, 2008 at 7:47 PM, Michael Sutter
<Mi...@ipe.fzk.de> wrote:
> Hello everybody,
>
> I have a problem with my Axis2 Java client polling a Axis2C server. The
> client
> is polling a status method of my server every ten seconds. After running
> some
> hours a always got a exception on client side, that to many files are
> opened.
>
> So I searched where the problem is coming from and I found out, that the TCP
> connections of my client are not closed after the operation is performed.
> With lsof I see a increasing number of opened TCP connections like this:
> java 11035 auger 12u IPv6 2621843 TCP
> ipecdas.fzk.de:45114->192.168.12.100:http (CLOSE_WAIT)
>
> with the close_wait state. Is there any solution how I can close the
> connection
> from the Axis api? I tried stub.cleanup() and I always instantiated my stub
> new
> for every query. Nevertheless, both solutions don't fixed my problem.
>
> Kind regard
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org