chainlens-free
chainlens-free copied to clipboard
Impossible to connect to local EVM network instance
Hello,
When trying to run the services described in docker-compose file, the ingestion service does not recognize the local EVM network running at port 8545. I passed the en variable NODE_ENDPOINT as described in the README.md file, but the logs of the service return "Connection Refused", as shown below:
java.net.ConnectException: Failed to connect to /172.16.239.1:8545
Someone know how could I solve these issue?
I am running the command as follows:
NODE_ENDPOINT=http://172.16.239.1:8545 docker-compose up
I am running both the explorer and the local EVM network on a WSL 2 distribution.
I had a similar error. What fixed it for me was changing NODE_ENDPOINT to http://host.docker.internal:8545 instead of http://localhost:8545. My Besu network was hosted on Docker, don't know if yours is.
I am also getting the same error any solutions or fix for this ???
I solved this problem You have to allow the requests coming from any node. Not just localhost.
Initially when you start hardhat with the command
npx hardhat node
It will allow communication only within the localhost.
So to allow communication inside the docker network you can enter the following command like
npx hardhat node --hostname 0.0.0.0
After this you can set the node endpoint to the following"
http://172.16.239.1:8545