{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/WSL/issues/3376","repository_url":"https://api.github.com/repos/Microsoft/WSL","labels_url":"https://api.github.com/repos/Microsoft/WSL/issues/3376/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/WSL/issues/3376/comments","events_url":"https://api.github.com/repos/Microsoft/WSL/issues/3376/events","html_url":"https://github.com/Microsoft/WSL/issues/3376","id":340707040,"node_id":"MDU6SXNzdWUzNDA3MDcwNDA=","number":3376,"title":"Socket closed on rabbitmq-server","user":{"login":"JetUni","id":1317221,"node_id":"MDQ6VXNlcjEzMTcyMjE=","avatar_url":"https://avatars0.githubusercontent.com/u/1317221?v=4","gravatar_id":"","url":"https://api.github.com/users/JetUni","html_url":"https://github.com/JetUni","followers_url":"https://api.github.com/users/JetUni/followers","following_url":"https://api.github.com/users/JetUni/following{/other_user}","gists_url":"https://api.github.com/users/JetUni/gists{/gist_id}","starred_url":"https://api.github.com/users/JetUni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JetUni/subscriptions","organizations_url":"https://api.github.com/users/JetUni/orgs","repos_url":"https://api.github.com/users/JetUni/repos","events_url":"https://api.github.com/users/JetUni/events{/privacy}","received_events_url":"https://api.github.com/users/JetUni/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-12T16:17:28Z","updated_at":"2018-09-29T17:37:12Z","closed_at":"2018-07-12T18:46:25Z","author_association":"NONE","body":"* Your Windows build number:  `Microsoft Windows [Version 10.0.17134.165]`\r\n\r\n* What you're doing and what's happening: Running the website and clicking on a link that sends a task via Python celery to `rabbitmq-server`. This results in the following error\r\n\r\n```\r\nERROR:django.request:Internal Server Error: /claim/i/3955345/\r\nTraceback (most recent call last):\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py\", line 41, in inner\r\n    response = get_response(request)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/django/core/handlers/base.py\", line 249, in _legacy_get_response\r\n    response = self._get_response(request)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/django/core/handlers/base.py\", line 187, in _get_response\r\n    response = self.process_exception_by_middleware(e, request)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/django/core/handlers/base.py\", line 185, in _get_response\r\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n  File \"/home/jet/sites/str-prod/tracking/views.py\", line 1915, in buyitem\r\n    form.instance.send_buy_email(request)\r\n  File \"/home/jet/sites/str-prod/tracking/models.py\", line 2330, in send_buy_email\r\n    html_message=html_msg)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/celery/app/task.py\", line 453, in delay\r\n    return self.apply_async(args, kwargs)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/celery/app/task.py\", line 565, in apply_async\r\n    **dict(self._get_exec_options(), **options)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/celery/app/base.py\", line 354, in send_task\r\n    reply_to=reply_to or self.oid, **options\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/celery/app/amqp.py\", line 310, in publish_task\r\n    **kwargs\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/kombu/messaging.py\", line 172, in publish\r\n    routing_key, mandatory, immediate, exchange, declare)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/kombu/connection.py\", line 457, in _ensured\r\n    interval_max)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/kombu/connection.py\", line 369, in ensure_connection\r\n    interval_start, interval_step, interval_max, callback)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/kombu/utils/__init__.py\", line 246, in retry_over_time\r\n    return fun(*args, **kwargs)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/kombu/connection.py\", line 237, in connect\r\n    return self.connection\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/kombu/connection.py\", line 742, in connection\r\n    self._connection = self._establish_connection()\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/kombu/connection.py\", line 697, in _establish_connection\r\n    conn = self.transport.establish_connection()\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/kombu/transport/pyamqp.py\", line 116, in establish_connection\r\n    conn = self.Connection(**opts)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/amqp/connection.py\", line 180, in __init__\r\n    (10, 30),  # tune\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/amqp/abstract_channel.py\", line 67, in wait\r\n    self.channel_id, allowed_methods, timeout)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/amqp/connection.py\", line 241, in _wait_method\r\n    channel, method_sig, args, content = read_timeout(timeout)\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/amqp/connection.py\", line 330, in read_timeout\r\n    return self.method_reader.read_method()\r\n  File \"/home/jet/sites/str-prod/env/local/lib/python2.7/site-packages/amqp/method_framing.py\", line 189, in read_method\r\n    raise m\r\nIOError: Socket closed\r\n```\r\n\r\n* What's wrong / what should be happening instead: Our website is coded in Python and uses celery to send tasks to `rabbitmq-server`. On a regular linux server running Ubuntu 16.04, no configuration is needed and the website works as soon as `rabbitmq-server` is installed. I expect that the same should happen when I install `rabbitmq-server` on WSL.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/WSL/issues/comments/425662526","html_url":"https://github.com/Microsoft/WSL/issues/3376#issuecomment-425662526","issue_url":"https://api.github.com/repos/Microsoft/WSL/issues/3376","id":425662526,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTY2MjUyNg==","user":{"login":"stratoukos","id":816959,"node_id":"MDQ6VXNlcjgxNjk1OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/816959?v=4","gravatar_id":"","url":"https://api.github.com/users/stratoukos","html_url":"https://github.com/stratoukos","followers_url":"https://api.github.com/users/stratoukos/followers","following_url":"https://api.github.com/users/stratoukos/following{/other_user}","gists_url":"https://api.github.com/users/stratoukos/gists{/gist_id}","starred_url":"https://api.github.com/users/stratoukos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stratoukos/subscriptions","organizations_url":"https://api.github.com/users/stratoukos/orgs","repos_url":"https://api.github.com/users/stratoukos/repos","events_url":"https://api.github.com/users/stratoukos/events{/privacy}","received_events_url":"https://api.github.com/users/stratoukos/received_events","type":"User","site_admin":false},"created_at":"2018-09-29T17:37:12Z","updated_at":"2018-09-29T17:37:12Z","author_association":"NONE","body":"This is still happening and seems to be an issue with RabbitMQ rather than with celery and the rest of the python stack.\r\n\r\nA smaller test case is:\r\n\r\n-  install and run rabbitmq (on debian `apt install rabbitmq-server; /etc/init.d/rabbtimq-server start`)\r\n-  connect with netcat (`nc localhost 5672`)\r\n\r\nIn WSL the connection is closed immediately instead of waiting for input.\r\n\r\nStrace is extremely noisy, since you're basically stracing the Erlang VM."}}
{"actor":{"display_login":"stratoukos"}}