You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Jens Willhardt <jw...@googlemail.com> on 2008/12/02 15:42:26 UTC

Http-provider socket not closed

Hi everyone,

i have a serious problem. I'm using servicemix 3.2.3 and a servicemix-http
provider-endpoint (soap) to connect to an external service.
The Exchange with the external webservice is working fine.

After some time and a lot of calls I get an Exception

11:01:09,035 | ERROR | Timer-7    | AutoDeploymentService    |
ramework.AutoDeploymentService | Failed to persist file state to:
/home/user1/servicemix/hotdeploy
java.io.FileNotFoundException: /home/user1/servicemix/data/smx/hotdeploy.xml
(Too many open files)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at java.io.FileWriter.<init>(FileWriter.java:73)

This occours cause the max amount of connections on the linux system is
reached. After that servicemix stops.
Somehow the http-provider (http-client -> jettyClient) doesn't close the
connection.

Here is my provider configuration:

 <http:endpoint service="my:Service"
                 endpoint="ServiceLocalBinding"
                 role="provider"
                 locationURI="http://127.0.0.1/SomeService"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                 wsdlResource="classpath:service.wsdl"
                 soap="true"
                 soapVersion="1.1" />


Is there a way to configure the http-provider to close the connection after
transaction is done?

Thanks in advance!
Brgds
Jens

Re: Http-provider socket not closed

Posted by Jens Willhardt <jw...@googlemail.com>.
Found the solution...
The issue can be solved with a different kind of conifguration:

instead of using


 <http:endpoint service="my:Service"
                 endpoint="ServiceLocalBinding"
                 role="provider"
                 locationURI="http://127.0.0.1/SomeService"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                 wsdlResource="classpath:service.wsdl"
                 soap="true"
                 soapVersion="1.1" />

use:

<http:provider service="my:Service"
                    endpoint="endpointName"
                    locationURI="http://127.0.0.1/SomeService"/>

additional infos here:
http://servicemix.apache.org/servicemix-http-new-endpoints.html

2008/12/2 Jens Willhardt <jw...@googlemail.com>

> Hi everyone,
>
> i have a serious problem. I'm using servicemix 3.2.3 and a servicemix-http
> provider-endpoint (soap) to connect to an external service.
> The Exchange with the external webservice is working fine.
>
> After some time and a lot of calls I get an Exception
>
> 11:01:09,035 | ERROR | Timer-7    | AutoDeploymentService    |
> ramework.AutoDeploymentService | Failed to persist file state to:
> /home/user1/servicemix/hotdeploy
> java.io.FileNotFoundException:
> /home/user1/servicemix/data/smx/hotdeploy.xml (Too many open files)
>     at java.io.FileOutputStream.open(Native Method)
>     at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
>     at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
>     at java.io.FileWriter.<init>(FileWriter.java:73)
>
> This occours cause the max amount of connections on the linux system is
> reached. After that servicemix stops.
> Somehow the http-provider (http-client -> jettyClient) doesn't close the
> connection.
>
> Here is my provider configuration:
>
>  <http:endpoint service="my:Service"
>                  endpoint="ServiceLocalBinding"
>                  role="provider"
>                  locationURI="http://127.0.0.1/SomeService"
>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>                  wsdlResource="classpath:service.wsdl"
>                  soap="true"
>                  soapVersion="1.1" />
>
>
> Is there a way to configure the http-provider to close the connection after
> transaction is done?
>
> Thanks in advance!
> Brgds
> Jens
>
>
>
>
>