redis / redis/node-redis

cannot connect with tls to Redis Cloud

Open
#2,030 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
TypeScript
Stars
17.6k
Forks
2k
Avg merge
2d 3h
Merged PRs (30d)
40

Description

I followed both examples with the credentials generated here (tried with both "enforce client authentication" options)

I am able to successfully using redis-cli

But when I try to login using node-redis:

createClient({
      url,
      socket: {
        tls: true,
        cert: readFileSync(
          'redislabs_credentials/redislabs_user.crt',
        ),
        ca: readFileSync(
          'redislabs_credentials/redislabs_ca.pem',
        ),
      },
    });

I get:

ReplyError: ERR unencrypted connection is prohibited
    at parseError (/Users/mayas/bold/core/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/Users/mayas/bold/core/node_modules/redis-parser/lib/parser.js:302:14)

Environment:

  • Node.js Version: 16.3
  • Redis Server Version: 6.2.3
  • Node Redis Version: 4.0.4
  • Platform: Mac OS 11.4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the TLS examples in docs/client-configuration.md and the createClient configuration shown in the report; compare the supplied certificate options with the successful redis-cli connection. Trace the reported error through redis-parser and verify the client can connect to Redis Cloud without receiving “ERR unencrypted connection is prohibited.”

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, redis, typescript
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.