Heartbeat - verify tcp ports failed with timeout and socket error

I am trying to check the status of TCP ports of servers from Hearbeat client. I am getting 4 output responses in kibana, three are showing status as false and one status is true. Initially it has failed due to timeout and i have increased the timeout period and after that getting the socket time out error.

Requirement:
In the two servers, I have to verify the ports 80, 443, 8080.

My hearbeat config is below.
heartbeat.monitors:

  • type: tcp
    hosts: ["target.server1.domainl","target.server2.domain"]
    ports: [80, 443, 8080]
    schedule: '@every 1200s'
    timeout: 3000s
    output.elasticsearch:
    hosts: ["elkserver.domain:9200"]
    index: "ports-status--%{+yyyy.MM.dd}"

Error seen in kibana:
error.message : dial tcp <ip_no>:443: getsockopt: connection timed out

How to troubleshoot this issue ? any clue what is happening in the above code.

The error indicates the attempt to connect to port 443 timed out on the TCP level. That is the TCP handshake did not complete in time (no ACK on initial SYNC).

I was using the hostname and name was not resolved and able to get this working with the full name. Thanks Steffens.

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