hiredis icon indicating copy to clipboard operation
hiredis copied to clipboard

connection error

Open XieChen10983 opened this issue 3 years ago • 2 comments

redisContext *c = redisConnect("127.0.0.1", 6379); if (c == NULL || c->err) { if (c) { printf("Error: %s\n", c->errstr); // handle error } else { printf("Can't allocate redis context\n"); } }

testing the connection on ubuntu18 but there is always an err, Can't allocate redis context.

XieChen10983 avatar May 25 '21 14:05 XieChen10983

It's really hard to say without more context.

That code runs for me just fine.

Can you post your full program along with how you're compiling it?

michael-grunder avatar May 25 '21 17:05 michael-grunder

Thanks for your attention. I will show the whole process in the attached docx file. Wish to hear from you soon.

------------------ 原始邮件 ------------------ 发件人: "redis/hiredis" @.>; 发送时间: 2021年5月26日(星期三) 凌晨1:20 @.>; @.@.>; 主题: Re: [redis/hiredis] connection error (#955)

It's really hard to say without more context.

That code runs for me just fine.

Can you post your full program along with how you're compiling it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

XieChen10983 avatar May 26 '21 00:05 XieChen10983

Closing this since there's no activity for some time.

michael-grunder avatar Sep 01 '22 03:09 michael-grunder