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 Bjoern Krueger <kr...@tyntec.biz> on 2007/07/16 14:58:17 UTC

[Axis2-1.3-RC1] Connections are not closing correctly

Hi,

i? m using tomcat6 and axis2 to deploy a webservice. This webservice has 
to deal with a lot of traffic. The problem is that the Http-Connections 
are not closed correctly and the amout of connections in the CLOSE_WAIT 
state increase constantly till the maximum number is reached. If I 
activate the AUTORELEASE_CONNECTION property in the options, im getting 
the Exception : Trying to read on closed stream.
Has anyone an idea what i can do to close the connections properly?

regards

Björn Krüger

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


Re: [Axis2-1.3-RC1] Connections are not closing correctly

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Björn,


how does your client look like?, try to look at this example
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncService2Test.java


Michele

On Mon, 2007-07-16 at 14:58 +0200, Bjoern Krueger wrote:
> Hi,
> 
> i? m using tomcat6 and axis2 to deploy a webservice. This webservice has 
> to deal with a lot of traffic. The problem is that the Http-Connections 
> are not closed correctly and the amout of connections in the CLOSE_WAIT 
> state increase constantly till the maximum number is reached. If I 
> activate the AUTORELEASE_CONNECTION property in the options, im getting 
> the Exception : Trying to read on closed stream.
> Has anyone an idea what i can do to close the connections properly?
> 
> regards
> 
> Björn Krüger
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


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


RE: useOriginalwsdl again

Posted by Dimuthu <mu...@apache.org>.
Hi,

We experienced the same problem. One of our team members fixed the
problem in the trunk. This fix must be included in Axis2 1.3. Our
services.xml is available here.

http://wso2.org/repos/wso2/trunk/solutions/identity/modules/security-token-service/services.xml

Regards,
Dimuthu


On Tue, 2007-07-17 at 09:12 +0200, Desmond Whewell (CV/ETL) wrote:
> They are indentical. I can tell that the two are related because at one point the value of useOriginalwsdl was incorrect and I spotted that problem during debug of the invoked service.
> 
> What I'm unclear about is at what point is the wsld4jdefinition parameter created. Does Axis2 create this in advance of the '?wsdl' invocation, at start-up, say? Maybe that is where the problem lies? I had the naïve idea that when useOriginalwsdl was set to 'true', Axis 2 would simply stream the appropriate file in the response. Is the wsdl4j stuff used to support port re-writing?
> 
> -----Original Message-----
> From: Deepal Jayasinghe [mailto:deepal@opensource.lk] 
> Sent: 16 July 2007 18:44
> To: axis-user@ws.apache.org
> Subject: Re: useOriginalwsdl again
> 
> Did you check the wsdl service name and the service name in the services.xml. Those two should be equal .
> <definition>
> 
> <service name="Foo"> </service>
> </definition>
> 
> <serviceGroup>
>     <service name="Foo"> </service>
> </serviceGroup>
> 
> Thanks
> Deepal
> 
> Desmond Whewell (CV/ETL) wrote:
> > Axis2 1.2/Tomcat 5.5.9
> >
> > I have put the following in my services.xml file, as suggested on this
> > list:
> >
> > <parameter locked="false" name="useOriginalwsdl">true</parameter>
> > <parameter locked="false"
> > name="modifyUserWSDLPortAddress">true</parameter>
> >
> > I want the server to supply the original WSDL file but allow it to 
> > modify the port address. The original WSDL file is in the META-INF 
> > directory. Despite this, it fails with an error in IE:
> >
> > - <error>
> >   <description>Unable to generate WSDL 1.1 for this 
> > service</description>
> >   <reason>If you wish Axis2 to automatically generate the WSDL 1.1, 
> > then please +set useOriginalwsdl as false in your services.xml</reason>
> >   </error>
> >
> > Which is a bit odd because I wasn't asking it to generate the WSDL.
> >
> > If I run in debug, it drops into:
> >
> > ...
> >     public void printWSDL(OutputStream out, String requestIP, String
> > servicePath) throws AxisFault {
> >         if (isUseUserWSDL()) {
> >             Parameter wsld4jdefinition = 
> > getParameter(WSDLConstants.WSDL_4_J_DEFINITION);
> >             if (wsld4jdefinition != null) { ...
> >
> > It fails at this point because it can't get this parameter. Is this a 
> > parameter that I was supposed to add? If so, what value has it?
> >
> > Cheers, Des
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> >   
> 
> --
> Thanks,
> Deepal
> ................................................................
> "The highest tower is built one brick at a time"
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


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


RE: useOriginalwsdl again

Posted by "Desmond Whewell (CV/ETL)" <de...@ericsson.com>.
They are indentical. I can tell that the two are related because at one point the value of useOriginalwsdl was incorrect and I spotted that problem during debug of the invoked service.

What I'm unclear about is at what point is the wsld4jdefinition parameter created. Does Axis2 create this in advance of the '?wsdl' invocation, at start-up, say? Maybe that is where the problem lies? I had the naïve idea that when useOriginalwsdl was set to 'true', Axis 2 would simply stream the appropriate file in the response. Is the wsdl4j stuff used to support port re-writing?

-----Original Message-----
From: Deepal Jayasinghe [mailto:deepal@opensource.lk] 
Sent: 16 July 2007 18:44
To: axis-user@ws.apache.org
Subject: Re: useOriginalwsdl again

Did you check the wsdl service name and the service name in the services.xml. Those two should be equal .
<definition>

<service name="Foo"> </service>
</definition>

<serviceGroup>
    <service name="Foo"> </service>
</serviceGroup>

Thanks
Deepal

Desmond Whewell (CV/ETL) wrote:
> Axis2 1.2/Tomcat 5.5.9
>
> I have put the following in my services.xml file, as suggested on this
> list:
>
> <parameter locked="false" name="useOriginalwsdl">true</parameter>
> <parameter locked="false"
> name="modifyUserWSDLPortAddress">true</parameter>
>
> I want the server to supply the original WSDL file but allow it to 
> modify the port address. The original WSDL file is in the META-INF 
> directory. Despite this, it fails with an error in IE:
>
> - <error>
>   <description>Unable to generate WSDL 1.1 for this 
> service</description>
>   <reason>If you wish Axis2 to automatically generate the WSDL 1.1, 
> then please +set useOriginalwsdl as false in your services.xml</reason>
>   </error>
>
> Which is a bit odd because I wasn't asking it to generate the WSDL.
>
> If I run in debug, it drops into:
>
> ...
>     public void printWSDL(OutputStream out, String requestIP, String
> servicePath) throws AxisFault {
>         if (isUseUserWSDL()) {
>             Parameter wsld4jdefinition = 
> getParameter(WSDLConstants.WSDL_4_J_DEFINITION);
>             if (wsld4jdefinition != null) { ...
>
> It fails at this point because it can't get this parameter. Is this a 
> parameter that I was supposed to add? If so, what value has it?
>
> Cheers, Des
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>   

--
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



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


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


Re: useOriginalwsdl again

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Did you check the wsdl service name and the service name in the
services.xml. Those two should be equal .
<definition>

<service name="Foo"> </service>
</definition>

<serviceGroup>
    <service name="Foo"> </service>
</serviceGroup>

Thanks
Deepal

Desmond Whewell (CV/ETL) wrote:
> Axis2 1.2/Tomcat 5.5.9
>
> I have put the following in my services.xml file, as suggested on this
> list:
>
> <parameter locked="false" name="useOriginalwsdl">true</parameter>
> <parameter locked="false"
> name="modifyUserWSDLPortAddress">true</parameter>
>
> I want the server to supply the original WSDL file but allow it to
> modify the port address. The original WSDL file is in the META-INF
> directory. Despite this, it fails with an error in IE:
>
> - <error>
>   <description>Unable to generate WSDL 1.1 for this
> service</description> 
>   <reason>If you wish Axis2 to automatically generate the WSDL 1.1, then
> please +set useOriginalwsdl as false in your services.xml</reason> 
>   </error>
>
> Which is a bit odd because I wasn't asking it to generate the WSDL.
>
> If I run in debug, it drops into:
>
> ...
>     public void printWSDL(OutputStream out, String requestIP, String
> servicePath) throws AxisFault {
>         if (isUseUserWSDL()) {
>             Parameter wsld4jdefinition =
> getParameter(WSDLConstants.WSDL_4_J_DEFINITION);
>             if (wsld4jdefinition != null) {
> ...
>
> It fails at this point because it can't get this parameter. Is this a
> parameter that I was supposed to add? If so, what value has it?
>
> Cheers, Des
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>   

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



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


useOriginalwsdl again

Posted by "Desmond Whewell (CV/ETL)" <de...@ericsson.com>.
Axis2 1.2/Tomcat 5.5.9

I have put the following in my services.xml file, as suggested on this
list:

<parameter locked="false" name="useOriginalwsdl">true</parameter>
<parameter locked="false"
name="modifyUserWSDLPortAddress">true</parameter>

I want the server to supply the original WSDL file but allow it to
modify the port address. The original WSDL file is in the META-INF
directory. Despite this, it fails with an error in IE:

- <error>
  <description>Unable to generate WSDL 1.1 for this
service</description> 
  <reason>If you wish Axis2 to automatically generate the WSDL 1.1, then
please +set useOriginalwsdl as false in your services.xml</reason> 
  </error>

Which is a bit odd because I wasn't asking it to generate the WSDL.

If I run in debug, it drops into:

...
    public void printWSDL(OutputStream out, String requestIP, String
servicePath) throws AxisFault {
        if (isUseUserWSDL()) {
            Parameter wsld4jdefinition =
getParameter(WSDLConstants.WSDL_4_J_DEFINITION);
            if (wsld4jdefinition != null) {
...

It fails at this point because it can't get this parameter. Is this a
parameter that I was supposed to add? If so, what value has it?

Cheers, Des

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


Re: [Axis2-1.3-RC1] Connections are not closing correctly

Posted by Bjoern Krueger <kr...@tyntec.biz>.
Hi,

i tried to use serviceClient.cleanupTransport() but it didn?t solve the 
problem.
I had a look at the example at:
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncService2Test.java
The Problem is that if i activate AUTO_RELEASE_CONNECTION or 
REUSE_HTTP_CLIENT in the options the callback does not receive any answers.

regards

Björn Krüger

Deepal Jayasinghe schrieb:
> Hi Bjoern ,
> try to call
> serviceClient.cleanUpTransport(); after each request
>
> Thanks
> Deepal
>   
>> Hi,
>>
>> i? m using tomcat6 and axis2 to deploy a webservice. This webservice
>> has to deal with a lot of traffic. The problem is that the
>> Http-Connections are not closed correctly and the amout of connections
>> in the CLOSE_WAIT state increase constantly till the maximum number is
>> reached. If I activate the AUTORELEASE_CONNECTION property in the
>> options, im getting the Exception : Trying to read on closed stream.
>> Has anyone an idea what i can do to close the connections properly?
>>
>> regards
>>
>> Björn Krüger
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>>     
>
>   


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


Re: [Axis2-1.3-RC1] Connections are not closing correctly

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Bjoern ,
try to call
serviceClient.cleanUpTransport(); after each request

Thanks
Deepal
> Hi,
>
> i? m using tomcat6 and axis2 to deploy a webservice. This webservice
> has to deal with a lot of traffic. The problem is that the
> Http-Connections are not closed correctly and the amout of connections
> in the CLOSE_WAIT state increase constantly till the maximum number is
> reached. If I activate the AUTORELEASE_CONNECTION property in the
> options, im getting the Exception : Trying to read on closed stream.
> Has anyone an idea what i can do to close the connections properly?
>
> regards
>
> Björn Krüger
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



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