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.

Hello,

I’m receiving the following error when trying to use the example code:

elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x10896f290>: Failed to establish a new connection: [Errno 61] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x10896f290>: Failed to establish a new connection: [Errno 61] Connection refused)

I’ve verified that the elasticsearch server is running and that I’m able to use it via cURL / browser. For example, cURLing, I get the following response:

{
  "name" : "LONG STRING",
  "cluster_name" : "CHANGED CLUSTER NAME",
  "cluster_uuid" : "CHANGED UUID",
  "version" : {
    "number" : "5.1.1",
    "build_hash" : "5395e21",
    "build_date" : "2016-12-06T12:36:15.409Z",
    "build_snapshot" : false,
    "lucene_version" : "6.3.0"
  },
  "tagline" : "You Know, for Search"
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
honzakralcommented, Jun 6, 2017

In that case the problem is that curl defaults to port 80 while Elasticsearch to port 9200, you need to specify the port by using our.es.server.name:9200

2reactions
VenkateshShanbhagcommented, Aug 20, 2020

@HonzaKral That is not the solution. “our.es.server.name” must be listening to 9200 instead of 80. or else the curl -XGET ‘our.es.server.name’ would not have returned “tagline” : “You Know, for Search”. assigning port in front of domain name will not fix the issue.

The firewall is blocking the domain access. The alternative would be port forwarding.

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python requests - Exception Type: ConnectionError - try
ConnectionError is also the name of a built-in error type - how can this be a widely used package when they have such...
Read more >
Built-in Exceptions — Python 3.11.1 documentation
A subclass of ConnectionError , raised when a connection attempt is refused by the peer. Corresponds to errno ECONNREFUSED . exception ConnectionResetError ...
Read more >
How to use the requests.exceptions.ConnectionError function ...
ConnectionError function in requests. To help you get started, we've selected a few requests examples, based on popular ways it is used in...
Read more >
Python requests.exceptions.ConnectionError() Examples
This page shows Python examples of requests.exceptions.ConnectionError.
Read more >
ConnectionError in diesel::result - Rust
Enum diesel::result::ConnectionError. Copy item import [−][src]. pub enum ConnectionError { InvalidCString(NulError) ...
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