Zero Peers for Node

Issue Report

Environment

  • Operating System: Ubuntu
  • Pulsar/Advanced CLI/Docker: Docker

Problem

I am unable to get any peers. I’ve left my node running for 12+ hours and 0 peers. I have another machine running which is getting 40 peers. There is no difference that I can tell between these machines. Furthermore, previously the node that now has 0 peers was fully synced and had no issues getting peers.

version: "3.7"
services:
  node:
    container_name: subspace_node
    image: ghcr.io/subspace/node:gemini-3h-2024-feb-05
    volumes:
      - node-data:/var/subspace:rw
    ports:
      - "0.0.0.0:30333:30333/udp"
      - "0.0.0.0:30333:30333/tcp"
      - "0.0.0.0:30433:30433/udp"
      - "0.0.0.0:30433:30433/tcp"
      - "9944:9944"
    restart: unless-stopped
    command:
      [
        "run",
        "--chain", "gemini-3h",
        "--base-path", "/var/subspace",
        "--blocks-pruning", "256",
        "--state-pruning", "archive-canonical",
        "--listen-on", "/ip4/0.0.0.0/tcp/30333",
        "--dsn-listen-on", "/ip4/0.0.0.0/udp/30433/quic-v1",
        "--dsn-listen-on", "/ip4/0.0.0.0/tcp/30433",
        "--rpc-cors", "all",
        "--rpc-methods", "unsafe",
        "--rpc-listen-on", "0.0.0.0:9944",
        "--farmer",
        "--name", "hhw-bravo"
      ]
    healthcheck:
      timeout: 5s
      interval: 30s
      retries: 60
    networks:
      spacenet:
        ipv4_address: 172.18.0.201

  farmer:
    container_name: subspace_farmer
    depends_on:
      node:
        condition: service_healthy
    image: ghcr.io/subspace/farmer:gemini-3h-2024-feb-05
    volumes:
      - /media/subspace/subspace01:/subspace01:rw
      - /media/subspace/subspace02:/subspace02:rw
      - /media/subspace/subspace03:/subspace03:rw
      - /media/subspace/subspace04:/subspace04:rw
    ports:
      - "0.0.0.0:30533:30533/udp"
      - "0.0.0.0:30533:30533/tcp"
    restart: unless-stopped
    command:
      [
        "farm",
        "--node-rpc-url", "ws://node:9944",
        "--listen-on", "/ip4/0.0.0.0/udp/30533/quic-v1",
        "--listen-on", "/ip4/0.0.0.0/tcp/30533",
        "--reward-address", "my address",
        "path=/subspace01,size=3900G",
        "path=/subspace02,size=3900G",
        "path=/subspace03,size=3900G",
        "path=/subspace04,size=3900G",
        "--farm-during-initial-plotting", "true",
        "--sector-encoding-concurrency", "4"
      ]
    networks:
      spacenet:
        ipv4_address: 172.18.0.202


volumes:
  node-data:   

networks:
  spacenet:
    external: true
    name: base-stack_spacenet

I’ve tried to delete node_state and start the sync over. I’ve tried to delete all my plots and start over. This was working perfectly fine since start of 3H (minus unrelated issues to ISP which have been resolved). I can’t get these nodes to start syncing anymore, always 0 peers.

I am using a VPN but removed the VPN from the nodes to check if it was related - still unable to get peers even after removing VPN.

Node Zulu, which does have peers, has the message:
Discovered new external address for our node

Node Bravo, which does not have peers does not have this message.

I attempted to add that address from Zulu to Bravo via bootnode flag in the command but it did not help. The way I did this was:

   
"--bootstrap-nodes", "/ip4/<REDACTED IP>/tcp/30333/p2p/12D3KooWHa7tk3p9TtUtLpa39RgHfVRD7dyZ1LFuRHEGCmTZZ4Aa"

This did not help. Also attempted to telnet to bootnodes from Bravo and was unable to make a connection. Zulu I was able to make a connection.

Both Bravo and Zulu are on the same VLAN, connecting through a VPN (PIA). Both nodes are running basically the same docker compose - only difference is Zulu has the timekeeper flag instead of farmer.

This happens when you get incoming connections from other peers that remembered you. If ports are not forwarded, you may not get this message.

What IP address does bootstrap node even resolve to? Is it possible that you have overridden IP address in DNS server or hosts file?

I had forgotten I hard coded the ip into /etc/hosts for the bootstrap domains. I’ve removed the overrides and now it works. Thanks!!!