Skip to content

[Bug] /v3/health always fails with HTTP 500 #6318

@jcnelson

Description

@jcnelson

Describe the bug
All attempts to query /v3/health fail with HTTP 500 and the message Couldn't obtain stats on any bootstrap peers, unable to determine health.

Steps To Reproduce

$ curl http://localhost:20443/v3/health
Couldn't obtain stats on any bootstrap peers, unable to determine health.$

Expected behavior
I expect the health JSON to be returned with HTTP 200

Environment (please complete the following information):

  • OS: Alpine Linux 3.21
  • Rust version: 1.88
  • Version of the appropriate binary / software package: 3.1.0.0.13 (release/3.1.0.0.13)

Additional context
I have verified that my node is connected to at least three of the bootstrap peers configured.

$ for host in $(cat mainnet.toml | grep -E '^bootstrap_node' | tr -d ' "' | sed -r 's/^bootstrap_node=//g' | sed -r 's/[0-9a-f]+@([^:]+):([0-9]+)/\1/g' | tr ',' ' '); do drill "$host" | grep -E "^${host}" | awk '{print $5}' | tee -a /tmp/seed-nodes.txt; done
34.150.184.50
3.122.176.89
52.77.118.154
54.91.222.127
$ for ip in $(cat /tmp/seed-nodes.txt); do curl -sL http://localhost:20443/v2/neighbors | jq '.outbound[].ip' | grep "$ip"; done
"34.150.184.50"
"3.122.176.89"
"52.77.118.154"

It is possible that my node has never instantiated an unconfirmed tenure downloader to these nodes, which would lead to NakamotoDownloadStateMachine::get_max_stacks_height_of_neighbors() evaluating to None. There should be a fallback behavior, since my node has 46 outbound peers and is definitely fetching unconfirmed block data.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Status: 💻 In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions