Unable to load GUI (docker latest tag)

Today I noticed LibreNMS on my home server would fail to load the GUI. There were some database errors that I resolved with mysql_upgrade, but even after rebuilding the LibreNMS container several times and restarting the server, I’m still getting “Problem loading page” in Firefox and “ERR_CONNECTION_REFUSED” in Chrome.

  • I have docker mapping TCP 48080 to the LibreNMS container 8000. Traffic destined to server:48080 is reaching the server and not being blocked by iptables.

  • When I hop into the container (docker exec -it librenms /bin/bash), I see that neither php-fpm81 nor nginx are running. If I try to run php-fpm81 as root, I get ALERT: [pool www] user has not been defined.

Would love some ideas for help as this was working just fine for the past 2 years. Thanks!

DOCKER-COMPOSE STACK

 mariadb_lnms:
    image: mariadb:latest
    container_name: mariadb_lnms
    hostname: mariadb_lnms
    networks:
      dockerapps:
        ipv4_address: 172.18.0.27
    restart: unless-stopped
    command:
      - "mysqld"
    volumes:
      - /etc/timezone:/etc/timezone:ro 
      - "/opt/mariadb/lnms:/var/lib/mysql"
    environment:
      - "TZ=${TZ}"
      - "MYSQL_ALLOW_EMPTY_PASSWORD=no"
      - "MYSQL_DATABASE=lol"
      - "MYSQL_USER=lol"
      - "MYSQL_PASSWORD=lol"
    restart: always
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
  memcached:
    image: memcached:latest
    container_name: memcached
    hostname: memcached
    networks:
      dockerapps:
        ipv4_address: 172.18.0.28
    restart: unless-stopped
    environment:
      - "TZ=${TZ}"
    volumes:
      - /etc/timezone:/etc/timezone:ro 
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
  redis:
    image: redis:latest
    container_name: redis
    hostname: redis
    networks:
      dockerapps:
        ipv4_address: 172.18.0.29
    restart: unless-stopped
    environment:
      - "TZ=${TZ}"
    volumes:
      - /opt/redis:/var/lib/redis
      - /etc/timezone:/etc/timezone:ro 
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
  librenms:
    image: librenms/librenms:latest
    container_name: librenms
    hostname: librenms
    networks:
      dockerapps:
        ipv4_address: 172.18.0.30
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
      - NET_RAW
    depends_on:
      - mariadb_lnms
      - memcached
    env_file:
     - /opt/librenms/.docker.env
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /opt/librenms/hosts:/etc/hosts:rw
      - /opt/librenms:/data
      - /opt/librenms/config.php:/opt/librenms/config.php:rw
    environment:
      - "TZ=${TZ}"
      - "PUID=1000"
      - "PGID=1000"
      - "DB_HOST=mariadb_lnms"
      - "DB_NAME=lol"
      - "DB_USER=lol"
      - "DB_PASSWORD=lol"
      - "DB_TIMEOUT=60"
    ports:
      - "48080:8000"
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
  dispatcher:
    image: librenms/librenms:latest
    container_name: dispatcher
    hostname: dispatcher
    networks:
      dockerapps:
        ipv4_address: 172.18.0.31
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
      - NET_RAW
    depends_on:
      - librenms
      - redis
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /opt/librenms/hosts:/etc/hosts:rw
      - "/opt/librenms:/data"
    env_file:
      - "/opt/librenms/.docker.env"
    environment:
      - "TZ=${TZ}"
      - "PUID=1000"
      - "PGID=1000"
      - "DB_HOST=mariadb_lnms"
      - "DB_NAME=lol"
      - "DB_USER=lol"
      - "DB_PASSWORD=lol"
      - "DB_TIMEOUT=60"
      - "DISPATCHER_NODE_ID=dispatcher1"
      - "REDIS_HOST=redis"
      - "REDIS_PORT=6379"
      - "REDIS_DB=0"
      - "SIDECAR_DISPATCHER=1"
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

DOCKER ENV FILE

TZ=America/Chicago
PUID=1000
PGID=1000

MEMORY_LIMIT=2048M
UPLOAD_MAX_SIZE=256M
OPCACHE_MEM_SIZE=256
REAL_IP_FROM=0.0.0.0/32
REAL_IP_HEADER=X-Forwarded-For
LOG_IP_VAR=remote_addr

LIBRENMS_SNMP_COMMUNITY=lol
MEMCACHED_HOST=memcached
MEMCACHED_PORT=11211

LIBRENMS_WEATHERMAP=true

LIBRENMS_SERVICE_LOGLEVEL=warning

# librenms
DB_HOST=mariadb_lnms
DB_NAME=lol
DB_USER=lol
DB_PASSWORD=lol
DB_TIMEOUT=60

# dispatcher
DISPATCHER_NODE_ID=dispatcher1
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
SIDECAR_DISPATCHER=1

TROUBLESHOOTING:

$ sudo lsof -i :48080
COMMAND      PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
docker-pr 175477 root    4u  IPv4 1108565      0t0  TCP *:48080 (LISTEN)

$ sudo iptables --list | grep 172.18.0.30
ACCEPT     tcp  --  anywhere             172.18.0.30          tcp dpt:8000

$ sudo tcpdump -i enp4s0 tcp port 48080
10:20:41.202910 IP 192.168.1.39.55718 > server.48080: Flags [S], seq 2672644236, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:20:41.202953 IP server.48080 > 192.168.1.39.55718: Flags [R.], seq 0, ack 2672644237, win 0, length 0
10:20:41.463012 IP 192.168.1.39.55719 > server.48080: Flags [S], seq 1982345209, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:20:41.463069 IP server.48080 > 192.168.1.39.55719: Flags [R.], seq 0, ack 1982345210, win 0, length 0
10:20:41.709273 IP 192.168.1.39.55718 > server.48080: Flags [S], seq 2672644236, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:20:41.709312 IP server.48080 > 192.168.1.39.55718: Flags [R.], seq 0, ack 1, win 0, length 0
10:20:41.967319 IP 192.168.1.39.55719 > server.48080: Flags [S], seq 1982345209, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:20:41.967348 IP server.48080 > 192.168.1.39.55719: Flags [R.], seq 0, ack 1, win 0, length 0
10:20:42.220703 IP 192.168.1.39.55718 > server.48080: Flags [S], seq 2672644236, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:20:42.220737 IP server.48080 > 192.168.1.39.55718: Flags [R.], seq 0, ack 1, win 0, length 0
10:20:42.475927 IP 192.168.1.39.55719 > server.48080: Flags [S], seq 1982345209, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:20:42.475978 IP server.48080 > 192.168.1.39.55719: Flags [R.], seq 0, ack 1, win 0, length 0
10:20:42.727173 IP 192.168.1.39.55718 > server.48080: Flags [S], seq 2672644236, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:20:42.727208 IP server.48080 > 192.168.1.39.55718: Flags [R.], seq 0, ack 1, win 0, length 0
10:20:42.992068 IP 192.168.1.39.55719 > server.48080: Flags [S], seq 1982345209, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:20:42.992107 IP server.48080 > 192.168.1.39.55719: Flags [R.], seq 0, ack 1, win 0, length 0
10:20:43.235607 IP 192.168.1.39.55718 > server.48080: Flags [S], seq 2672644236, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:20:43.235643 IP server.48080 > 192.168.1.39.55718: Flags [R.], seq 0, ack 1, win 0, length 0
10:20:43.515495 IP 192.168.1.39.55719 > server.48080: Flags [S], seq 1982345209, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:20:43.515546 IP server.48080 > 192.168.1.39.55719: Flags [R.], seq 0, ack 1, win 0, length 0

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.