bitcoin-cli: Make error message less confusing#9265
Merged
maflcko merged 1 commit intobitcoin:masterfrom Dec 2, 2016
Merged
Conversation
Sorry for the churn on this, but the current message (introduced in bitcoin#9073) isn't acceptable: $ src/bitcoin-cli getinfo rpc: couldn't connect to server (make sure server is running and you are connecting to the correct RPC port: -1 unknown) Putting the error code after the words "RPC port" made me wonder whether there was a port configuration issue. This changes it to: $ src/bitcoin-cli getinfo error: couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port)
Contributor
|
Somehow, I'd expect to see the string "Connection refused" somewhere in the output, but this makes it a bit clearer, yes: ACK fe37fbe |
Member
Author
|
I'm not aware of any way of getting the underlying error OS error code from
libevent. The one shown is libevent http error and every network layer
error will basically get -1. But feel free to suggest a way.
The other alternative would be to revert #9073 and leave it at that.
|
Contributor
|
This prints the message I want to see: |
Member
Author
|
But that's cheating - you have no idea at that point whether the underlying error was really "connection refused". It could just as well be some other network-layer error. Printing a potentially false error would be worse for troubleshooting than not doing anything. |
Member
|
utACK fe37fbe |
Contributor
|
@laanwj Right. libevent hides the exact issue from us. |
Contributor
|
utACK fe37fbe |
maflcko
pushed a commit
that referenced
this pull request
Dec 2, 2016
fe37fbe bitcoin-cli: Make error message less confusing (Wladimir J. van der Laan)
|
Bonjour |
zkbot
added a commit
to zcash/zcash
that referenced
this pull request
Mar 22, 2017
libevent-based http server Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5677 - bitcoin/bitcoin#6695 - bitcoin/bitcoin#6899 - bitcoin/bitcoin#7016 - bitcoin/bitcoin#7964 - bitcoin/bitcoin#8722 - bitcoin/bitcoin#8730 - bitcoin/bitcoin#9073 - bitcoin/bitcoin#9265 - bitcoin/bitcoin#9387 - bitcoin/bitcoin#9471 - bitcoin/bitcoin#9647 - bitcoin/bitcoin#9903 Closes #1593 and #1856.
zkbot
added a commit
to zcash/zcash
that referenced
this pull request
Mar 25, 2017
libevent-based http server Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5677 - bitcoin/bitcoin#6695 - bitcoin/bitcoin#6899 - bitcoin/bitcoin#7016 - bitcoin/bitcoin#7964 - bitcoin/bitcoin#8722 - bitcoin/bitcoin#8730 - bitcoin/bitcoin#9073 - bitcoin/bitcoin#9265 - bitcoin/bitcoin#9387 - bitcoin/bitcoin#9471 - bitcoin/bitcoin#9647 - bitcoin/bitcoin#9903 - bitcoin/bitcoin#6640 - bitcoin/bitcoin#8139 - bitcoin/bitcoin#8839 Closes #1593 and #1856.
codablock
pushed a commit
to codablock/dash
that referenced
this pull request
Jan 17, 2018
fe37fbe bitcoin-cli: Make error message less confusing (Wladimir J. van der Laan)
andvgal
pushed a commit
to energicryptocurrency/gen2-energi
that referenced
this pull request
Jan 6, 2019
fe37fbe bitcoin-cli: Make error message less confusing (Wladimir J. van der Laan)
CryptoCentric
pushed a commit
to absolute-community/absolute
that referenced
this pull request
Feb 25, 2019
fe37fbe bitcoin-cli: Make error message less confusing (Wladimir J. van der Laan)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sorry for the churn on this, but the current message (introduced in #9073) isn't acceptable:
Putting the error code after the words "RPC port" made me wonder whether there was a port configuration issue.
This changes it to: