libp2p / js-libp2p-amino-dht-bootstrapper

A CLI for starting an Amino DHT bootstrapper
Other
1 stars 2 forks source link

add instructions / debugging / troubleshooting markdown file #137

Open SgtPooki opened 3 months ago

SgtPooki commented 3 months ago

how to get healthcheck info:

> docker inspect --format "{{json .State.Health }}" $(docker container ls  | grep 'amino' | awk '{print $1}') | jq

# ...
      "Output": "Could not convert input into PeerId\nfile:///app/node_modules/libp2p/dist/src/connection-manager/dial-queue.js:329\n            throw new CodeError('The dial request has no valid addresses', codes.ERR_NO_VALID_ADDRESSES);\n                  ^\n\nCodeError: The dial request has no valid addresses\n    at DialQueue.calculateMultiaddrs (file:///app/node_modules/libp2p/dist/src/connection-manager/dial-queue.js:329:19)\n    at async queue.add.peerId.peerId [as fn] (file:///app/node_modules/libp2p/dist/src/connection-manager/dial-queue.js:139:31)\n    at async raceSignal (file:///app/node_modules/race-signal/dist/src/index.js:28:16)\n    at async Job.run (file:///app/node_modules/@libp2p/utils/dist/src/queue/job.js:57:28) {\n  code: 'ERR_NO_VALID_ADDRESSES',\n  props: {}\n}\n\nNode.js v20.16.0\n"
    },
# ...
SgtPooki commented 3 months ago

view logs:


> docker logs $(docker container ls  | grep 'amino' | awk '{print $1}')
Enabling Kademlia DHT
Enabling Autonat
libp2p is running
PeerId 12D3KooWLYqka3mmc71uvB2TbCVpTF8dVUbgcYyjDd8UWPdxBPtn
Metrics server listening 0.0.0.0:8888/metrics
Metrics server listening 0.0.0.0:8899

libp2p listening on:
/ip4/147.75.198.229/tcp/4003/ws/p2p/12D3KooWLYqka3mmc71uvB2TbCVpTF8dVUbgcYyjDd8UWPdxBPtn
/ip4/147.75.198.229/tcp/4001/p2p/12D3KooWLYqka3mmc71uvB2TbCVpTF8dVUbgcYyjDd8UWPdxBPtn
SgtPooki commented 3 months ago

start fresh, with all docker compose images: docker compose --profile dashboard up --force-recreate -d

SgtPooki commented 3 months ago

FYI you may also need to chmod -R 777 config/grafana to prevent grafana permission issues

SgtPooki commented 3 months ago

FYI, currently, you might need to hardcode the IP address of the host in the config/grafana/datasources/prometheus.yml and config/prometheus/prometheus.yml files, instead of host.docker.internal, when using docker compose. We shouldn't need to do this, we need to fix docker networking

SgtPooki commented 3 months ago

FYI, currently, you might need to hardcode the IP address of the host in the config/grafana/datasources/prometheus.yml and config/prometheus/prometheus.yml files, instead of host.docker.internal, when using docker compose. We shouldn't need to do this, we need to fix docker networking

This was only needed because host.docker.internal is only available when not using Docker Desktop by adding extra_hosts: "host.docker.internal:host-gateway" config in the docker-compose.yaml file.