I'm using p2pool for mining ltc. Recently I've updated my litecoind from 0.13.2.1 to 0.14.2.
P2pool stopped working
2017-08-07 04:50:43.301253 p2pool (version be60643-dirty)
2017-08-07 04:50:43.301327
2017-08-07 04:50:43.301375 Testing bitcoind RPC connection to 'http://127.0.0.1:10332/' with username 'xxxx'...
2017-08-07 04:50:43.305924 > Check failed! Make sure that you're connected to the right bitcoind with --bitcoind-rpc-port!
2017-08-07 04:50:44.309457 > Check failed! Make sure that you're connected to the right bitcoind with --bitcoind-rpc-port!
2017-08-07 04:50:45.313170 > Check failed! Make sure that you're connected to the right bitcoind with --bitcoind-rpc-port!
2017-08-07 04:50:46.317414 > Check failed! Make sure that you're connected to the right bitcoind with --bitcoind-rpc-port!
snake@onion:~/projects/p2pool⟫ netstat -nap | grep 332
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:10332 0.0.0.0:* LISTEN 20678/litecoind
Litecoin logs
2017-08-07 09:06:08 Litecoin version v0.14.2
2017-08-07 09:06:08 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2017-08-07 09:06:08 Assuming ancestors of block 1673fa904a93848eca83d5ca82c7af974511a7e640e22edc2976420744f2e56a have valid signatures.
2017-08-07 09:06:08 Default data directory /home/snake/.litecoin
2017-08-07 09:06:08 Using data directory /home/snake/projects/p2pool/ltc_data
2017-08-07 09:06:08 Using config file /home/snake/projects/p2pool/conf/litecoin.conf
2017-08-07 09:06:08 Using at most 10 automatic connections (1024 file descriptors available)
2017-08-07 09:06:08 Using 32 MiB out of 32 requested for signature cache, able to store 1048576 elements
2017-08-07 09:06:08 Using 0 threads for script verification
2017-08-07 09:06:08 HTTP: creating work queue of depth 16
2017-08-07 09:06:08 Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.
2017-08-07 09:06:08 HTTP: starting 4 worker threads
2017-08-07 09:06:08 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
2017-08-07 09:06:08 Using wallet wallet.dat
2017-08-07 09:06:08 init message: Verifying wallet...
2017-08-07 09:06:08 CDBEnv::Open: LogDir=/home/snake/projects/p2pool/ltc_data/database ErrorFile=/home/snake/projects/p2pool/ltc_data/db.log
2017-08-07 09:06:08 scheduler thread start
2017-08-07 09:06:08 Bound to [::]:10333
2017-08-07 09:06:08 Bound to 0.0.0.0:10333
2017-08-07 09:06:08 Cache configuration:
Litecoin.conf
server=1
rpcuser=xxxx
rpcpassword=1c6fe0xxxxxxxxxxxxxxxx
rpcallowip=127.0.0.0/24
rpcport=10332
port=10333
rpcbind=127.0.0.1
blockmaxsize=1000000
mintxfee=0.00001
minrelaytxfee=0.00001
maxconnections=10
ps: when I roll back to 0.13 version of litecoind things get working well.
I found and fixed the issue by myself. Turned out release 0.14.2 has changes in RPC commands.
There is p2pool code which check some commands on litecoind side. If we replace it with https://github.com/ilsawa/p2pool-ltc/pull/2/commits/2af67a8cc7d0c498479f080f0652e02c4c826497. Things start working.
Another issue I came across after this fix is litecoind works with rpcbind options in odd way.
If I use
rpcbind=127.0.0.1
rpcallowip=127.0.0.0/24
it binds to 127.0.0.1, but p2pool is unable to connect it. My VPS has a few external IPs. I don't know which of them is used. I can't set rpcallowip=ip1, ip2, litecoind doesn't allow do this.
Eventually I managed to overcome the issue by commening out of rpcbind
and rpcallowip
lines.
After that things started working properly...
Glad to hear that the issue was resolved! rpcallowip allows the following: a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times so you can actually allow access to certain IPs if desired.
By default rpcbind without rpcallowip will refuse connections to everyone as noted with the warning in the first paste. There were a few RPC changes in v0.14.2 as discovered, so the p2pool software will need to be updated. For specifics, you can look here: https://github.com/litecoin-project/litecoin/blob/master/doc/release-notes-litecoin.md Without those two settings, the default behavior is to bind to all interfaces and allow connections only from localhost.
how to download litecoin wallet blockchain headers in android
Most helpful comment
I found and fixed the issue by myself. Turned out release 0.14.2 has changes in RPC commands.
There is p2pool code which check some commands on litecoind side. If we replace it with https://github.com/ilsawa/p2pool-ltc/pull/2/commits/2af67a8cc7d0c498479f080f0652e02c4c826497. Things start working.
Another issue I came across after this fix is litecoind works with rpcbind options in odd way.
If I use
it binds to 127.0.0.1, but p2pool is unable to connect it. My VPS has a few external IPs. I don't know which of them is used. I can't set rpcallowip=ip1, ip2, litecoind doesn't allow do this.
Eventually I managed to overcome the issue by commening out of
rpcbind
andrpcallowip
lines.After that things started working properly...