[openamq-dev] Multi-threaded connection requests fail?

Elli Barasch comptonsw at comcast.net
Thu Nov 8 23:12:56 CET 2007


Weird stuff:
Note that the server is binding to 127.0.1.1:5672.

Here is the content of my Ubuntu hosts file.

127.0.0.1    localhost
127.0.1.1    elli-ubuntu

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

If I override the "localhosts" default argument to "127.0.0.1" via the 
-s argument, my connections succeed.  If I use the default "localhosts" 
name, the connection fails...
Any thoughts?

Elli

Elli Barasch wrote:
> Here are traces from my app and the server.  Note that I removed the 
> main thread connection_new call.  Only the thread
> functions themselves make the connection_new requests.
>
> Elli
>
> --------------        Client   -------------
>
> 14:51:16: Thread OS0 starting
>
> 14:51:16: TC Thread 1 starting
>
> 14:51:16:    1> amq_client_agent/Connection      Initialise-Connection:
> 14:51:16:    1> amq_client_agent/Connection         (--) 
> Connect                         ->Negotiate-Connection
> 14:51:16:    1> amq_client_agent/Connection                + 
> Set-No-Connection-Error
> 14:51:16:    1> amq_client_agent/Connection                + 
> Connect-To-Server
> 14:51:16: E: Thread TC1 could not connect to localhost
> 14:51:16: Only a single thread may register signals.
> 14:51:16: Only a single thread may register signals.
> 14:51:16:    2> amq_client_agent/Connection      Initialise-Connection:
> 14:51:16:    2> amq_client_agent/Connection         (--) 
> Connect                         ->Negotiate-Connection
> 14:51:16:    2> amq_client_agent/Connection                + 
> Set-No-Connection-Error
> 14:51:16:    2> amq_client_agent/Connection                + 
> Connect-To-Server
>
> --------------------------   Server  -------------------
>
> 2007-11-08 14:50:47: W: security warning - logins use default passwords
> 2007-11-08 14:50:47:    6> amq_server_agent/Master          
> Initialise-Master:
> 2007-11-08 14:50:47:    6> amq_server_agent/Master             (--) 
> Ok                              ->New-Connection
> 2007-11-08 14:50:47:    6> amq_server_agent/Master                    
> + Initialise-Server
> 2007-11-08 14:50:47: I: server binding to 127.0.1.1:5672
> 2007-11-08 14:50:47:    6> amq_server_agent/Master                    
> + Allow-Thread-To-Settle
> 2007-11-08 14:50:47: I: server starting in non-clustered mode
> 2007-11-08 14:50:48:    6> amq_server_agent/Master                    
> + Report-Server-Ready
> 2007-11-08 14:50:48: I: server ready for incoming AMQ connections
> 2007-11-08 14:50:48:    6> amq_server_agent/Master                    
> + Accept-Connection
> 2007-11-08 14:51:48: I: cnn=0 msg=0 mem=0K/4387K exc=8 que=0 csm=0 
> bnd=0 adx=0 idx=8 map=0
> 2007-11-08 14:51:48: I: qcn=0 cnq=0
> 2007-11-08 14:51:53:    6> amq_server_agent/Master          
> Initialise-Master:
> 2007-11-08 14:51:53:    6> amq_server_agent/Master             (--) 
> Interrupt                       ->Shutting-Down
> 2007-11-08 14:51:53:    6> amq_server_agent/Master                    
> + Report-Server-Interrupted
> 2007-11-08 14:51:53: I: caught signal, shutting down
> 2007-11-08 14:51:53:    6> amq_server_agent/Master                    
> + Shut-Down-Active-Connections
> 2007-11-08 14:51:53:    6> amq_server_agent/Master          Shutting-Down:
> 2007-11-08 14:51:53:    6> amq_server_agent/Master             (--) 
> Finished                        ->
> 2007-11-08 14:51:53:    6> amq_server_agent/Master                    
> + Shut-Down-Server
> 2007-11-08 14:51:53:    6> amq_server_agent/Master          <Destroyed>
> 2007-11-08 14:51:53: I: shutdown is complete
>
>
>
>
>
>
> Martin Lucina wrote:
>> On 8/11/2007, "Martin Sustrik" <sustrik at imatix.com> wrote:
>>
>>   
>>>> I have been stepping through the code.  Does GDB get in the way?
>>>>       
>>> Probably not, unless you've been pausing at specific point in
>>> amq_connection_new function for longer than 30 secs.
>>>     
>>
>>
>> It'll get in the way sooner than that, if you're using heartbeats.
>>
>> The default with MT builds is to use a heartbeat of 2 seconds, and if you
>> miss out 4 heartbeats (i.e. 8 seconds) the server will drop the
>> connection.
>>
>> -mato
>> _______________________________________________
>> openamq-dev mailing list
>> openamq-dev at lists.openamq.org
>> http://lists.openamq.org/mailman/listinfo/openamq-dev
>>
>>   
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openamq.org/pipermail/openamq-dev/attachments/20071108/d61a3b53/attachment.htm 


More information about the openamq-dev mailing list