1

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):

_socket  = amqp_tcp_socket_new( _connection );

if( _socket == NULL )
{
    log_error( "connect(): can't create a new socket");
    return false;
}

status = amqp_socket_open_noblock( _socket, _host.c_str(), _port, &_openTimeOut);

if( status  !=  AMQP_STATUS_OK  )
{
    log_error( "connect(): can't open socket: %d", status);
    return false;
}

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() or connect() 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 successful 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 issuing a RST to the server.

JonathanDavidArndt
  • 1,414
  • 3
  • 20
  • 29
Pipetus
  • 111
  • 5

0 Answers0