Storagenode dashboard API. curl: (52) Empty reply from server

The mentioned error is not a problem, but your node should have gotten some traffic.

It’s likely that your node has been paused for some reason. There is now an API you can use to check your reputation.

If the score for audits is below 0.6 your node has been paused on that satellite. You can contact support@storj.io with an explanation of your situation, your node ID and your run command to ask for help if that is the case. But before you do, try to figure out why your node may have been paused. Have you lost data? Have you been offline for long periods of time? If you do contact support include anything that may be relevant.

Hi BrightSilence,
Thanks for your reply, please check if this command below is correct or complete

curl -s 127.0.0.1:14002/api/dashboard | jq .data.satellites [ "12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S", "118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW", "121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6", "12L9ZFwhzV…

I have added docker port mapping command and run “curl 127.0.0.1:14002/api/dashboard”, and ended up with “curl: (52) Empty reply from server”.

Below is command insider docker exec to prove port 14002 is enabled,

/app # ps aux
PID   USER     TIME   COMMAND
    1 root       3:55 ./storagenode run --config-dir config --identity-dir identity --metrics.app-suffix=-alpha --metrics.interval=30m --kademlia.external-address=61.172.47.198:4511 --kademlia.operator.email=larry.*****@******.com --kademlia.operator.wallet=0x537eB99Acda7E8************* --console.address=:14002 --storage.allocated-bandwidth=20TB --storage.allocated-disk-space=6TB
   25 root       0:00 /bin/sh
   35 root       0:00 ps aux

Any idea, I am using arm docker image.

Best Regards
Larry Zheng

The issue is clarified in an offline support email, thanks.

1 Like

Hi BrightSilence,

Just for your info that your ARM docker release seems missing dashboard API info.

cc@cc_0394:~$ curl 127.0.0.1:14002/api/satellite/118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW
curl: (52) Empty reply from server
cc@cc_0394:~$
cc@cc_0394:~$ curl 127.0.0.1:14002/api/dashboard
curl: (52) Empty reply from server

I did apple to apple comparison by setting up another AMD64 build, which output correct node info via dashboard API.

Regards
Larry

The API is available starting v0.19.0
What is your version of storagenode?

docker exec -it storagenode ./storagenode version

And your port bindings:

docker inspect storagenode -f "{{.HostConfig.PortBindings}}"

Should be v0.19.0 yesterday, now auto upgrade is working and upgraded to v0.20.1.

cc@cc_0394:~$ sudo docker exec -it storagenode ./storagenode version
Release build
Version: v0.20.1
Build timestamp: 04 Sep 19 22:45 UTC
Git commit: 014f3e14c938c07ac5bd88e1511eb7f879c5f9f8
cc@cc_0394:~$
cc@cc_0394:~$ sudo docker inspect storagenode -f "{{.HostConfig.PortBindings}}"
map[14002/tcp:[{127.0.0.1 14002}] 28967/tcp:[{ 4511}]]

Storage Node Dashboard ( Node Version: v0.20.1 )

======================

ID 1SGMGT9KoQ9Pv9NZh3Ad1FZfMcrv9FYVvtpw9QhHHnm2S2u6BB
Last Contact 0s ago
Uptime 14h37m50s

               Available        Used     Egress     Ingress
 Bandwidth       20.0 TB     20.3 MB        0 B     20.3 MB (since Sep 1)
      Disk        6.0 TB         0 B

Bootstrap bootstrap.storj.io:8888
Internal 127.0.0.1:7778
External 61.172.47.198:4511 (#I have static public IP address)

Neighborhood Size 239

Have you tried with any ARM release (AMD64 is fine)?

yes.
Please, try to add this configuration option to your config.yaml file:

That should no longer be necessary, the port is now specified without local host limitation in the entrypoint for the docker container.

Still an issue on ARM version (see below, no problem with AMD64 image upon same config/set-up)

cc@cc_0394:~$ wget -qO - http://localhost:14002/api/dashboard
cc@cc_0394:~$ uname -i
aarch64
cc@cc_0394:~$  sudo docker exec storagenode wget -qO - http://127.0.0.1:14002/api/dashboard
{"data":{"nodeID":"1SGMGT9KoQ9Pv9NZh3Ad1FZfMcrv9FYVvtpw9QhHHnm2S2u6BB","wallet":"0x537eB99Acda7E8eADeaD8C×××××××××××××××××××","satellites":["12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S","118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW","121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6","12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs"],"diskSpace":{"used":0,"available":6000},"bandwidth":{"egress":{"repair":0,"audit":0,"usage":0},"ingress":{"repair":0,"usage":20340736},"used":0.020340736,"available":20000},"version":{"major":0,"minor":20,"patch":1},"upToDate":true},"error":""}

arm vs x86

cc@cc_0394:~$ uname -i
aarch64
cc@cc_0394:~$ sudo docker exec storagenode wget -qO - http://127.0.0.1:14002/api/satellite/12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S
wget: server returned error: HTTP/1.1 500 Internal Server Error
cc@CC01:~$ uname -i
x86_64
cc@CC01:~$ sudo docker exec storagenode wget -qO - http://127.0.0.1:14002/api/satellite/12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S
{"data":{"id":"12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S","storageDaily":[{"atRestTotal":0.04102730555071806,"timestamp":"2019-09                                -02T00:00:00Z"},{"atRestTotal":660.1104377255737,"timestamp":"2019-09-03T00:00:00Z"},{"atRestTotal":-660.0093395266643,"timestamp":"2019-09                                -04T00:00:00Z"},{"atRestTotal":3166771.2040506997,"timestamp":"2019-09-02T00:00:00Z"},{"atRestTotal":415997304.79151917,"timestamp":"2019-0                                9-03T00:00:00Z"},{"atRestTotal":-399145534.7627385,"timestamp":"2019-09-04T00:00:00Z"},{"atRestTotal":0.1283941070238749,"timestamp":"2019-                                09-02T00:00:00Z"},{"atRestTotal":22093.428566478193,"timestamp":"2019-09-03T00:00:00Z"},{"atRestTotal":-22093.340762976557,"timestamp":"201                                9-09-04T00:00:00Z"},{"atRestTotal":47273.37724399567,"timestamp":"2019-09-02T00:00:00Z"},{"atRestTotal":-50384078.28805479,"timestamp":"201                                9-09-03T00:00:00Z"},{"atRestTotal":50204875.55122789,"timestamp":"2019-09-04T00:00:00Z"}],"bandwidthDaily":null,"audit":{"totalCount":3,"su                                ccessCount":1,"alpha":1.7598749999999996,"beta":1.95,"score":0.4743758212877792},"uptime":{"totalCount":1352,"successCount":1329,"alpha":99                                .87798492492988,"beta":0.121892045594785,"score":0.9987810780444188}},"error":""}
1 Like
sudo docker exec -it storagenode wget -qO - http://127.0.0.1:14002/api/dashboard

On my Pi3

pi@raspberrypi:~ $ docker exec -it storagenode wget -qO - http://127.0.0.1:14002/api/dashboard
{"data":{"nodeID":"****","wallet":"***","satellites":["12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S","118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW","121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6","12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs"],"diskSpace":{"used":861.15733632,"available":2000},"bandwidth":{"egress":{"repair":0,"audit":1028096,"usage":19541045504},"ingress":{"repair":0,"usage":2301754112},"used":21.843827712,"available":100000},"version":{"major":0,"minor":20,"patch":1},"upToDate":true},"error":""}

Sorry for the dump question but did you add the -p 127.0.0.1:14002:14002 to you docker run command? Missing that is the only way you can make it fail.

1 Like

You shouldn’t need to expose that port since the wget command is running within the container itself.

Alternatively, if you don’t expose the port, you should be able to hit the API from the docker host using the internal docker IP (172.17.0.something unless you’ve tweaked that).

1 Like

Exactly the same configuration (incl port 14002 mapping) on x86 and ARM

On x86 build, everything works fine, not matter docker inside or outside
On ARM build, docker outside not working, docker inside

  1. Works fine : “sudo docker exec storagenode wget -qO - http://127.0.0.1:14002/api/dashboard
  2. Not working: “sudo docker exec storagenode wget -qO - http://127.0.0.1:14002/api/satellite/12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S
1 Like

FYI; This is weird; I’ve just set up two storage nodes; running on almost exactly the same software (Ubuntu 18.04.3 + docker-ce 19.03.1 - pulled same image, has same hash, with -p 127.0.0.1:14002:14002, made identity same way (except for auth token ofcourse) - and on one, my script (same on both) works and can poll api/satellite outside docker, and on the other, it fails, until I comment out the
# console.address: 127.0.0.1:14002
line - or else it throws a HTP500 internal server error from outside the container (not within).
Absolutely weird, as I’ve done pretty much exactly the same on both nodes…

Not weird. That line limits it to local Host inside the container. You shouldn’t add this line to the config.yaml. it defaults to :14002 in the current docker image which will work just fine.

You are absolutely correct; what I was wondering was why the same config yields different behavior on identical setups. One works, the other does not - until the config was changed. Same platform, same everything (to the best of my knowledge). :slight_smile:

If I remember correctly that setting is passed through the entrypoint in the docker container. I believe that SHOULD overwrite the config.yaml settings. But not entirely sure. Make sure you have the latest :beta tag version of the image on both nodes.