Open EizFeren opened 3 years ago
const redis = require('redis');
const tls = require('tls');
// Redis Client Configuration
const redisClient = redis.createClient({
host: 'your-digital-ocean-redis-hostname', // Replace with your Digital Ocean Redis hostname
port: 25061, // Replace with your Redis port
password: 'your-redis-password', // Replace with your Redis password
tls: {
rejectUnauthorized: false
}
});
redisClient.on('error', err => {
console.error('ERR:REDIS:', err);
});
redisClient.on('connect', () => {
console.info('INFO:REDIS:Connected!');
});
// Example Usage
redisClient.set('key', 'value', redis.print);
redisClient.get('key', (err, reply) => {
if (err) {
console.error('ERR:REDIS GET:', err);
} else {
console.log('Redis GET reply:', reply);
}
});
Issue
Can't use Digital Ocean Redis instance with
SSL_VERIFY_NONE
. When client does request to redis instance, this request doesn't respond few minutes without error.If you know how it can be correctly done, please describe.
Environment
10.19.0
6.0.9
Digital Ocean (for Redis), Ubuntu 20.04 (for Node.js app)