forta-network/forta-node

Host.Docker.Internal Doesn't work on Linux

joesixpack opened this issue · 3 comments

{"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:29:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:30:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:31:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:32:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:33:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:34:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:35:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:36:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:37:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:38:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:39:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:40:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:41:58Z"}                                                                                           │
│   {"error":"get request failed: Get \"http://host.docker.internal:8090/health\": dial tcp 172.16.0.1:8090: i/o timeout","level":"warning","msg":   │
│   "telemetry sync failed","time":"2022-05-04T22:42:58Z"} 

For fix, see: https://medium.com/@TimvanBaarsen/how-to-connect-to-the-docker-host-from-inside-a-docker-container-112b4c71bc66

The issue could be about your network settings. We have not observed or received reports of such problem lately. Please provide more details and reopen if you think it's still relevant.

I'd say its still relevant. I'm using the ufw-docker firewall and that could be interfering:

image

Adding an entry for supervisor doesn't address the issue:

image

Solution to this was:

sudo ufw allow from 172.16.0.0/12 to 172.16.0.1/16
sudo ufw reload