Thank you for taking the time to confirm.
I am currently creating a Node application using AzureRedis.
I have placed the app in that as an API to the AppService.
I am trying to connect to Redis from the deployed AppService through a managed service.
However, in the following source
await redisClient.connect();
I always get a TimeOut error and cannot connect.
I would like to know if anyone knows anything about this. Best regards.
The error code and source are shown below
const accessToken = await credential.getToken("https://redis.azure.com/.default");
const credential = new DefaultAzureCredential();
const redisClient = redis.createClient({
url: `rediss://${process.env.REDIS_HOST_NAME}:6380`,
username: "azure",
password: accessToken.token,
pingInterval: 100000,
socket: {
tls: true,
keepAlive: 0,
connectTimeout: 10000,
},
});
// Connect to Redis
await redisClient.connect();
Error getting file from Azure Files or setting value in Redis: Connection timeout
Error: ReferenceError: redisClient is not defined