Getting BlockingIOError for every simple producing
See original GitHub issueHi, I’m having trouble in starting working with kombu with every simple example I find in the web. I’m with win10, python 3.6.5, rabbitmq 3.7.10, erlang 21.2, virtualenv with versions: amqp 2.4.0 kombu 4.2.2.post1 librabbitmq 2.0.0 pip 10.0.1 setuptools 39.1.0 six 1.12.0 vine 1.2.0
I’m trying the following script:
from kombu import Connection, Exchange, Queue, Producer
rabbit_url = "amqp://localhost:5672/"
conn = Connection(rabbit_url)
channel = conn.channel()
exchange = Exchange("example-exchange", type="direct")
producer = Producer(exchange=exchange, channel=channel, routing_key="BOB")
queue = Queue(name="example-queue", exchange=exchange, routing_key="BOB")
queue.maybe_bind(conn)
queue.declare()
producer.publish("Hello there!")
receiving:
(venv) C:\Projects\kombu-sample>python producer.py Traceback (most recent call last): File “producer.py”, line 17, in <module> producer.publish(“Hello there!”) File “C:\Projects\kombu-sample\venv\lib\site-packages\kombu\messaging.py”, line 181, in publish exchange_name, declare, File “C:\Projects\kombu-sample\venv\lib\site-packages\kombu\messaging.py”, line 203, in _publish mandatory=mandatory, immediate=immediate, File “C:\Projects\kombu-sample\venv\lib\site-packages\amqp\channel.py”, line 1758, in _basic_publish self.connection.drain_events(timeout=0) File “C:\Projects\kombu-sample\venv\lib\site-packages\amqp\connection.py”, line 500, in drain_events while not self.blocking_read(timeout): File “C:\Projects\kombu-sample\venv\lib\site-packages\amqp\connection.py”, line 505, in blocking_read frame = self.transport.read_frame() File “C:\Projects\kombu-sample\venv\lib\site-packages\amqp\transport.py”, line 250, in read_frame frame_header = read(7, True) File “C:\Projects\kombu-sample\venv\lib\site-packages\amqp\transport.py”, line 430, in _read s = recv(n - len(rbuf)) BlockingIOError: [WinError 10035] A non-blocking socket operation could not be completed immediately
from rabbitmq log:
2019-01-29 09:11:23.812 [warning] <0.1634.0> closing AMQP connection <0.1634.0> (127.0.0.1:51031 -> 127.0.0.1:5672, vhost: ‘/’, user: ‘guest’): client unexpectedly closed TCP connection 2019-01-29 09:11:24.557 [info] <0.1849.0> accepting AMQP connection <0.1849.0> (127.0.0.1:51156 -> 127.0.0.1:5672) 2019-01-29 09:11:24.559 [info] <0.1849.0> connection <0.1849.0> (127.0.0.1:51156 -> 127.0.0.1:5672): user ‘guest’ authenticated and granted access to vhost ‘/’
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@mrodal you need to use version < 2.4.0 of py-amqp. In 2.4.0 release was introduced change in
basic_publish()
method which seems to have problems on win10. Unfortunatelly, I don’t have PC with win10 so I cannot verify it.Im having the same issue on win10… what can I do to help solving this?