Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAnybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Hi I have made a curl to my server but get no reply . What am a missing
rpcuser=rpcusername rpcpassword=rpcpassword rpcauth=rpcusername:generatedkey daemon=1 server=1 rpcport=8332 rpcbind=0.0.0.0:8332 rpcallowip=0.0.0.0/0 listen=1 rpcconnect=0.0.0.0 prune=10000
Whats strange is that it worked on another server. Why am I bot getting any reply. Bitcoin cli commands all work well . I get no reply not even the usual "empty reply"
Ive used this
curl --digest -u rpcusername:rpcpassword -X POST \ 127.0.0.1:8332/json_rpc \ -d {\"jsonrpc\":\"2.0\",\"id\":\"0\",\"method\":\"getwalletinfo\"}" \ -H 'Content-Type:application/json'
also swapped it with the IP, still no reply.
You are trying to call the RPC interface incorrectly. Your curl -
$ curl --digest -u rpcusername:rpcpassword -X POST \ 127.0.0.1:8332/json_rpc \ -d "{\"jsonrpc\":\"2.0\",\"id\":\"0\",\"method\":\"getwalletinfo\"}" \ -H 'Content-Type:application/json'
has an incorrect path 127.0.0.1:8332/json_rpc
you are posting to. You should create your curl request with the following path - 127.0.0.1:8332/
.
Working example, printing verbosely with -v
$ curl -v --digest -u rpcusername:rpcpassword -X POST \ 127.0.0.1:8332/ \ -d "{\"jsonrpc\":\"2.0\",\"id\":\"0\",\"method\":\"getwalletinfo\"}" \ -H 'Content-Type:application/json'
@GildedHonour Authentication is not optional. Configuring it yourself is optional, but bitcoind never accepts RPC connections without explicitly or implicitly configured username/password.
https://github.com/bitcoin/bitcoin/issues/10218
Edit your bitcoind.conf
, add RPC auth and it'll work.
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments