influxdata / helm-charts

Official Helm Chart Repository for InfluxData Applications
MIT License
233 stars 330 forks source link

Could not sign in #642

Open gioargyr opened 6 months ago

gioargyr commented 6 months ago

Hello,

I installed InfluxDB on Kubernetes by using the provided Helm chart. (https://helm.influxdata.com/)

I run the following commands: helm repo add influxdata https://helm.influxdata.com/ helm install influxdb2 influxdata/influxdb2 --values my-values.yaml

In the values I just defined the persistence volume, nothing else. it's the following:

```
persistence:
  enabled: true
  useExisting: true
  storageClass: default
```

However, even though I use admin as a username and I am pretty sure I use the correct password when I try to log in through GUI, I always get "Could not sign in", while the message in the logs is always the same: lvl=error msg="api error encountered" log_id=0owjCPE0000 handler=session error="unauthorized access"

I found that the docker image you are using is the influxdb:2.7.4-alpine I used it on my personal machine. The first time I logged in I had to create a primary account. I created it, logged in, logged out and when I re-logged in everything was fine. From what I see, when InfluxDB is installed by the Helm chart, a similar procedure is programmed to run as an initial process. Is it possible that it's not run successfully?

Chart version 2.1.2 App Version 2.7.4

gioargyr commented 6 months ago

I solved it!

As it seems, the problem is in the password I defined for admin. It needs to be extra powerful. If not, you are not allowed to log in.

I used one created from InfluxDB and it worked. I hope there is a place where InfluxDB documents what is the allowed type of password.

VibhavDeo commented 5 months ago

Hey, getting the same problem after changing the service type to load balancer.

service:
  type: LoadBalancer
  port: 80
  targetPort: 8086

Error: ts=2024-06-03T17:16:30.737580Z lvl=error msg="api error encountered" log_id=0pZmRW20000 handler=session error="unauthorized access"

gioargyr commented 5 months ago

However, is there a Load Balancer available in your cluster? Do you have the same result if you have the default values for service? (ClusterIP in this case)

VibhavDeo commented 5 months ago

Yes, I have a load balancer available in my cluster. I am not using a ClusterIP as I wanted to access the influxDB publicly.

I also managed to set up InfluxDB manually without the helm chart and got it working with the LoadBalancer.