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

Error Connecting to Elasticache Redis Serverless - How to use TextWriter for Details #2710

Open
JRRan64 opened this issue May 3, 2024 · 2 comments

Comments

@JRRan64
Copy link

JRRan64 commented May 3, 2024

Id like to use an Elasticache Redis Serverless instance from a Lambda for "aggregating" data as it is ingested (write-thru cache).

StringWriter sw = new StringWriter();
ConfigurationOptions redCfgOptions = new ConfigurationOptions
{
EndPoints =
{
{ envRedisEndPoint, envRedisPort }
},
Ssl = true,
ConnectRetry = 3
}

ConnectionMutliplexer redis = ConnectionMultiplexer.Connect(redCfgOption, sw);
context.Logger.LogInformation("Connected !")

Elasticache Redis is configured and a .Net Lambda is deployed with a StringWriter when trying to connect.
I never get i get the following when it tries

2024-05-03T16:36:45.046Z 9349f934-4fe6-5d45-90dd-a79b5b290b8e fail It was not possible to connect to the redis server(s). Error connecting right now. To allow this multiplexer to continue retrying until it's able to connect, use abortConnect=false in your connection string or AbortOnConnectFail=false; in your code.

So I will try AbortOnConnectFail=false but what I really want first is what am I doing wrong with StringWriter (impl of TextWriter abstract)

@JRRan64
Copy link
Author

JRRan64 commented May 3, 2024

Let me know if there are useful details I can add but my main concern is that I am not using TextWriter (StringWriter) correctly. I was hoping that would tell me more about what I am doing wrong. So far, it hasn't changed anything.

@NickCraver
Copy link
Collaborator

The StringWriter you passed into connect, you'll want to dump it for a full connection log :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants