-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
const config_sentinel = {
sentinels: sentinels,
sentinelPassword: '123456',
sentinelTLS: {
ca: 'cert',
rejectUnauthorized: false,
servername: 'sentinel-pro.svc.local'
},
password: '123456',
name: 'mymaster',
role: 'master',
enableTLSForSentinelMode: true,
tls: {
ca: 'cert',
rejectUnauthorized: false,
servername: 'redis-master-pro.svc.local'
},
}
We have 1 Master and 2 slaves
When Sentinel pick a node Redis to create a connection with TLS. At that time we can not use "config_sentinel.tls.servername" because server info may different to our config.
So, i try modify at "node_modules\ioredis\built\connectors\SentinelConnector\index.js":
if (this.options.enableTLSForSentinelMode && this.options.tls) {
debug("Update TLS servername >>>", resolved.host);
**this.options.tls.servername = resolved.host;**
Object.assign(resolved, this.options.tls);
this.stream = (0, tls_1.connect)(resolved);
this.stream.once("secureConnect", this.initFailoverDetector.bind(this));
I hope this issue can be fixed from next Pull Request!
Thanks!
Metadata
Metadata
Assignees
Labels
No labels