You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Cajus Pollmeier <ca...@naasa.net> on 2012/04/13 09:27:19 UTC

What exactly does LinkClosed mean?

Hi,

I'm using the python-qpid package to do some messaging. Sometime - 
especially after some time of inactivity, the exception "LinkClosed" is 
raised when sending a message:

   ...
   File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py", 
line 836, in send
     self._ecwait(lambda: self.linked)
   File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py", 
line 51, in _ecwait
     self.check_closed()
   File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py", 
line 793, in check_closed
     raise LinkClosed()

Reading the source I'm not quite sure what that means - is the sender 
connection down? Or is the receiver bored of dealing with the sender?

What would be the correct way to deal with that?

Thanks,
Cajus

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: What exactly does LinkClosed mean?

Posted by Cajus Pollmeier <ca...@naasa.net>.
Am 17.04.2012 11:27, schrieb Gordon Sim:
> On 04/17/2012 10:22 AM, Cajus Pollmeier wrote:
>> Does an open sender stay open all the time if the underlying 
>> connection
>> is configured with reconnect=True?
>
> Yes, unless the connection underneath it is lost. However in that
> case I would expect some warning in the qpidd log at least.

Ok. Within the 2%, there was a static leftover that closed the wrong 
sender. So - your first guess was right ;-)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: What exactly does LinkClosed mean?

Posted by Gordon Sim <gs...@redhat.com>.
On 04/17/2012 10:22 AM, Cajus Pollmeier wrote:
> Does an open sender stay open all the time if the underlying connection
> is configured with reconnect=True?

Yes, unless the connection underneath it is lost. However in that case I 
would expect some warning in the qpidd log at least.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: What exactly does LinkClosed mean?

Posted by Cajus Pollmeier <ca...@naasa.net>.
Am 17.04.2012 10:07, schrieb Gordon Sim:
> On 04/17/2012 08:40 AM, Cajus Pollmeier wrote:
>> Am 16.04.2012 10:46, schrieb Gordon Sim:
>>> On 04/13/2012 08:27 AM, Cajus Pollmeier wrote:
>>>> Hi,
>>>>
>>>> I'm using the python-qpid package to do some messaging. Sometime -
>>>> especially after some time of inactivity, the exception 
>>>> "LinkClosed" is
>>>> raised when sending a message:
>>>>
>>>> ...
>>>> File 
>>>> "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
>>>> line 836, in send
>>>> self._ecwait(lambda: self.linked)
>>>> File 
>>>> "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
>>>> line 51, in _ecwait
>>>> self.check_closed()
>>>> File 
>>>> "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
>>>> line 793, in check_closed
>>>> raise LinkClosed()
>>>>
>>>> Reading the source I'm not quite sure what that means - is the 
>>>> sender
>>>> connection down? Or is the receiver bored of dealing with the 
>>>> sender?
>>>>
>>>> What would be the correct way to deal with that?
>>>
>>> Is there anything in the broker logs? Any error messages in 
>>> particular?
>>
>> Nothing more than the stacktrace above. I can't find any hints in 
>> the
>> qpidd.log. Currently waiting to get the error again to have the 
>> exact
>> time where it happens.
>>
>>> Does your application have multiple threads accessing the sender?
>>
>> Yes, it has. Sadly the problem only occurs after a day or more.
>
> Is it possible that one thread is closing the sender while another is
> still in send()?

I'm about 98% sure that this is not the case. There's a pool of senders 
that are shared between the threads. If one is closed it's removed from 
the pool, so no one else is getting the closed sender. In the moment it 
looks like some kind of timeout issue, because it only happens if an 
open sender has not been used for some time.

Does an open sender stay open all the time if the underlying connection 
is configured with reconnect=True?

Well. Anyway - I'm inspecting the remaining 2% to be really sure that 
there's no stupid "close bug" on my side.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: What exactly does LinkClosed mean?

Posted by Gordon Sim <gs...@redhat.com>.
On 04/17/2012 08:40 AM, Cajus Pollmeier wrote:
> Am 16.04.2012 10:46, schrieb Gordon Sim:
>> On 04/13/2012 08:27 AM, Cajus Pollmeier wrote:
>>> Hi,
>>>
>>> I'm using the python-qpid package to do some messaging. Sometime -
>>> especially after some time of inactivity, the exception "LinkClosed" is
>>> raised when sending a message:
>>>
>>> ...
>>> File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
>>> line 836, in send
>>> self._ecwait(lambda: self.linked)
>>> File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
>>> line 51, in _ecwait
>>> self.check_closed()
>>> File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
>>> line 793, in check_closed
>>> raise LinkClosed()
>>>
>>> Reading the source I'm not quite sure what that means - is the sender
>>> connection down? Or is the receiver bored of dealing with the sender?
>>>
>>> What would be the correct way to deal with that?
>>
>> Is there anything in the broker logs? Any error messages in particular?
>
> Nothing more than the stacktrace above. I can't find any hints in the
> qpidd.log. Currently waiting to get the error again to have the exact
> time where it happens.
>
>> Does your application have multiple threads accessing the sender?
>
> Yes, it has. Sadly the problem only occurs after a day or more.

Is it possible that one thread is closing the sender while another is 
still in send()?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: What exactly does LinkClosed mean?

Posted by Cajus Pollmeier <ca...@naasa.net>.
Am 16.04.2012 10:46, schrieb Gordon Sim:
> On 04/13/2012 08:27 AM, Cajus Pollmeier wrote:
>> Hi,
>>
>> I'm using the python-qpid package to do some messaging. Sometime -
>> especially after some time of inactivity, the exception "LinkClosed" 
>> is
>> raised when sending a message:
>>
>> ...
>> File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
>> line 836, in send
>> self._ecwait(lambda: self.linked)
>> File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
>> line 51, in _ecwait
>> self.check_closed()
>> File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
>> line 793, in check_closed
>> raise LinkClosed()
>>
>> Reading the source I'm not quite sure what that means - is the 
>> sender
>> connection down? Or is the receiver bored of dealing with the 
>> sender?
>>
>> What would be the correct way to deal with that?
>
> Is there anything in the broker logs? Any error messages in 
> particular?

Nothing more than the stacktrace above. I can't find any hints in the 
qpidd.log. Currently waiting to get the error again to have the exact 
time where it happens.

> Does your application have multiple threads accessing the sender?

Yes, it has. Sadly the problem only occurs after a day or more.

Thanks,
Cajus

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: What exactly does LinkClosed mean?

Posted by Gordon Sim <gs...@redhat.com>.
On 04/13/2012 08:27 AM, Cajus Pollmeier wrote:
> Hi,
>
> I'm using the python-qpid package to do some messaging. Sometime -
> especially after some time of inactivity, the exception "LinkClosed" is
> raised when sending a message:
>
> ...
> File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
> line 836, in send
> self._ecwait(lambda: self.linked)
> File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
> line 51, in _ecwait
> self.check_closed()
> File "/usr/lib/python2.7/dist-packages/qpid/messaging/endpoints.py",
> line 793, in check_closed
> raise LinkClosed()
>
> Reading the source I'm not quite sure what that means - is the sender
> connection down? Or is the receiver bored of dealing with the sender?
>
> What would be the correct way to deal with that?

Is there anything in the broker logs? Any error messages in particular?

Does your application have multiple threads accessing the sender?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org