aggr-server icon indicating copy to clipboard operation
aggr-server copied to clipboard

Unauthorized error occurred

Open matthewwwz opened this issue 3 years ago • 2 comments

Hey, after installing the server and Influxdb and running node index, it's impossible to log in!

[storage/influx] connecting to localhost:8086 [storage/influx] A 401 Unauthorized error occurred: {"code":"unauthorized","message":"Unauthorized"}... retrying in 1s

matthewwwz avatar Feb 17 '22 13:02 matthewwwz

Have you installed influx 2 ? or 1

This repo only works with influx 1.* and in that case maybe http auth is enabled on this influx instance

{
... in the config.json ...
"influxHost": "http://user:password@host"
}

I am planning to upgrade to influx 2 here I have yet to get back to it lol

Tucsky avatar Feb 17 '22 13:02 Tucsky

Have you installed influx 2 ? or 1

This repo only works with influx 1.* and in that case maybe http auth is enabled on this influx instance

{
... in the config.json ...
"influxHost": "http://user:password@host"
}

I am planning to upgrade to influx 2 here I have yet to get back to it lol

Wouldn't switching to timescaledb make more sense, since it enables horizontal scaling via "chunking" (it's similar to sharding; afaik influxdb only supports sharding in the pricey enterprise version)?

VIEWVIEWVIEW avatar Feb 20 '22 18:02 VIEWVIEWVIEW

Hello all,

I had the same issue when I tried to spin InfluxdDB. I tried to install locally but could only find version 2.x. i decided to give docker a try but it seemed to pull the latest version and not the 1.8 with whicch this project is compatbile as of Today.

Thus, I went ahead and "fixed" the Docker implementation by specifying the InfluxDB version to 1.8.10. I also added a config file for influxDB service to be able to enable/disable auth. In order to use an auth'd instance, there's a bit more work to do such as adding INFLUX user env variable and updating documentation or docker-compose.

Alos, the code is already db agnostic and that means we could use: 'InfluxV1', 'InfluxV2', or TimeScaleDB.

We'd need to add those services in the docker-compose config file.

If you have some expertise in TimeScaleDB, you are welcome to prepare a PR. I could start it off and create a specific docker-compose file for the above setup.

Here's the current PR that fixes influx v1.8.10 - it's a WIP:

Trying to improve the redaction or write some tutorials. https://github.com/Tucsky/aggr-server/pull/13

Ping @Tucsky

Reviews welcome. Cheers,

adeacetis avatar Mar 02 '23 04:03 adeacetis

@matthewwwz did you manage to run aggr-server ? Can we close this issue ?

adeacetis avatar Mar 16 '23 13:03 adeacetis