Curl --http1 -sX localhost:8088/clusterStatus api is not showing all connected nodes in the ksqldb cluster

I have configured ksqldb cluster which has 2 nodes. when I use
localhost:8088/info API ; both show the same cluster-id but when I use localhost:8088/clusterStatus API it shows only that localhost where I am running this API.

Ideally, it should show all connected ksqldb nodes.

ideal response:
Highly Available, Fault-Tolerant Pull Queries in ksqlDB (confluent.io)


You can easily check the status of servers in the cluster as well as their end and current offsets per partition by issuing:

curl -sX GET "$KSQL_ENDPOINT/clusterStatus"
For our running example, this would return the following excerpt:

{
  "clusterStatus": {
      "B:8088": { 1
          "hostAlive": false,
          "lastStatusUpdateMs": 1585257664632,
          "activeStandbyPerQuery": {},
          "hostStoreLags": {}
      },
      "C:8088": { 2
          "hostAlive": true,
          "lastStatusUpdateMs": 1585257664632,
          "activeStandbyPerQuery": {
            "CTAS_ORDERS": {          
              "activePartitions": ["topic": "<changelog_topic_name>",  "partition": 0 ],
              "standByPartitions": ["topic": "<changelog_topic_name>", "partition": 2]
            },
          },
          "stateStoreLags": {
              "lagByPartition": {
                  "0": {"currentOffsetPosition": 123000,"endOffsetPosition": 123000, "offsetLag": 0},
                  "2": {"currentOffsetPosition": 100000, "endOffsetPosition": 107000,"offsetLag": 7000}
              },
              "updateTimeMs": 1585257660931      
          }
      }
  } 
}

1Server B is dead.
2Server C is the active for partition 0 and standby for partition 2, which is 7,000 offsets behind.

I have attached a screenshot of my configuration and the response I am getting.
Thanks

Do you have at least one persistent query running in your cluster? I think heartbearting (ksql.heartbeat.enable=true) between nodes only begins after at least one persistent query has been started, and this is needed in order for /clusterStatus to return the full state of the cluster.

2 Likes

ok @mikebin thank you

This topic was automatically closed after 30 days. New replies are no longer allowed.