Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboarding API ignores errors when trying to set user password #20088

Closed
htebib opened this issue Nov 18, 2020 · 9 comments · Fixed by #20317
Closed

Onboarding API ignores errors when trying to set user password #20088

htebib opened this issue Nov 18, 2020 · 9 comments · Fixed by #20317
Assignees
Labels
area/2.x OSS 2.0 related issues and PRs kind/bug

Comments

@htebib
Copy link

htebib commented Nov 18, 2020

Hello,

I'm using influxdb 2.0 but i coud not sign in. i get this error in logs :
error api error encountered {"log_id": "0QYiUwu0000", "handler": "session", "error": "unauthorized access"}

Could you please help.

Best Regards.

@danxmoran danxmoran added the area/2.x OSS 2.0 related issues and PRs label Nov 25, 2020
@danxmoran danxmoran self-assigned this Nov 25, 2020
@danxmoran
Copy link
Contributor

Hi @htebib, some clarifying / sanity-checking questions to help me debug:

  • What version of 2.0 are you using? We've fixed a number of auth-related bugs since the GA release, could you try the latest (2.0.2 now, soon 2.0.3) and see if you still hit the problem?
  • If you run influxd with --log-level debug, what messages do you see?
  • When you say you couldn't sign in, do you mean through the UI? Or are you hitting auth errors while trying to use the API?

@htebib
Copy link
Author

htebib commented Nov 30, 2020

hello,

  • Thank you for your answer. Actually i'm using influxd 2.0.1.
  • this is the messages when i run influxd --log-level debug
    2020-11-30T09:20:54.829151Z info Welcome to InfluxDB {"log_id": "0Qn77SBG000", "version": "2.0.1", "commit": "37cc047133", "build_date": "2020-11-11T03:53:31Z"}
    2020-11-30T09:20:54.946357Z info Resources opened {"log_id": "0Qn77SBG000", "service": "bolt", "path": "/root/.influxdbv2/influxd.bolt"}
    2020-11-30T09:20:54.993956Z debug buckets find {"log_id": "0Qn77SBG000", "store": "new", "took": "0.177ms"}
    2020-11-30T09:20:54.993986Z info Checking InfluxDB metadata for prior version. {"log_id": "0Qn77SBG000", "bolt_path": "/root/.influxdbv2/influxd.bolt"}
    2020-11-30T09:20:54.994062Z info Using data dir {"log_id": "0Qn77SBG000", "service": "storage-engine", "path": "/root/.influxdbv2/engine/data"}
    2020-11-30T09:20:54.994086Z info Compaction settings {"log_id": "0Qn77SBG000", "service": "storage-engine", "max_concurrent_compactions": 1, "throughput_bytes_per_second": 50331648, "throughput_bytes_per_second_burst": 50331648}
    2020-11-30T09:20:54.994099Z info Open store (start) {"log_id": "0Qn77SBG000", "service": "storage-engine", "op_name": "tsdb_open", "op_event": "start"}
    2020-11-30T09:20:55.012906Z info Opened shard {"log_id": "0Qn77SBG000", "service": "storage-engine", "op_name": "tsdb_open", "index_version": "tsi1", "path": "/root/.influxdbv2/engine/data/8ad66bdba422365a/autogen/1", "duration": "16.368ms"}
    2020-11-30T09:20:56.201203Z info Opened shard {"log_id": "0Qn77SBG000", "service": "storage-engine", "op_name": "tsdb_open", "index_version": "tsi1", "path": "/root/.influxdbv2/engine/data/8ad66bdba422365a/autogen/2", "duration": "1204.666ms"}
    2020-11-30T09:20:56.201384Z info Open store (end) {"log_id": "0Qn77SBG000", "service": "storage-engine", "op_name": "tsdb_open", "op_event": "end", "op_elapsed": "1207.285ms"}
    2020-11-30T09:20:56.201412Z info Starting retention policy enforcement service {"log_id": "0Qn77SBG000", "service": "retention", "check_interval": "30m"}
    2020-11-30T09:20:56.201429Z info Starting precreation service {"log_id": "0Qn77SBG000", "service": "shard-precreation", "check_interval": "10m", "advance_period": "30m"}
    2020-11-30T09:20:56.201494Z info Starting query controller {"log_id": "0Qn77SBG000", "service": "storage-reads", "concurrency_quota": 10, "initial_memory_bytes_quota_per_query": 9223372036854775807, "memory_bytes_quota_per_query": 9223372036854775807, "max_memory_bytes": 0, "queue_size": 10}
    2020-11-30T09:20:56.202239Z info Configuring InfluxQL statement executor (zeros indicate unlimited). {"log_id": "0Qn77SBG000", "max_select_point": 0, "max_select_series": 0, "max_select_buckets": 0}
    2020-11-30T09:20:56.494925Z info Listening {"log_id": "0Qn77SBG000", "transport": "http", "addr": ":8086", "port": 8086}
    2020-11-30T09:20:56.494945Z info Starting {"log_id": "0Qn77SBG000", "service": "telemetry", "interval": "8h"}
    2020-11-30T09:21:06.492290Z debug Request {"log_id": "0Qn77SBG000", "service": "http", "method": "GET", "host": "10.10.96.39:8086", "path": "/metrics", "query": "", "proto": "HTTP/1.1", "status_code": 200, "response_size": 2097, "content_length": 0, "referrer": "", "remote": "10.10.96.39:37292", "user_agent": "Go-http-client", "took": "1.194ms", "body": ""}

-I couldn't sign in the both through the UI and the API

@danxmoran
Copy link
Contributor

Thanks @htebib! I don't really know why this would be failing. Are you comfortable sharing the username/password combo you're using to initialize the DB via influx setup / influxd upgrade? I'd like to try reproducing with the same values.

I'm @Daniel Moran in the InfluxDB Community Slack space, if you'd prefer to DM me.

@BondAnthony
Copy link
Contributor

I just ran into a similar issue. When you use a weak password during the cli setup process the api will allow the setup flow to continue. However when you attempt to login through the UI it will fail to accept your password.

@danxmoran danxmoran changed the title Could not sign in : error api error encountered {"log_id": "0QYiUwu0000", "handler": "session", "error": "unauthorized access"} APIs don't validate password strength for new users, but CLI / UI do Dec 2, 2020
@danxmoran danxmoran changed the title APIs don't validate password strength for new users, but CLI / UI do Noninteractive CLI / APIs don't validate password strength for new users, but interactive CLI / UI do Dec 2, 2020
@danxmoran danxmoran changed the title Noninteractive CLI / APIs don't validate password strength for new users, but interactive CLI / UI do "influx setup" doesn't validate password strength when using a CLI option to set password Dec 2, 2020
@htebib
Copy link
Author

htebib commented Dec 2, 2020

Hello,
Actually the error of authentication is resolved without any changes. but i have another issue: i run influxdb with this command influxd and i can access to the server through UI but after a while i can't access unless i run inluxd again. Do you have an idea to fix this problem.

Best Regards,

@danxmoran
Copy link
Contributor

danxmoran commented Dec 2, 2020

@htebib can you open a separate issue with your follow-up question? Happy to keep helping, it just makes tracking easier on our end.

Glad to hear the auth problem resolved itself for you 😄 I'm going to keep this issue open to track the related problem @BondAnthony found, since I'm able to reproduce it.

@htebib
Copy link
Author

htebib commented Dec 7, 2020

Hello,
Thank you @danxmoran for your support. i will open a sperate issue.

Best Regards,

@htebib
Copy link
Author

htebib commented Dec 7, 2020

Hello @danxmoran ,

Do you have an URL to download influxDB 2.0.2. Thank.

Regards,

@danxmoran
Copy link
Contributor

@htebib it's available on our downloads page: https://portal.influxdata.com/downloads/

@danxmoran danxmoran assigned danxmoran and unassigned danxmoran Dec 8, 2020
@danxmoran danxmoran changed the title "influx setup" doesn't validate password strength when using a CLI option to set password "influx setup" API ignores errors when trying to set user password Dec 14, 2020
@danxmoran danxmoran changed the title "influx setup" API ignores errors when trying to set user password Onboarding API ignores errors when trying to set user password Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/2.x OSS 2.0 related issues and PRs kind/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants