Hello.
I'm trying to setup ElectrumX server so that I can connect Electrum wallet to my node. The ElectrumX server I'm using is hosted here:
https://github.com/spesmilo/electrumxMy config file is this:
# default /etc/electrumx.conf for systemd
# REQUIRED
DB_DIRECTORY = /home/[REPLACEDUSER]/Storage/electrumx
# Bitcoin Node RPC Credentials
#DAEMON_URL = http://[REPLACEDUSER]:[REPLACEDPASSWD]@localhost:8332/
# Database
DB_ENGINE = leveldb
# Username
USERNAME = [REPLACEDUSER]
# Binary
ELECTRUMX = /home/[REPLACEDUSER]/.local/bin/electrum_server
# COIN = Bitcoin
COIN = Bitcoin
# Logs
ANON_LOGS = fuck off :)
# Daemon URL
DAEMON_URL = http://[REPLACEDUSER]:[REPLACEDPASSWD]@127.0.0.1:8332/
# Misc
CACHE_MB = 1800
MAX_SESSIONS = 500
SERVICES = tcp://:10001,rpc://:8001
#EVENT_LOOP_POLICY = uvloop
PEER_DISCOVERY = self
INITIAL_CONCURRENT = 50
# See http://electrumx.readthedocs.io/en/latest/environment.html for
# information about other configuration settings you probably want to consider.
My bitcoin node config file is:
dbbatchsize=4294967000
dbcache=12288
par=1 -daemon
server=1
#rpcauth=[REPLACEDUSER]:[REPLACEDHASH]
rpcallowip=127.0.0.1
rpcport=8332
rpcuser=[REPLACEDUSER]
rpcpassword=[REPLACEDPASSWD]
maxtxfee=0.00002000
mintxfee=0.00000002
# Options only for mainnet
[main]
conf=/media/WdElements/blockchain-backup/bitcoin.conf
datadir=/media/WdElements/blockchain-backup
#debug=net
debug=rpc
debuglogfile=/media/WdElements/blockchain-backup/debug.log
addresstype=bech32
changetype=bech32
txindex=1
listen=1
But as soon as I start ElectrumX server, I start seeing this in bitcoind log:
2021-01-29T21:27:09Z ThreadRPCServer incorrect password attempt from [::1]:41976
2021-01-29T21:27:13Z ThreadRPCServer incorrect password attempt from [::1]:41976
2021-01-29T21:27:17Z ThreadRPCServer incorrect password attempt from [::1]:41976
2021-01-29T21:27:22Z ThreadRPCServer incorrect password attempt from [::1]:41976
I already tried the following and it works:
$ bitcoin-cli -rpcconnect=127.0.0.1 -rpcport=8332 -rpcuser=[REPLACEDUSER] -rpcpassword=[REPLACEDHASH] getblockchaininfo
{
"chain": "main",
"blocks": 668255,
"headers": 668255,
"bestblockhash": "0000000000000000000b3d7355f1b412aeca89f52ee3d0b8ee36054320fcc9b2",
"difficulty": 20823531150111.52,
"mediantime": 1611952664,
"verificationprogress": 0.9999906737057773,
"initialblockdownload": false,
"chainwork": "000000000000000000000000000000000000000018bda4a3fbdacab0a567a720",
"size_on_disk": 368883866225,
"pruned": false,
"softforks": {
"bip34": {
"type": "buried",
"active": true,
"height": 227931
},
"bip66": {
"type": "buried",
"active": true,
"height": 363725
},
"bip65": {
"type": "buried",
"active": true,
"height": 388381
},
"csv": {
"type": "buried",
"active": true,
"height": 419328
},
"segwit": {
"type": "buried",
"active": true,
"height": 481824
}
},
"warnings": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
}
and I can see this output in bitcoin daemon when I run the above command:
2021-01-29T21:28:28Z ThreadRPCServer method=getblockchaininfo user=[REPLACEDUSER]
So, what am I missing? I can't run any ElectrumX RPC commands. For instance:
$ electrumx_rpc -p 8001 getinfo
cannot connect - is ElectrumX catching up, not running, or is 8001 the wrong RPC port?