Open pipetus opened 6 years ago
-13 = AMQP_STATUS_TIMEOUT
- this means that rabbitmq-c was unable to resolve the hostname and open a connection before the specified timeout.
-9 = AMQP_STATUS_SOCKET_ERROR
- this means that the library had an issue handling a socket. It may worth looking at errno
after getting this back. strace
may also be helpful in narrowing down which socket call is failing.
In this function status = amqp_socket_open_noblock( _socket, _host.c_str(), _port, &_openTimeOut);
Can i use DNS instead of ip address?
Hi,
I'm running rabbitmq-c v0.8.0 on an OpenWRT (ar71xx), in a device acting as a client in a LAN. The same system seems to behave differently behind different routers.
The problems I'm seeing are (this is part of my code):
and here, not sure depending on what, the error returned is either -13 o -9. After digging into rabbitmq-c code, I understand these two return codes mainly rely on either
poll()
orconnect()
calls, but I cannot see which of the possible cases could be happening here.On the other hand, as I mentioned, this happens behind two different routers; in one of them (the successfull one), I see that after the DNS queries to get the host ip the server has, a the client sends TCP SYN and ACK'ed by the server, whilst in the other, the client sends SYN, server ACKs and client sends RST right after, which could mean it indicates it's closing the connection.
I'd like to understand in which cases a rabbitmq client could be issueing a RST to the server.
Thanks, JP