-
Notifications
You must be signed in to change notification settings - Fork 449
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
Resolv hostname problem #59
Comments
@ismaelvacco This error happens when your previous redis operation failed with a fatal error (in that case, the underlying cosocket is automatically closed). The fix is simple: just always properly handle the errors of every redis opreations that could possibly fail in your own Lua code. |
I too have encountered this issue. The issue seems to be completely related to the hostname not resolving, as interchanging the ip address of the hostname will also resolve the problem. However in the case of aws - hostnames are preferable because we are using cname records that point to amazon's elasticache instances, which the underlying ip address is not guaranteed to be fixed. |
+1 @agentzh I think you misunderstood the OP - this is related to hostname resolution vs hard coded IP, meaning the original socket can't even be set up... |
@ismaelvacco I have a fix for this, and its very clean. My best guess is that Lua does not know how to resolve the hostname. We are inside a VPC, we have set our vpc to use the 10.8.0.0/16 address range. In my /etc/nginx/nginx.conf, i added the following line in the nginx conf file: The basis for that line comes from the following url: |
@jonhatalla Yes, you need to configure the "resolver" directive properly. If you handle errors properly you should see the error returned by the earlier |
Hi everyone,
When set the ip to create a connect with my redis server, it work right. But if i set the hostname of my redis server, i get follow message:
2015/05/18 19:33:13 [error] 12297#0: *2592 attempt to send data on a closed socket: u:000000000243ABA8, c:0000000000000000, ft:8 eof:0, client: 179.189.133.35, server
The code that work right:
The code that break down:
The text was updated successfully, but these errors were encountered: