Solutions to common problems.
Browser cannot open Green Metrics Tool Frontend / ERR_CONNECTION_REFUSED
When you are getting an unexpected result when accessing localhost / *.internal domain or a different website gets served / 404 / 403 check:
- Caching problem, please open Developer tools in your browser and check the Disable Cache option under Network
- Not having the hostname set correctly in
127.0.0.1 metrics.green-coding.internal api.green-coding.internal 127.0.0.1 green-coding-postgres-container
- Not accessing the Green Metrics Tool with the additional supplied port:
- It could be that you have other containers running and the port is overloaded, so that some
other service serves content on that port. Check your
docker ps -a
- Also check
lsof -i | grep PORTNUMBERto look if something on your host OS is serving content on that port
ERR_NAME_NOT_RESOLVED / DNS_PROBE_POSSIBLE
- Hostname of container correct?
docker pstells you the container name, which is also the hostname
- Are the containers on the same network? Check with
docker inspect CONTAINER_ID
- Can access the container through browser when mapping the ports to the host OS? (See also debug mode for this)
Run fails because volumes, environment or ports are in the
- If you just copied your
docker-compose.ymland wanted to reuse it but do not need the functionality, then consider using the
- If you need the functionality then consider the
If you run into any conflicts just deinit and reinit the submodule in question:
git submodule deinit FOLDER -f git submodule update --init FOLDER git submodule init FOLDER
- Always check container logs with
docker compose logs. Sometimes streaming logs does not work that well when orchestrating multiple containers and polling the directly gives you all logs.
- Add the
--debugswitche to your local calls to the
runner.pyto enter the stepping debug mode of the tool.
--allow-unsafeto the call to
runner.pyand ports to your usage_scenario.yml → to access containers through your browser in the host OS to check if the containers are delivering the expected output.
- Rebuild the containers with
docker compose down -vand then
docker compose up -d
- Re-run the
install.shscript to get new configuration changes that you maybe have not yet applied after an update