Skip to content

InfluxDB access tokens may come out of sync with startup.conf #23

Closed
@PeterHawk

Description

Running the test_server.py after following instructions resulted in errors:

write_api.write(bucket, org, point)

(Pdb) config["influxdb"]

ConfigTree([('url', 'http://localhost:8086'), ('token', '-g7q1xIvZqY8BA82zC7uMmJS1zeTj61SQjDCY40DkY6IpPBpvna2YoQPdSeENiekgVLMd91xA95smSkhhbtO7Q=='), ('org', 'incubator'), ('bucket', 'incubator')])

(Pdb) n

influxdb_client.rest.ApiException: (401)

Reason: Unauthorized

HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Platform-Error-Code': 'unauthorized', 'Date': 'Wed, 31 Aug 2022 09:35:17 GMT', 'Content-Length': '55'})

HTTP response body: {"code":"unauthorized","message":"unauthorized access"}

/Users/au276283/phd/incubator-self-adapt/software/digital_twin/data_access/influxdbserver/test_server.py(34)()

-> write_api.write(bucket, org, point)

Cause was the use of an invalid access token and fixed by updating startup.conf with the valid one found in InfluxDB->Tokens

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions