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

Invalid --insecure flag when connecting to Redis database #13731

Closed
gabrielcorado opened this issue Jun 22, 2022 · 1 comment · Fixed by #13843
Closed

Invalid --insecure flag when connecting to Redis database #13731

gabrielcorado opened this issue Jun 22, 2022 · 1 comment · Fixed by #13843
Assignees
Labels
bug database-access Database access related issues and PRs db/redis

Comments

@gabrielcorado
Copy link
Contributor

gabrielcorado commented Jun 22, 2022

When connecting to a Redis instance with the insecure flag it returns an error related to the flag not being recognized. Looking at the logs, it seems that the tsh flag is being passed to the redis-cli command, causing the error.

$ tsh db connect --insecure redis
Unrecognized option or bad number of args for: '--insecure'
ERROR: exit status 1
$ tsh db connect -d --insecure redis
...
DEBU [TSH]       Starting local proxy tsh/db.go:517
DEBU [TSH]       /usr/bin/redis-cli -h localhost -p 44949 --tls --key /home/ubuntu/.tsh/keys/teleport/alice --cert /home/ubuntu/.tsh/keys/teleport/alice-db/teleport/redis-x509.pem --insecure --cacert /home/ubuntu/.tsh/keys/teleport/cas/teleport.pem tsh/db.go:681
Unrecognized option or bad number of args for: '--insecure'

ERROR REPORT:
Original Error: *exec.ExitError exit status 1
Stack Trace:
        /home/ubuntu/teleport/tool/tsh/db.go:687 main.onDatabaseConnect
        /home/ubuntu/teleport/tool/tsh/tsh.go:920 main.Run
        /home/ubuntu/teleport/tool/tsh/tsh.go:396 main.main
        /usr/lib/go-1.18/src/runtime/proc.go:250 runtime.main
        /usr/lib/go-1.18/src/runtime/asm_amd64.s:1571 runtime.goexit
User Message: exit status 1

Bug details:

  • Teleport version: branch/v10
  • Redis CLI version: 6.0.16
  • Recreation steps:
    • tsh db login --insecure redis: Login into a Redis database with insecure set;
    • tsh db connect --insecure redis: Connect into the Redis database with insecure set;
@gabrielcorado gabrielcorado added bug database-access Database access related issues and PRs db/redis labels Jun 22, 2022
@greedy52
Copy link
Contributor

--insecure is not supported on redis-cli 6.0 or older. Will add a proper message seeing these errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug database-access Database access related issues and PRs db/redis
Projects
None yet
2 participants