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
Servname not supported for ai_socktype (48) #352
Comments
Not sure how to reproduce this in a testable manner, but might be worth double checking the getaddrinfo related changes. |
Anything custom in your CentOS 6.4 configuration with regard to network stack? Do you have an IPv6 addr enabled? Can I get a stacktrace with a little more context around the exception so i can catch it? |
Hmm apparently this is the report port being parsed in as a string from googling a bit and reading blogposts on this exception. The only odd thing is Pika should be checking to make sure the port is an int. Are you changing this via attribute in your code by any chance? |
IPv6 should is disabled, and nothing out of the ordinary. Yea, I have port=5672 set in the ConnectionParameters. It is odd as I have multiple connections running with identical parameters at any given time, and I have only seen it happen to one of those connections, never multiple at the same time. |
I am now able to reproduce it on my VM running CentOS 6.4. Here is the stacktrace.
All I do to reproduce this is open and close a large amount of connections. Eventually I will run into this exception on my CentOS boxes. |
This is pretty odd, few things:
In theory it may be a problem with IPv6 being disabled but the first entry in hosts for localhost. I'll add an exception handler for this at the right spot, but it'd be good to know what the issue is that is causing it. |
It is indeed not a major issue, since I can simply catch it and open a new connection, but I have reproduced this on multiple servers. The real odd thing is that it isn't happening on earlier versions. It does also not make any difference if I use localhost, 127.0.0.1 or the actual IP address of the blade. |
The fact that we're using this when socket.SOCK_STREAM and the documentation at http://docs.python.org/2/library/socket.html#socket.getprotobyname indicates it is probably not needed. I'll dig into some of my IP books to see if this is the case. |
So in my testing it appears this happens when there is a DNS resolution failure, oddly enough. I've refactored the code a small bit and added logging when this happens and why. If you can test with this latest patch, it should detail why the problem is happening in pika.adapters.base_connection at the CRITICAL logging level. |
It does indeed look like removing getprotobyname resolved this. |
I started seeing this message in the logs since I upgraded to 0.9.13. It is unfortunately a difficult bug to reproduce, as it happens about once per every couple of hundred connections opened and closed.
My guess is that this it could be related to the commit(s) introducing IPv6 support 61ecac445bf5a71a5f88381585b76246d50558a5We
I downgraded to 0.9.8 a couple of hours ago, and it hasn't happened since.
Running CentOS 6.4 with Python 2.7.3 and RabbitMQ 3.1 on localhost.
The text was updated successfully, but these errors were encountered: