Skip to main content

Mempool docker unable to connect to electrum server

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.