Closed 7yl4r closed 3 years ago
I am able to read & write to influx from the docker hypervisor:
[tylarmurray@fgb-dashboard ~]$ curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=fwc_coral_disease" --data-urlencode "q=SELECT \"value\" FROM \"cpu_load_short\" WHERE \"region
\"='us-west'"
{
"results": [
{
"statement_id": 0
}
]
}
[tylarmurray@fgb-dashboard ~]$ curl -i -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE my_test_db"
HTTP/1.1 200 OK
Content-Type: application/json
Request-Id: 8d565056-e7e4-11eb-800b-0242ac140009
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.8.4
X-Request-Id: 8d565056-e7e4-11eb-800b-0242ac140009
Date: Sun, 18 Jul 2021 16:23:57 GMT
Transfer-Encoding: chunked
{"results":[{"statement_id":0}]}
[tylarmurray@fgb-dashboard ~]$ curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=my_test_db" --data-urlencode "q=SELECT \"value\" FROM \"cpu_load_short\" WHERE \"region\"='us-
west'"
{
"results": [
{
"statement_id": 0
}
]
}
and read from my PC:
[tylar@tylar-pc ~]$ curl -G 'http://35.209.104.85:8086/query?pretty=true' --data-urlencode "db=my_test_db" --data-urlencode "q=SELECT \"value\" FROM \"cpu _load_short\" WHERE \"region\"='us-west'"
{
"results": [
{
"statement_id": 0
}
]
}
and read from the mbon_docker_uploader container:
[tylarmurray@fgb-dashboard ~]$ docker exec -it mbon_data_uploader curl -G 'http://35.209.104.85:8086/query?pretty=true' --data-urlencode "db=my_test_db" --data-urlencode "q=SELECT \"value\" FROM \
"cpu_load_short\" WHERE \"region\"='us-west'"
{
"results": [
{
"statement_id": 0
}
]
}
Looking at the command from the error in the OP I see localhost
where we should instead have the server public IP:
export_csv_to_influx --csv /tmp/fgb-_-EXT_TS_MODA-_-OC-_-FGBdbv2_ABI_TS_MODA_daily_COAST1.csv --dbname fwc_coral_disease --measurement rs_oc_chlor --field_columns mean,climatology,anomaly --tag_columns location --force_insert_even_csv_no_update True --server localhost:8086 --time_column Time
This is of course throwing a ConnectionRefusedError
. I wish I could that information into the html 500 response instead of the generic subprocess failure. Not sure why the Subprocess error details:
section is all None
s. 😞
Looks like a missing environment var:
[tylarmurray@fgb-dashboard ~]$ docker exec -it mbon_data_uploader echo $INFLUXDB_HOSTNAME
buuuuut also that environment var isn't coming back empty in the script... it is working as set in the docker-compose.yml
. Curious that the above command isn't showing that but that's not the issue we are exploring today.
influxdb not taking data currently. failing in airflow and at manual submission (http://35.209.104.85:5000/submit/sat_image_extraction). This might just be a firewall thing.