org.influxdb.InfluxDBIOException: java.net.SocketTimeoutException: timeout
使用influxdb的java客户端连接influxdb:
1 |
InfluxDB influxDB = InfluxDBFactory.connect("http://localhost:8086"); |
报错:
1 |
Exception in thread "main" org.influxdb.InfluxDBIOException: java.net.SocketTimeoutException: timeout |
更改OKHttpClient的默认超时:
1 |
OkHttpClient.Builder client = new OkHttpClient.Builder() |
参考:
https://github.com/influxdata/influxdb-java
https://stackoverflow.com/questions/50922473/influxdbioexception-java-net-sockettimeoutexception-timeout
近期评论