input-output-hk / jormungandr

privacy voting blockchain node
https://input-output-hk.github.io/jormungandr/
Apache License 2.0
364 stars 132 forks source link

jcli node stats - 500 error #1565

Open khkwon01 opened 4 years ago

khkwon01 commented 4 years ago

Describe the bug Hi,

After upgrading version 0.8.5, it happen to 500 error when i execute jcli like following command.

That errors only happen when node or network stats of jcli execute.

jcli rest v0 node stats get --host http://127.0.0.1:8443/api (8443 is our rest api port)

The below is result of jcli command. root@k05:~# jcli rest v0 node stats get --host http://127.0.0.1:8443/api --debug Request { method: GET, url: "http://127.0.0.1:8443/api/v0/node/stats", headers: {}, } Response { url: "http://127.0.0.1:8443/api/v0/node/stats", status: 500, headers: { "content-length": "0", "date": "Wed, 15 Jan 2020 05:22:42 GMT", }, } failed to make a REST request |-> node internal error |-> http://127.0.0.1:8443/api/v0/node/stats: Server Error: 500 Internal Server Error

Mandatory Information

  1. jcli --full-version output; jcli 0.8.5 (HEAD-3db0680, release, linux [x86_64]) - [rustc 1.40.0 (73528e339 2019-12-16)]

  2. jormungandr --full-version output; jormungandr 0.8.5 (HEAD-3db0680, release, linux [x86_64]) - [rustc 1.40.0 (73528e339 2019-12-16)]

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

I hope that it work well like 0.8.4.

Additional context Add any other context about the problem here.

cryptophonic commented 4 years ago

This is happening in 0.8.6 on Ubuntu / Linux as well. REST client stops working after node gets past bootstrapping. I would be happy to attach logs if I knew how to get to them.

cryptophonic commented 4 years ago

Using release package: jormungandr-v0.8.6-x86_64-unknown-linux-gnu.tar.gz. This is easy to duplicate - been happening for every release I've tried since 0.8.4

cryptophonic commented 4 years ago

These queries work:

$ ./jcli rest v0 node stats get --host "http://127.0.0.1:3100/api"
---
state: PreparingBlock0
version: jormungandr 0.8.6-7686397
$ ./jcli rest v0 node stats get --host "http://127.0.0.1:3100/api"
---
state: Bootstrapping
version: jormungandr 0.8.6-7686397

But then, once the node is bootstrapped:

$ ./jcli rest v0 node stats get --host "http://127.0.0.1:3100/api"
failed to make a REST request
  |-> node internal error
  |-> http://127.0.0.1:3100/api/v0/node/stats: Server Error: 500 Internal Server Error
cryptophonic commented 4 years ago

Unfortunately, with trace debugging so much info is generated was unable to track down the logs. This should be easy to duplicate however. I've not been able to query a synced node since 0.8.4 on Ubuntu.

sdalmeida commented 4 years ago

This looks to be a duplicate of #1560

khkwon01 commented 4 years ago

It is similar to #1560 but i didn't decided whether it is same reason or not so i made to ticket.

ssainball commented 4 years ago

I haven't solved this problem for about 20 days.

My friend helped me

My friend modified the node-config.yaml file as follows:

This is not a fundamental solution.

This is a workaround.

Some people tell me to use the source compile version.

But it worked. photo_2020-01-16_16-14-09

NicolasDP commented 4 years ago

It is not the same as #1560 but could be related maybe.