<p>As far as I can see in your files, you have a problem whit your docker file:</p>
<ul>
<li>ELECTRUM_HOST: &quot;0.0.0.0&quot; ---&gt; should be the IP address from your electrumx server, some like 192.168.0.17, not 0.0.0.0</li>
<li>CORE_RPC_HOST: &quot;0.0.0.0&quot;---&gt; same here the IP address should be the IP from your bitcoin core, some like 192.168.0.17, not 0.0.0.0</li>
</ul>

CC BY-SA 4.0
2023-01-07T09:54:13.643Z
In my sparrow wallet I've used 0.0.0.0:50001 as my electrum server and it worked. I've used 0.0.0.0 as address for both my electrumx and core as bitcoin.conf and electrum.conf have it. **Bitcoin.conf** rpcport=8332  rpcbind=0.0.0.0       **electrumx.conf**   SERVICES = tcp://0.0.0.0:50001
son_of_satoshi
CC BY-SA 4.0
2023-01-07T11:13:13.687Z
Sparrow could be working because it does some sweep of all the addresses you have locally listening on port 50001 (in this case, bitcoin core or electrumX).

I don't think mempool is doing the same thing.

It's not usual to configure a server with the IP 0.0.0.0 for exposure to clients. 
https://www.lifewire.com/four-zero-ip-address-818384
decentralized.b
CC BY-SA 4.0
2023-01-08T12:25:49.757Z
Thanks for that, I guess I should change those four zero addresses in all my conf files, i'll assign new adresses try to get electrum and sparrow to work and then try mempool. Let you know how it goes.
son_of_satoshi
CC BY-SA 4.0
2023-01-08T13:02:21.357Z
So I've tried swapping for localhost address but that didn't work, I thought localhost is the address of the computer I'm running core, electrum and docker on? Shouldn't 127.0.0.1, localhost and 192.168.1.## (## being that computer ip) be all the same?
son_of_satoshi
CC BY-SA 4.0
2023-01-08T13:16:13.150Z
I've tried changing to 192.168 address but then my bitcoin core doesn't work. If you don't mind can you please elaborate what exactly addresses I should have in my bitcoin.conf file, electrumx file and docker.yml file? And where I can find that address? Thanks!
son_of_satoshi
CC BY-SA 4.0
2023-01-08T13:27:59.317Z
That got me thinking is it possible that something else is not correct in that docker file? Maybe username pass, I've used the one that is in electrumX,conf, do both of those refer to the bitcoin core password? Thanks!
son_of_satoshi
CC BY-SA 4.0
2023-01-09T13:48:40.537Z
Typically, the Bitcoin Core address is the local one: 127.0.0.1 (for local use, you could create a Tor service)
The default port for listening to RPC calls is 8332, and the bitcoin port is 8333.
If you have rpcuser and rpcpassword configured, the same you should use them in Electrumx and sparrow.
Electrumx, if you have Electrumx in a docker, will have an IP address different from 127.0.0.1 and 192.168.X.XX, it is probably an IP that starts with 172.x.x.x.x, that is the one you should use to connect Sparrow and remember to use the rpcuser and rpcpassword of bitcoin.
decentralized.b
CC BY-SA 4.0
2023-01-09T13:52:03.567Z
I'm assuming that Bitcoin Core is not running in a Docker, if is running in docker, I think you should use the IP of the container that is running Bitcoin Core.
decentralized.b
CC BY-SA 4.0
2023-01-06T15:05:15.097Z
2023-01-06T15:05:15.097Z
decentralized.b
<p>I'm having a problem with &quot;connecting&quot; my mempool.space to electrumX server.
My bitcoin core is working fine, electrumX server is fine as well and up to chaintip. I've installed docker and docker-compose. Everything works fine, However when I try to <code>docker-compose up</code> it runs fine I guess, but at the end it pops this error and keeps repeating it:</p>
<blockquote>
<p>docker-api-1  | Jan  6 11:38:12 [98] ERR: Electrum error: {&quot;errno&quot;:-111,&quot;code&quot;:&quot;ECONNREFUSED&quot;,&quot;syscall&quot;:&quot;connect&quot;,&quot;address&quot;:&quot;0.0.0.0&quot;,&quot;port&quot;:50001}
docker-api-1  | Jan  6 11:38:12 [98] INFO: Disconnected from Electrum Server at 0.0.0.0:50001</p>
</blockquote>
<p>My docker-compose.yml file:</p>
<pre><code>version: &quot;3.7&quot;

services:
  web:
    environment:
      FRONTEND_HTTP_PORT: &quot;8080&quot;
      BACKEND_MAINNET_HTTP_HOST: &quot;api&quot;
    image: mempool/frontend:latest
    user: &quot;1000:1000&quot;
    restart: always
    stop_grace_period: 1m
    command: &quot;./wait-for db:3306 --timeout=720 -- nginx -g 'daemon off;'&quot;
    ports:
      - 4080:8080
  api:
    environment:
      ELECTRUM_HOST: &quot;0.0.0.0&quot;
      ELECTRUM_PORT: &quot;50001&quot;
      ELECTRUM_TLS_ENABLED: &quot;true&quot;
      MEMPOOL_BACKEND: &quot;electrum&quot;
      CORE_RPC_HOST: &quot;0.0.0.0&quot;
      CORE_RPC_PORT: &quot;8332&quot;
      CORE_RPC_USERNAME: &quot;####&quot;
      CORE_RPC_PASSWORD: &quot;####&quot;
      DATABASE_ENABLED: &quot;true&quot;
      DATABASE_HOST: &quot;db&quot;
      DATABASE_DATABASE: &quot;mempool&quot;
      DATABASE_USERNAME: &quot;mempool&quot;
      DATABASE_PASSWORD: &quot;mempool&quot;
      STATISTICS_ENABLED: &quot;true&quot;
    image: mempool/backend:latest
    user: &quot;1000:1000&quot;
    restart: always
    stop_grace_period: 1m
    command: &quot;./wait-for-it.sh db:3306 --timeout=720 --strict -- ./start.sh&quot;
    volumes:
      - ./data:/backend/cache
  db:
    environment:
      MYSQL_DATABASE: &quot;mempool&quot;
      MYSQL_USER: &quot;mempool&quot;
      MYSQL_PASSWORD: &quot;mempool&quot;
      MYSQL_ROOT_PASSWORD: &quot;admin&quot;
    image: mariadb:10.5.8
    user: &quot;1000:1000&quot;
    restart: always
    stop_grace_period: 1m
    volumes:
      - ./mysql/data:/var/lib/mysql
</code></pre>
<p>My electrumX.conf file:</p>
<pre><code># default /etc/electrumx.conf for systemd

# REQUIRED
DB_DIRECTORY = /home/qbr1ck/electrumx_db
# Bitcoin Node RPC Credentials
DAEMON_URL = ####:####@localhost

COIN = Bitcoin
SERVICES = tcp://0.0.0.0:50001
PEER_DISCOVERY = off
COST_SOFT_LIMIT = 0
COST_HARD_LIMIT = 0
</code></pre>
<p>User and Password are hashed out in both files, however they are the same.</p>
<p>This is the full output after running docker up, might give some clues</p>
<p>[+] Running 3/3
⠿ Container docker-db-1   Running                                         0.0s
⠿ Container docker-web-1  Running                                         0.0s
⠿ Container docker-api-1  Recreated                                      60.4s
Attaching to docker-api-1, docker-db-1, docker-web-1
docker-api-1  | wait-for-it.sh: waiting 720 seconds for db:3306
docker-api-1  | wait-for-it.sh: db:3306 is available after 0 seconds
docker-db-1   | 2023-01-08 13:49:36 6 [Warning] Aborted connection 6 to db: 'unconnected' user: 'unauthenticated' host: '172.16.57.2' (This connection closed normally without authentication)
docker-api-1  | Jan  8 13:49:37 [97] NOTICE: Starting Mempool Server... (a210a3f)
docker-api-1  | Jan  8 13:49:37 [97] INFO: Restoring mempool and blocks data from disk cache
docker-api-1  | Jan  8 13:49:37 [97] ERR: Electrum error: {&quot;errno&quot;:-111,&quot;code&quot;:&quot;ECONNREFUSED&quot;,&quot;syscall&quot;:&quot;connect&quot;,&quot;address&quot;:&quot;127.0.0.1&quot;,&quot;port&quot;:50001}
docker-api-1  | Jan  8 13:49:37 [97] ERR: Error connecting to Electrum Server at localhost:50001
docker-api-1  | Jan  8 13:49:37 [97] INFO: Disconnected from Electrum Server at localhost:50001
docker-api-1  | Jan  8 13:49:37 [97] INFO: Database connection established.
docker-api-1  | Jan  8 13:49:37 [97] INFO: Starting statistics service
docker-api-1  | Jan  8 13:49:37 [97] INFO: Starting currency rates service
docker-api-1  | Jan  8 13:49:37 [97] INFO: Currency rates service will be queried over clearnet using <a href="https://price.bisq.wiz.biz/getAllMarketPrices" rel="nofollow noreferrer">https://price.bisq.wiz.biz/getAllMarketPrices</a>
docker-api-1  | Jan  8 13:49:37 [97] NOTICE: Mempool Server is running on port 8999
docker-api-1  | Jan  8 13:49:37 [97] INFO: Updating latest mining pools from <a href="https://raw.githubusercontent.com/mempool/mining-pools/master/pools.json" rel="nofollow noreferrer">https://raw.githubusercontent.com/mempool/mining-pools/master/pools.json</a> over clearnet
docker-api-1  | Jan  8 13:49:42 [97] WARN: runMainLoop error: connect ECONNREFUSED 127.0.0.1:8332. Retrying in 10 sec.
docker-api-1  | Jan  8 13:49:47 [97] ERR: Electrum error: {&quot;errno&quot;:-111,&quot;code&quot;:&quot;ECONNREFUSED&quot;,&quot;syscall&quot;:&quot;connect&quot;,&quot;address&quot;:&quot;127.0.0.1&quot;,&quot;port&quot;:50001}
docker-api-1  | Jan  8 13:49:47 [97] ERR: Electrum error: {&quot;errno&quot;:-111,&quot;code&quot;:&quot;ECONNREFUSED&quot;,&quot;syscall&quot;:&quot;connect&quot;,&quot;address&quot;:&quot;127.0.0.1&quot;,&quot;port&quot;:50001}
docker-api-1  | Jan  8 13:49:47 [97] INFO: Disconnected from Electrum Server at localhost:50001
docker-api-1  | Jan  8 13:49:52 [97] WARN: runMainLoop error: connect ECONNREFUSED 127.0.0.1:8332. Retrying in 20 sec.
docker-api-1  | Jan  8 13:49:57 [97] ERR: Electrum error: {&quot;errno&quot;:-111,&quot;code&quot;:&quot;ECONNREFUSED&quot;,&quot;syscall&quot;:&quot;connect&quot;,&quot;address&quot;:&quot;127.0.0.1&quot;,&quot;port&quot;:50001}
docker-api-1  | Jan  8 13:49:57 [97] ERR: Electrum error: {&quot;errno&quot;:-111,&quot;code&quot;:&quot;ECONNREFUSED&quot;,&quot;syscall&quot;:&quot;connect&quot;,&quot;address&quot;:&quot;127.0.0.1&quot;,&quot;port&quot;:50001}
docker-api-1  | Jan  8 13:49:57 [97] INFO: Disconnected from Electrum Server at localhost:50001</p>

<electrum><server><error><connection><mempool.space>
Mempool docker unable to connect to electrum server
son_of_satoshi
# Mempool docker unable to connect to electrum server

(Asked by: username_0 on 2023-01-06)

I'm having a problem with "connecting" my mempool.space to electrumX server.
My bitcoin core is working fine, electrumX server is fine as well and up to chaintip. I've installed docker and docker-compose. Everything works fine, However when I try to `docker-compose up` it runs fine I guess, but at the end it pops this error and keeps repeating it:

> docker-api-1 | Jan 6 11:38:12 [98] ERR: Electrum error: {"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"0.0.0.0","port":50001}
> docker-api-1 | Jan 6 11:38:12 [98] INFO: Disconnected from Electrum Server at 0.0.0.0:50001

My docker-compose.yml file:

```
version: "3.7"

services:
  web:
    environment:
      FRONTEND_HTTP_PORT: "8080"
      BACKEND_MAINNET_HTTP_HOST: "api"
    image: mempool/frontend:latest
    user: "1000:1000"
    restart: always
    stop_grace_period: 1m
    command: "./wait-for db:3306 --timeout=720 -- nginx -g 'daemon off;'"
    ports:
      - 4080:8080
  api:
    environment:
      ELECTRUM_HOST: "0.0.0.0"
      ELECTRUM_PORT: "50001"
      ELECTRUM_TLS_ENABLED: "true"
      MEMPOOL_BACKEND: "electrum"
      CORE_RPC_HOST: "0.0.0.0"
      CORE_RPC_PORT: "8332"
      CORE_RPC_USERNAME: "####"
      CORE_RPC_PASSWORD: "####"
      DATABASE_ENABLED: "true"
      DATABASE_HOST: "db"
      DATABASE_DATABASE: "mempool"
      DATABASE_USERNAME: "mempool"
      DATABASE_PASSWORD: "mempool"
      STATISTICS_ENABLED: "true"
    image: mempool/backend:latest
    user: "1000:1000"
    restart: always
    stop_grace_period: 1m
    command: "./wait-for-it.sh db:3306 --timeout=720 --strict -- ./start.sh"
    volumes:
      - ./data:/backend/cache
  db:
    environment:
      MYSQL_DATABASE: "mempool"
      MYSQL_USER: "mempool"
      MYSQL_PASSWORD: "mempool"
      MYSQL_ROOT_PASSWORD: "admin"
    image: mariadb:10.5.8
    user: "1000:1000"
    restart: always
    stop_grace_period: 1m
    volumes:
      - ./mysql/data:/var/lib/mysql

```

My electrumX.conf file:

```
# default /etc/electrumx.conf for systemd

# REQUIRED
DB_DIRECTORY = /home/qbr1ck/electrumx_db
# Bitcoin Node RPC Credentials
DAEMON_URL = ####:####@localhost

COIN = Bitcoin
SERVICES = tcp://0.0.0.0:50001
PEER_DISCOVERY = off
COST_SOFT_LIMIT = 0
COST_HARD_LIMIT = 0

```

User and Password are hashed out in both files, however they are the same.

This is the full output after running docker up, might give some clues

[+] Running 3/3
⠿ Container docker-db-1 Running 0.0s
⠿ Container docker-web-1 Running 0.0s
⠿ Container docker-api-1 Recreated 60.4s
Attaching to docker-api-1, docker-db-1, docker-web-1
docker-api-1 | wait-for-it.sh: waiting 720 seconds for db:3306
docker-api-1 | wait-for-it.sh: db:3306 is available after 0 seconds
docker-db-1 | 2023-01-08 13:49:36 6 [Warning] Aborted connection 6 to db: 'unconnected' user: 'unauthenticated' host: '172.16.57.2' (This connection closed normally without authentication)
docker-api-1 | Jan 8 13:49:37 [97] NOTICE: Starting Mempool Server... (a210a3f)
docker-api-1 | Jan 8 13:49:37 [97] INFO: Restoring mempool and blocks data from disk cache
docker-api-1 | Jan 8 13:49:37 [97] ERR: Electrum error: {"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":50001}
docker-api-1 | Jan 8 13:49:37 [97] ERR: Error connecting to Electrum Server at localhost:50001
docker-api-1 | Jan 8 13:49:37 [97] INFO: Disconnected from Electrum Server at localhost:50001
docker-api-1 | Jan 8 13:49:37 [97] INFO: Database connection established.
docker-api-1 | Jan 8 13:49:37 [97] INFO: Starting statistics service
docker-api-1 | Jan 8 13:49:37 [97] INFO: Starting currency rates service
docker-api-1 | Jan 8 13:49:37 [97] INFO: Currency rates service will be queried over clearnet using <https://price.bisq.wiz.biz/getAllMarketPrices>
docker-api-1 | Jan 8 13:49:37 [97] NOTICE: Mempool Server is running on port 8999
docker-api-1 | Jan 8 13:49:37 [97] INFO: Updating latest mining pools from <https://raw.githubusercontent.com/mempool/mining-pools/master/pools.json> over clearnet
docker-api-1 | Jan 8 13:49:42 [97] WARN: runMainLoop error: connect ECONNREFUSED 127.0.0.1:8332. Retrying in 10 sec.
docker-api-1 | Jan 8 13:49:47 [97] ERR: Electrum error: {"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":50001}
docker-api-1 | Jan 8 13:49:47 [97] ERR: Electrum error: {"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":50001}
docker-api-1 | Jan 8 13:49:47 [97] INFO: Disconnected from Electrum Server at localhost:50001
docker-api-1 | Jan 8 13:49:52 [97] WARN: runMainLoop error: connect ECONNREFUSED 127.0.0.1:8332. Retrying in 20 sec.
docker-api-1 | Jan 8 13:49:57 [97] ERR: Electrum error: {"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":50001}
docker-api-1 | Jan 8 13:49:57 [97] ERR: Electrum error: {"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":50001}
docker-api-1 | Jan 8 13:49:57 [97] INFO: Disconnected from Electrum Server at localhost:50001

**Tags:** electrum, server, error, connection, mempool.space


---

## 1 answers

### Answer by username_1 on 2023-01-06. Score: 0

As far as I can see in your files, you have a problem whit your docker file:

* ELECTRUM\_HOST: "0.0.0.0" ---> should be the IP address from your electrumx server, some like 192.168.0.17, not 0.0.0.0
* CORE\_RPC\_HOST: "0.0.0.0"---> same here the IP address should be the IP from your bitcoin core, some like 192.168.0.17, not 0.0.0.0

> **Comments:**
> **username_0**: In my sparrow wallet I've used 0.0.0.0:50001 as my electrum server and it worked. I've used 0.0.0.0 as address for both my electrumx and core as bitcoin.conf and electrum.conf have it. **Bitcoin.conf** rpcport=8332  rpcbind=0.0.0.0       **electrumx.conf**   SERVICES = tcp://0.0.0.0:50001  
> **username_1**: Sparrow could be working because it does some sweep of all the addresses you have locally listening on port 50001 (in this case, bitcoin core or electrumX).  I don't think mempool is doing the same thing.  It's not usual to configure a server with the IP 0.0.0.0 for exposure to clients.  https://www.lifewire.com/four-zero-ip-address-818384  
> **username_0**: Thanks for that, I guess I should change those four zero addresses in all my conf files, i'll assign new adresses try to get electrum and sparrow to work and then try mempool. Let you know how it goes.  
> **username_0**: So I've tried swapping for localhost address but that didn't work, I thought localhost is the address of the computer I'm running core, electrum and docker on? Shouldn't 127.0.0.1, localhost and 192.168.1.## (## being that computer ip) be all the same?  
> **username_0**: I've tried changing to 192.168 address but then my bitcoin core doesn't work. If you don't mind can you please elaborate what exactly addresses I should have in my bitcoin.conf file, electrumx file and docker.yml file? And where I can find that address? Thanks!  
> **username_0**: That got me thinking is it possible that something else is not correct in that docker file? Maybe username pass, I've used the one that is in electrumX,conf, do both of those refer to the bitcoin core password? Thanks!  
> **username_1**: Typically, the Bitcoin Core address is the local one: 127.0.0.1 (for local use, you could create a Tor service) The default port for listening to RPC calls is 8332, and the bitcoin port is 8333. If you have rpcuser and rpcpassword configured, the same you should use them in Electrumx and sparrow. Electrumx, if you have Electrumx in a docker, will have an IP address different from 127.0.0.1 and 192.168.X.XX, it is probably an IP that starts with 172.x.x.x.x, that is the one you should use to connect Sparrow and remember to use the rpcuser and rpcpassword of bitcoin.  
> **username_1**: I'm assuming that Bitcoin Core is not running in a Docker, if is running in docker, I think you should use the IP of the container that is running Bitcoin Core.  

---

