bcgov / von-network

A portable development level Indy Node network.
Apache License 2.0
163 stars 188 forks source link

Use genesis file in Universal Resolver in a different Docker container #287

Closed dennisn00 closed 11 months ago

dennisn00 commented 11 months ago

Hello, I set up a von-network locally in a Docker container with ./manage build and ./manage start. I then copied the Genesis File into a different docker container that was running DIF's Universal Resolver. I created a DID in the web interface (at localhost:9000), and then tried to resolve the DID with the Universal Resolver. However, the driver for Indy DIDs always reports a Timeout for the ledger operation. I assume there is some problem with the IP addresses. The genesis file lists the IP 192.168.65.9 for all nodes, however, that seems to be neither the IP of the docker container, nor the IP of the host machine. I checked the Detailed Status in the web interface and there is says node_ip/client_ip = 0.0.0.0 for all nodes. I tried to replace the IPs in the genesis file with 0.0.0.0 but I am still unable to resolve a DID in the ledger. Do I need to adjust the IPs in the genesis file or how can I make sure that I can access the nodes from a different Docker container?

WadeBarnes commented 11 months ago

By default von-network uses the Docker Host IP address, an internal address docker uses to communicate with the host system.

https://github.com/bcgov/von-network/blob/04c15f8d5bf5a2c87e07357f749bcd2594cf6890/manage#L12-L14

If you want the IP address to be more resolvable you can start von-network using the address of the host machine; ./manage start <host machine IP address here>

Here is a full example using the start command for BCovrin Test:

./manage start 138.197.138.255 LOG_LEVEL=info RUST_LOG=error POOL_CONNECTION_DELAY=20 POOL_CONNECTION_ATTEMPTS=30 WEB_SERVER_HOST_PORT=80 "LEDGER_INSTANCE_NAME=BCovrin Test" "INFO_SITE_TEXT=digital.gov.bc.ca/digital-trust" "INFO_SITE_URL=https://digital.gov.bc.ca/digital-trust/" "LEDGER_CACHE_PATH=/home/indy/.indy_client/ledger-cache/ledger-cache-db" "INDY_SCAN_URL=http://test.bcovrin.vonx.io:3707/home/BCOVRIN_TEST" "INDY_SCAN_TEXT=IndyScan - BCovrin Test"
dennisn00 commented 11 months ago

Running ./manage start <host IP> worked perfectly. Thank you for the quick response!