oxen-core icon indicating copy to clipboard operation
oxen-core copied to clipboard

Sending RPC command via CLI returns `Unsuccesful -- json_rpc_request:`

Open Doy-lee opened this issue 4 years ago • 7 comments

Describe the bug Sending an RPC command via CLI returns the wrong message.

To Reproduce

./lokid status
2020-04-08 00:10:10.095    I Loki 'Valiant Vidar' (v7.1.3-894d82461)
2020-04-08 00:10:10.096 I Generating SSL certificate
Error: Unsuccessful -- json_rpc_request:
Error: Unsuccessful --
Height: 506864/506864 (100.0%), net hash 16.67 MH/s, v7.1.3(net v15), up to date, 3(out)+15(in) connections, uptime 7d 0h 51m 45s

Expected behaviour No error message emitted when successful.

Doy-lee avatar Apr 08 '20 00:04 Doy-lee

I'm affected too.

alexandrestein avatar Apr 15 '20 15:04 alexandrestein

The "unsuccessful" message is coming from looking up the SN status, but the RPC layer insists that any failure must spam with red error messages because it misuses the entire concept of exceptions. sigh

jagerman avatar Apr 15 '20 16:04 jagerman

Sorry but I'm a loki nooby. What does this means.

The RPC is working properly and I should ignore this message?

Thanks

alexandrestein avatar Apr 15 '20 16:04 alexandrestein

Yeah, it's not an error. When you run status on a service node you get output such as:

2020-04-15 16:54:03.785	I Loki 'Valiant Vidar' (v7.1.3-4f1b0786a)
2020-04-15 16:54:03.785	I Generating SSL certificate
Height: 512390/512390 (100.0%), net hash 16.99 MH/s, v7.1.3(net v15), up to date, 8(out)+13(in) connections, uptime 9d 16h 42m 23s
SN: 5cfaa1bf475ddf1fd8084c99b1abd9376e5cc4af35917e4634c739c3f8ab1514 active, proof: 28.3 minutes ago, last pings: 1.7min (storage), 4.0min (lokinet)

The error comes on regular (non-service node) lokid when it tries to fetch the service node status. It's a harmless (but annoying) error message.

jagerman avatar Apr 15 '20 16:04 jagerman

Ok thank you very much I have a better picture now.

But actuality I'm trying to set a service node :smile: So I have some troubleshooting to do where. :worried:

alexandrestein avatar Apr 15 '20 16:04 alexandrestein

Is fixed in https://github.com/loki-project/loki-core/pull/1141

Doy-lee avatar May 14 '20 07:05 Doy-lee

So is this still expected in v7.1.9? $ lokid status 2020-07-08 10:30:35.507 I Loki 'Valiant Vidar' (v7.1.9-1~ubuntu2004) 2020-07-08 10:30:35.510 I Generating SSL certificate Error: Unsuccessful -- json_rpc_request:

  • after a reboot the error went away.

zwarbo avatar Jul 08 '20 10:07 zwarbo