Search code examples
ddev

I see segment errors when issuing ddev commands (pi-hole?)


I see errors like this when issuing ddev commands:

segment 2020/03/31 11:30:15 ERROR: sending request - Post https://api.segment.io/v1/batch: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
segment 2020/03/31 11:30:15 ERROR: 2 messages dropped because they failed to be sent and the client was closed

Does it matter? What can I do about it?


Solution

  • This is usually a result of either really bad internet or pi-hole (or similar DNS interceptor) being active and preventing proper lookup of api.segment.io (it returns 0.0.0.0 as the IP address instead of the real address)

    It does no harm but it's certainly annoying.

    There are at least two solutions if pi-hole is the culprit:

    1. Whitelist api.segment.io in pi-hole; use this command: pihole -w api.segment.io
    2. Tell ddev not to send instrumentation messages via segment: ddev config global --instrumentation-opt-in=false