question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting BlockingIOError for every simple producing

See original GitHub issue

Hi, 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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
matusvalocommented, Jun 12, 2019

@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.

0reactions
mrodalcommented, Mar 24, 2019

Im having the same issue on win10… what can I do to help solving this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

BlockingIOError when testing the nameko basic example
When trying the very basic example about the python framework nameko, I get an error like this one : BlockingIOError: [WinError 10035] A ......
Read more >
Understanding Non Blocking I/O with Python — Part 1 - Medium
If a function is doing some task which is making the CPU work, then it is blocking the function from returning. Similarly, if...
Read more >
BlockingIOError when making request in javascript subprocess
Hi, I am trying to use an npm library that also needs to make some api calls, so I need to be able...
Read more >
PEP 522 – Allow BlockingIOError in security sensitive APIs
This means any further discussion of appropriate default behaviour for os.urandom() in system Python installations in Linux distributions ...
Read more >
15.2. io — Core tools for working with streams — Python 2.7.2 ...
Extending IOBase is RawIOBase which deals simply with the reading and writing of raw bytes to a ... when the buffer gets too...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found