Prod instance: Comms failing from remote and on-site- Error invoking remote method 'send-http-request': Error: connect ETIMEDOUT

Hi all,

I wanted to reach out to see if anyone could help me with the following error I am getting while attempting to establish connection to Elastic PROD DB server.

Error invoking remote method 'send-http-request': Error: connect ETIMEDOUT

Comms failing from remote and on-site

Hello @harryDHL

The ETIMEDOUT error means your connection request to the Elastic server is timing out. To diagnose this, let's try these two commands:

  1. Ping the server: ping <server_ip_or_hostname>
  2. Check the database port (usually 9200): telnet <server_ip_or_hostname> 9200

The results will tell us if the server is offline entirely or if just the database port is blocked.

Regards,
Gabriel

Hi Gabriel,

Thank you for your assistance.

  1. Pinging server was successful
  2. Checking DB Port was unsuccessful

Checking DB Port Error
The underlying connection was closed: An unexpected error occurred on a send.

Harry,

Hi Harry,

Thanks for running those tests. That's very helpful information!

Your results confirm that the server is online and your machine can reach it, but the connection to the Elasticsearch port (9200) is being blocked or refused. This tells us the problem is likely on the server itself, either with the Elasticsearch service or a firewall.

Let's check a few things directly on the server. You may need to ask your system administrator for help with these commands.


1. Is Elasticsearch Running?

First, let's verify that the Elasticsearch service is active.

On most modern Linux systems, you can use this command:

sudo systemctl status elasticsearch

Look for a line that says Active: active (running).


2. Is It Listening on the Correct Port and IP?

If the service is running, let's see exactly what network address and port it's using. The service might be running but only listening for connections from localhost (the server itself).

Use this command to see what's listening on port 9200:

sudo netstat -tulpn | grep 9200

  • Good Output: You want to see 0.0.0.0:9200 or <server_ip>:9200. This means it's listening on all network interfaces or the correct public one.
  • Problem Output: If you see 127.0.0.1:9200 or localhost:9200, it means Elasticsearch is only accepting connections from the server itself. This is a common setting in the elasticsearch.yml configuration file (network.host).

3. Could a Firewall Be Blocking the Port?

If Elasticsearch is running and listening on the correct IP address, the final suspect is a firewall on the server. Here are commands to check the most common firewalls:

  • For firewalld (CentOS/RHEL):
    sudo firewall-cmd --list-all
    Check if port 9200/tcp is listed under ports.
  • For UFW (Ubuntu/Debian):
    sudo ufw status
    Check the list of rules to see if port 9200 is allowed.

Based on the output of these checks, we should be able to pinpoint the exact cause. Let me know what you find.

Regards,

Gabriel

Welcome to the forum @harryDHL

In addition to Qsfrom @gabriel.landau , tell us please a little about the Elasticsearch server, what do you know about it? Did you or your team set it up? Are you responsible for it? Is it a cluster, or a single instance? Is it within your own "LAN", or a virtual equivalent, or "somewhere else"? Are you within some kind of corporate IT environment, the sort of place where network connectivity requires firewalls/access-lists/similar to be updated and managed by network/security/... teams? You mention 'PROD", is that to distinguish between that specific service and (eg) other TEST, DEV, Staging/Integration/ProProd/... services, and if so, does that connectivity work?

If you don't have some sort of access (access meant in widest sense) it will be very difficult for us, not knowing your environment, to establish why you cannot connect.

Hi @RainTown and @gabriel.landau ,

Thank you for your help and support. Please note, I have come to find out that the root cause of this connectivity issue is due to our corporate firewall settings. In order to access Elastic DB via the port, we will need to complete work with our network and security team.

Again, thank you for the helpful info provided. I will mark this one as resolved. Resolution being firewall settings need to be updated.

Noting that both @gabriel.landau and @RainTown together were able to provide the solution.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.