Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMQP 2.1.2<= fails on Bash On Windows with OperationError: [Errno 92] Protocol not available #145

Closed
eugene-s opened this issue May 14, 2017 · 5 comments · Fixed by #167
Closed

Comments

@eugene-s
Copy link

Has error in Bash on Windows.
Windows 10 Build 1703.

Versions of packages involved:

  • Python 3.6.1
  • kombu 4.0.2
  • amqp 2.1.2 and more
  • rabbitmq server 3.6.8

I had to downgrade to version 2.1.1. It works for me.

  File "/root/.virtualenvs/project/lib/python3.6/site-packages/kombu/connection.py", line 419, in _reraise_as_library_errors
    sys.exc_info()[2])
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/vine/five.py", line 175, in reraise
    raise value.with_traceback(tb)
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/kombu/connection.py", line 414, in _reraise_as_library_errors
    yield
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/kombu/connection.py", line 405, in ensure_connection
    callback)
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/kombu/utils/functional.py", line 333, in retry_over_time
    return fun(*args, **kwargs)
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/kombu/connection.py", line 261, in connect
    return self.connection
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/kombu/connection.py", line 802, in connection
    self._connection = self._establish_connection()
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/kombu/connection.py", line 757, in _establish_connection
    conn = self.transport.establish_connection()
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 130, in establish_connection
    conn.connect()
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/amqp/connection.py", line 294, in connect
    self.transport.connect()
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/amqp/transport.py", line 122, in connect
    self.socket_settings, self.read_timeout, self.write_timeout,
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/amqp/transport.py", line 174, in _init_socket
    self._set_socket_options(socket_settings)
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/amqp/transport.py", line 198, in _set_socket_options
    tcp_opts = self._get_tcp_socket_defaults(self.sock)
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/amqp/transport.py", line 194, in _get_tcp_socket_defaults
    opt: sock.getsockopt(SOL_TCP, opt) for opt in TCP_OPTS
  File "/root/.virtualenvs/project/lib/python3.6/site-packages/amqp/transport.py", line 194, in <dictcomp>
    opt: sock.getsockopt(SOL_TCP, opt) for opt in TCP_OPTS
kombu.exceptions.OperationalError: [Errno 92] Protocol not available
@chungg
Copy link
Contributor

chungg commented May 18, 2017

probably need a new release with: #136

@darkdreamingdan
Copy link
Contributor

Downgrading to 2.1.1 seems to work here too. Has #136 been integrated already? I was previously on 2.2.1 and that was causing the issue - so if #136 was merged for that there's still an issue.

@ross-urban
Copy link

I've got the same behavior, downgrading to 2.1.1 works for me as well.

@darkdreamingdan
Copy link
Contributor

So this seems to be the offending commit:

9ad4da4

@eugene-s
Copy link
Author

The issue related to unsupporting reuse socket port...

So, Bash On Windows and Windows don't support reuse port.

I started RabbitMQ. It bound 5672 port, after that I tried to start my python app and it didn't can be started, because in versions more than 2.1.1 using socket options reuse port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants