I have this same issue. Totally randomly refuses connection. Reading or writing, does not matter. I estimate that 75%-80% of queries go through and the rest are refused. Reinstalled influx and also purged data from bucket. Version is 2.0.8 and I think it started after version upgrade(?)
Post "http://192.168.20.22:8086/api/v2/query?org=Sjoberg": dial tcp 192.168.20.22:8086: connect: connection refused
I had a look at /var/log/syslog and it is filled with influxdb not starting:
Sep 14 16:51:30 vmt-lin1-virt influxd-systemd-start.sh[445]: /usr/lib/influxdb/scripts/influxd-systemd-start.sh: line 27: curl: command not found
Sep 14 16:51:30 vmt-lin1-virt influxd-systemd-start.sh[445]: InfluxDB API at http://localhost:8086/ready unavailable after 74 attempts…
There is something horribly wrong with the startup script? Installed curl now. Let’s see if this was the issue…