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.

500 [Errno 111] Connection refused

See original GitHub issue

Hi!

I’ve been trying to make the project run in a Docker container. After some tuning, which you can see here on my fork (note that I also put I18N=False in the settings.py so it doesn’t try to use the translation part your fix was for), I’ve been able to make the project run, apparently correctly, I was able to go in the admin, add/remove users, etc. But when I post a statement, I got a 500 with for only content: [Errno 111] Connection refused.

So I looked into you issues, you were saying that it should be run with uwsgi and nginx and that might be the reason why. So I did it and ended up with the same issue.

Here is the stack for this error.

2016-01-29 04:47:38,813 [INFO] lrs.views:
Exception while processing: /xAPI/statements
2016-01-29 04:47:38,814 [ERROR] lrs.views: [Errno 111] Connection refused
Traceback (most recent call last):
  File "./lrs/views.py", line 209, in handle_request
    return processors[path][req_dict['method']](req_dict)
  File "./lrs/utils/req_process.py", line 127, in statements_post
    check_activity_metadata.delay(stmt_ids)
  File "/workspace/env/lib/python2.7/site-packages/celery/app/task.py", line 453, in delay
    return self.apply_async(args, kwargs)
  File "/workspace/env/lib/python2.7/site-packages/celery/app/task.py", line 559, in apply_async
    **dict(self._get_exec_options(), **options)
  File "/workspace/env/lib/python2.7/site-packages/celery/app/base.py", line 353, in send_task
    reply_to=reply_to or self.oid, **options
  File "/workspace/env/lib/python2.7/site-packages/celery/app/amqp.py", line 305, in publish_task
    **kwargs
  File "/workspace/env/lib/python2.7/site-packages/kombu/messaging.py", line 172, in publish
    routing_key, mandatory, immediate, exchange, declare)
  File "/workspace/env/lib/python2.7/site-packages/kombu/connection.py", line 457, in _ensured
    interval_max)
  File "/workspace/env/lib/python2.7/site-packages/kombu/connection.py", line 369, in ensure_connection
    interval_start, interval_step, interval_max, callback)
  File "/workspace/env/lib/python2.7/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time
    return fun(*args, **kwargs)
  File "/workspace/env/lib/python2.7/site-packages/kombu/connection.py", line 237, in connect
    return self.connection
  File "/workspace/env/lib/python2.7/site-packages/kombu/connection.py", line 741, in connection
    self._connection = self._establish_connection()
  File "/workspace/env/lib/python2.7/site-packages/kombu/connection.py", line 696, in _establish_connection
    conn = self.transport.establish_connection()
  File "/workspace/env/lib/python2.7/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
    conn = self.Connection(**opts)
  File "/workspace/env/lib/python2.7/site-packages/amqp/connection.py", line 165, in __init__
    self.transport = self.Transport(host, connect_timeout, ssl)
  File "/workspace/env/lib/python2.7/site-packages/amqp/connection.py", line 186, in Transport
    return create_transport(host, connect_timeout, ssl)
  File "/workspace/env/lib/python2.7/site-packages/amqp/transport.py", line 299, in create_transport
    return TCPTransport(host, connect_timeout)
  File "/workspace/env/lib/python2.7/site-packages/amqp/transport.py", line 95, in __init__
    raise socket.error(last_err)
error: [Errno 111] Connection refused

Do you have any tip? I tried to spin up a droplet on Digital Ocean and had the same issue with just python ./manage.py run server. I could try spin up a new one, install everything required again and see if I get the 500 again, but you might have an idea about what is going on.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
evermaxcommented, Jan 29, 2016

Thank you, it is much clearer indeed! I’ll keep toying with it and when I have a clean Docker image, I’ll let you know in case you want to have a look at it.

Thanks again for solving my problem so quickly!

0reactions
DaTebecommented, Jun 6, 2016

@evermax

Hi I’m using the dirichlet/lrs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python socket.error: [Errno 111] Connection refused
The correct solution would be to make sure the server has opened the connection. This would require server sending you some message back...
Read more >
Why do I see ''Error 500'' when attempting to login to the ...
Solution: If you see the below error when attempting to login to the Columbus via the Web UI then check to make sure...
Read more >
Box - [Errno 111] Connection refused
We use python script in order to download / upload files from box. Sometimes, recently very often there is an error and files...
Read more >
(111: Connection refused) while connecting to upstream
It looks like it was Fail2ban adding my server IP that caused this issue for me. I tried the steps in this article...
Read more >
Failed to establish a new connection: Errno 111 Connection ...
setup-mnode script on mNode failing with error: Failed to establish a new connection: Errno 111 Connection refused.
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