You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Martin Lichtin <li...@yahoo.com> on 2013/11/06 10:53:27 UTC
Re: Re: "Address already in use" using Pax Exam
I've seen a similar issue and at some point opened
https://issues.apache.org/jira/browse/KARAF-2348
With the versions I use it's quite obvious that Pax-Exam does not wait
for the container to shut down completely.
Martin
PS: My workaround is to wait a bit for the ssh port to become available
and only then return from the pax-exam config() method.
On 30/10/2013 13:24, Christian Schneider wrote:
> There are two main possibilities:
>
> - Sometimes karaf does not end after a test and hangs around. In this
> case you should see the additional process. This does not happen too
> often though
> - After sockets are closed the OS blocks them for a while before other
> applications can use them. See:
> http://hea-www.harvard.edu/~fine/Tech/addrinuse.html
> The SO_REUSEADDR option can help if you are in control of opening the
> socket.
>
> So are you sure there is no process still running when the next test
> starts? On which port do you see the error?
>
> Christian
>
> On 30.10.2013 11:42, Frizz wrote:
>> Hi there,
>>
>> I use Pax Exam 3.3 for automated testing. Sporadically I get a
>> "Address already in use" exceptions because some of my ports (of
>> applications running inside the Karaf container) are still open from
>> a previous test.
>>
>> I don't exactly understand why this happens, because I thought, once
>> one Pax Exam tests ends, and the container shuts down, the ports are
>> closed. No?
>>
>> Have some of you experienced similar problems? What was your solution?
>>
>> cheers,
>> F.
>>
>>
>
>