1

Here's my bitcoin.conf:

server=1
rpcallowip=127.0.0.1
rpcuser=userrunningbitcoind
rpcpassword=passwordofuserrunningbitcoind
rpcport=7788
walletnotify=/home/userrunningbitcoind/transaction.sh %s

And here's my transaction.sh, which I've tried running manually already. This works without issue on its own:

#!/bin/sh
curl -d "txid=$1" http://127.0.0.1/api/process-payment

What else can I try to get walletnotify going?

EDIT:

I've additionally found this in my debug.log:

2018-01-19 05:49:22 Binding RPC on address 0.0.0.0 port 7788 failed.
2018-01-19 05:49:22 No rpcpassword set - using random cookie authentication
2018-01-19 05:49:22 Generated RPC authentication cookie /home/userrunningbitcoind/.bitcoin/.cookie
Fibericon
  • 83
  • 7

2 Answers2

0

Problem is here:

2018-01-19 05:49:22 Binding RPC on address 0.0.0.0 port 7788 failed.

if you are using rpcallowip, you need to also use rpcbind. By default, the recent BTC versions are limited to 127.0.0.1 so there's no need to use rpcallowip or rpcbind if your BitcoinD and your app are running on same server.

So either you remove rpcallowip from config, or add rpcbind=0.0.0.0 and then restart bitcoind. Also, everytime you restart bitcoind, you need to load the wallet, as default loading of wallet is removed. So if wallet is not loaded, walletnotify will not work.

0

Remember to restart bitcoind again after you make any change in bitcoin.conf file. It seems as if you set an rpcpassword in the conf but didnt restart the bitcoind service. You have everything set up properly i guess.

Edge
  • 101