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.

Timeout when connecting a (public) Elasticsearch database

See original GitHub issue

I have a notebook that connects with an Elasticsearch database, and while it runs without issues in my laptop, when I execute it through MyBinder (link) I get timeout errors:

GET http://46.101.128.86:9200/_alias [status:N/A request:10.011s]
Traceback (most recent call last):
  File "/srv/conda/lib/python3.7/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/srv/conda/lib/python3.7/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/srv/conda/lib/python3.7/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
socket.timeout: timed out

If I test the connection through my browser, it works well, so it seems something is blocking the connection from MyBinder.

I’ve tried changing the timeout and timeout_request parameter in the Elasticsearch connection definition es=Elasticsearch(), without any change in the result.

Perhaps, it’s something I am doing wrong, so, any help would be more than welcome!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
choldgrafcommented, Apr 8, 2019

Just to clarify @betatim’s point:

  • You can control this at the level of a BinderHub deployment
  • You can’t control this at the level of a repo2docker image
1reaction
jsmanriquecommented, Apr 9, 2019

Thank you @choldgraf. I think we can close the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timeout when connecting a (public) Elasticsearch database
I have a notebook that connects with an Elasticsearch database, and while it runs without issues in my laptop, when I execute it...
Read more >
Timeouts | Elasticsearch Java API Client [master] | Elastic
Configuring requests timeouts can be done by providing an instance of RequestConfigCallback while building the RestClient through its builder.
Read more >
Connection Timeout with Elasticsearch - python - Stack Overflow
The connection timed out problem could occur if you are using Amazon Elastic Search service. es = Elasticsearch([{ ...
Read more >
Resolve "Connection refused" or "Connection timed out ...
I'm receiving "Connection refused" or "Connection timed out" errors when trying to connect to my EC2 instance with SSH.
Read more >
Connecting to an Elasticsearch cluster - Quarkus
Roughly 15 minutes. An IDE. JDK 11+ installed with JAVA_HOME configured appropriately. Apache Maven 3.8.6. Optionally the Quarkus CLI if you want to...
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