ebin123456 / py-amqplib

Automatically exported from code.google.com/p/py-amqplib
GNU Lesser General Public License v2.1
0 stars 0 forks source link

[Errno 10054] An existing connection was forcibly closed by the remote host #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Python 2.6 (32bit) with amqplib 0.6.1 (used through kombu 1.1.6) and RabbitMQ 
2.4.1

I have exactly this problem when sending a message (receiving seems to work):

http://comments.gmane.org/gmane.comp.networking.rabbitmq.general/2265

The code is running on a Win2008 64bit VM running inside Virtual Box on Ubuntu 
10.10.  The VM firewall is disabled.

If I switch the kombu backend from amqplib to pika it all works.

Original issue reported on code.google.com by dgoris...@gmail.com on 8 Jul 2011 at 2:10

GoogleCodeExporter commented 9 years ago
I'm having trouble duplicating this, I tried adding a unittest to 
test_channel.py that sends and gets a 64MB message:

    def test_large2(self):
        """
        Test sending some extra extra large messages.

        """
        self.ch.access_request('/data', active=True, write=True, read=True)

        qname, _, _ = self.ch.queue_declare()

        # A 64MB Message
        msg = Message('unittest message' * (2**22),
            content_type='text/plain',
            application_headers={'foo': 7, 'bar': 'baz'})

        self.ch.basic_publish(msg, routing_key=qname)

        msg2 = self.ch.basic_get(no_ack=True)
        self.assertEqual(msg, msg2)

But it's working fine on my box (FreeBSD RabbitMQ 2.3.1) with both 0.6.1 and 
the current head code (which is way way faster for a big message like this)

If someone can supply an actual small bit of code that demonstrates the 
problem, that'd be most helpful.

Original comment by barry.pe...@gmail.com on 18 Jul 2011 at 5:12

GoogleCodeExporter commented 9 years ago
Since I filed this I switched to the pika backend of Kombu.  I now switched 
back to the py-amqplib backend and found that suddenly it all worked.  

The only thing I can think of that changed between both times is that I 
installed all the outstanding updates for: the win2008 virtual machine (running 
the amqplib client), the hosting ubuntu 10.10 os, and the virutal box tool 
itsefl.

So I cant reproduce the crash at the moment anymore :/  You can close the issue 
and if I run into it again I will report it.

Note: my message size was actually quite small (few kb).

Original comment by dgoris...@gmail.com on 19 Jul 2011 at 10:00

GoogleCodeExporter commented 9 years ago
OK, thanks for the followup.

Original comment by barry.pe...@gmail.com on 19 Jul 2011 at 1:52