Raphael Simon | 1 Oct 2011 06:54
Gravatar

Re: Number of connections and memory usage

Thank you, the log file being used is the right one, I was wondering though if there was a way to double check the 'sndbuf' and 'recbuf' values used to initialize the listeners (sanity check). We are still seeing 200KB / connection memory usage...

--
Raphael. 

On Thu, Sep 29, 2011 at 11:32 PM, Matthias Radestock <matthias-mQ7lE4MOPXtWk0Htik3J/w@public.gmane.org> wrote:
Raphael,


On 30/09/11 01:29, Raphael Simon wrote:
Thank you Matthias. We deployed that config to production but haven't
seen any real change... How can we tell if RabbitMQ is indeed using
these settings?

See http://www.rabbitmq.com/configure.html#verify-configuration

When rabbit starts up it tells you what config file it is using, e.g.

+---+   +---+
|   |   |   |
|   |   |   |
|   |   |   |
|   +---+   +-------+
|                   |
| RabbitMQ  +---+   |
|           |   |   |
| v%%VSN%%  +---+   |
|                   |
+-------------------+
AMQP 0-9-1 / 0-9 / 0-8
Copyright (C) 2007-2011 VMware, Inc.
Licensed under the MPL.  See http://www.rabbitmq.com/

node           : rabbit <at> i
app descriptor : /home/matthias/projects/rabbitmq-umbrella/rabbitmq-server/scripts/../ebin/rabbit.app
home dir       : /home/matthias
config file(s) : (none)
cookie hash    : FtUD/+++wj4PBf6gRlNEsA==
log            : /tmp/rabbit <at> i.log
sasl log       : /tmp/rabbit-8hGlKCQGe16Eb1ujJ5R0Fw@public.gmane.org
database dir   : /tmp/rabbitmq-rabbit-mnesia
erlang version : 5.8.4


Note the "config files" line above - in your case that should contain the filename of the config file.


Matthias.

<div>
<p>Thank you, the log file being used is the right one, I was wondering though if there was a way to double check the 'sndbuf' and 'recbuf' values used to initialize the listeners (sanity check). We are still seeing 200KB / connection memory usage...<br><br>--<br>Raphael.&nbsp; <br><br></p>
<div class="gmail_quote">On Thu, Sep 29, 2011 at 11:32 PM, Matthias Radestock <span dir="ltr">&lt;<a href="mailto:matthias@...">matthias@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
Raphael,<div class="im">
<br><br>
On 30/09/11 01:29, Raphael Simon wrote:<br><blockquote class="gmail_quote">
Thank you Matthias. We deployed that config to production but haven't<br>
seen any real change... How can we tell if RabbitMQ is indeed using<br>
these settings?<br>
</blockquote>
<br>
</div>
See <a href="http://www.rabbitmq.com/configure.html#verify-configuration" target="_blank">http://www.rabbitmq.com/configure.html#verify-configuration</a><br><br>
When rabbit starts up it tells you what config file it is using, e.g.<br><br>
+---+ &nbsp; +---+<br>
| &nbsp; | &nbsp; | &nbsp; |<br>
| &nbsp; | &nbsp; | &nbsp; |<br>
| &nbsp; | &nbsp; | &nbsp; |<br>
| &nbsp; +---+ &nbsp; +-------+<br>
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>
| RabbitMQ &nbsp;+---+ &nbsp; |<br>
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; | &nbsp; |<br>
| v%%VSN%% &nbsp;+---+ &nbsp; |<br>
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>
+-------------------+<br>
AMQP 0-9-1 / 0-9 / 0-8<br>
Copyright (C) 2007-2011 VMware, Inc.<br>
Licensed under the MPL. &nbsp;See <a href="http://www.rabbitmq.com/" target="_blank">http://www.rabbitmq.com/</a><br><br>
node &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : rabbit <at> i<br>
app descriptor : /home/matthias/projects/rabbitmq-umbrella/rabbitmq-server/scripts/../ebin/rabbit.app<br>
home dir &nbsp; &nbsp; &nbsp; : /home/matthias<br>
config file(s) : (none)<br>
cookie hash &nbsp; &nbsp;: FtUD/+++wj4PBf6gRlNEsA==<br>
log &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: /tmp/rabbit <at> i.log<br>
sasl log &nbsp; &nbsp; &nbsp; : /tmp/rabbit@...<br>
database dir &nbsp; : /tmp/rabbitmq-rabbit-mnesia<br>
erlang version : 5.8.4<br><br><br>
Note the "config files" line above - in your case that should contain the filename of the config file.<br>
<br><br>
Matthias.<br>
</blockquote>
</div>
<br>
</div>
Matthias Radestock | 1 Oct 2011 09:36
Favicon

Re: Number of connections and memory usage

Raphael,

On 01/10/11 05:54, Raphael Simon wrote:
> Thank you, the log file being used is the right one, I was wondering
> though if there was a way to double check the 'sndbuf' and 'recbuf'
> values used to initialize the listeners (sanity check). We are still
> seeing 200KB / connection memory usage...

You can also run 'rabbitmqctl environment'.

You are connecting via AMQP, right, rather than, say, STOMP?

It's possible that the O/S is configured with large buffer sizes. Check

sysctl net.ipv4.tcp_rmem
sysctl net.ipv4.tcp_wmem

and perhaps adjust the settings.

Regards,

Matthias.
Alex Grönholm | 1 Oct 2011 14:57
Picon

Problem setting up a RabbitMQ cluster

I'm trying to set up a cluster between two nodes in a LAN, and I'm not getting anywhere.

On node 1 (lenovo) I have a rabbitmq 2.6.1 instance running:
$ sudo rabbitmqctl cluster_status
Cluster status of node rabbit <at> lenovo ...
[{nodes,[{disc,[rabbit <at> lenovo]}]},{running_nodes,[rabbit <at> lenovo]}]
...done.

One node 2 (posti) I have a stopped rabbitmq 2.6.1 instance:
$ sudo rabbitmqctl cluster_status
Cluster status of node rabbit <at> posti ...
[{nodes,[{unknown,[rabbit <at> posti]}]},{running_nodes,[]}]
...done.

Then I attempt to join node 2 to node 1:
$ sudo rabbitmqctl cluster rabbit <at> lenovo
Clustering node rabbit <at> posti with [rabbit <at> lenovo] ...
Error: {no_running_cluster_nodes,[rabbit <at> lenovo],[rabbit <at> lenovo]}

What am I doing wrong? The instructions on the official site weren't that complicated.
Attempting the automatic cluster configuration proved equally fruitless.

<div><p>I'm trying to set up a cluster between two nodes in a LAN, and I'm not getting anywhere.<br><br>On node 1 (lenovo) I have a rabbitmq 2.6.1 instance running:<br>$ sudo rabbitmqctl cluster_status<br>Cluster status of node rabbit <at> lenovo ...<br>[{nodes,[{disc,[rabbit <at> lenovo]}]},{running_nodes,[rabbit <at> lenovo]}]<br>...done.<br><br>One node 2 (posti) I have a stopped rabbitmq 2.6.1 instance:<br>$ sudo rabbitmqctl cluster_status<br>Cluster status of node rabbit <at> posti ...<br>[{nodes,[{unknown,[rabbit <at> posti]}]},{running_nodes,[]}]<br>...done.<br><br>Then I attempt to join node 2 to node 1:<br>
$ sudo rabbitmqctl cluster rabbit <at> lenovo<br>Clustering node rabbit <at> posti with [rabbit <at> lenovo] ...<br>Error: {no_running_cluster_nodes,[rabbit <at> lenovo],[rabbit <at> lenovo]}<br><br>What am I doing wrong? The instructions on the official site weren't that complicated.<br>Attempting the automatic cluster configuration proved equally fruitless.<br></p></div>
Alexandru Scvortov | 1 Oct 2011 15:12
Favicon

Re: Problem setting up a RabbitMQ cluster

> Then I attempt to join node 2 to node 1:
> $ sudo rabbitmqctl cluster rabbit <at> lenovo
> Clustering node rabbit <at> posti with [rabbit <at> lenovo] ...
> Error: {no_running_cluster_nodes,[rabbit <at> lenovo],[rabbit <at> lenovo]}

From posti, can you do "ping lenovo"?  If that doesn't work, you need to
add lenovo to posti's host file.

If it does work, on posti, try:
  rabbitmqctl -n rabbit <at> lenovo status

If that doesn't work, check that both nodes have the same .erlang.cookie
file, and, if you have a firewall, check that Erlang's port is open.

Cheers,
Alex

On Sat, Oct 01, 2011 at 05:57:26AM -0700, Alex Grönholm wrote:
> I'm trying to set up a cluster between two nodes in a LAN, and I'm not 
> getting anywhere.
> 
> On node 1 (lenovo) I have a rabbitmq 2.6.1 instance running:
> $ sudo rabbitmqctl cluster_status
> Cluster status of node rabbit <at> lenovo ...
> [{nodes,[{disc,[rabbit <at> lenovo]}]},{running_nodes,[rabbit <at> lenovo]}]
> ...done.
> 
> One node 2 (posti) I have a stopped rabbitmq 2.6.1 instance:
> $ sudo rabbitmqctl cluster_status
> Cluster status of node rabbit <at> posti ...
> [{nodes,[{unknown,[rabbit <at> posti]}]},{running_nodes,[]}]
> ...done.
> 
> Then I attempt to join node 2 to node 1:
> $ sudo rabbitmqctl cluster rabbit <at> lenovo
> Clustering node rabbit <at> posti with [rabbit <at> lenovo] ...
> Error: {no_running_cluster_nodes,[rabbit <at> lenovo],[rabbit <at> lenovo]}
> 
> What am I doing wrong? The instructions on the official site weren't that 
> complicated.
> Attempting the automatic cluster configuration proved equally fruitless.

> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss@...
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

Alex Grönholm | 1 Oct 2011 16:45
Picon

Re: Problem setting up a RabbitMQ cluster

It was an issue about not having identical Erlang cookies. Thanks for the help! Next time I might have to study the instructions more carefully =D

<div><p>It was an issue about not having identical Erlang cookies. Thanks for the help! Next time I might have to study the instructions more carefully =D<br></p></div>
Alex Grönholm | 1 Oct 2011 18:18
Picon

HA Client for RabbitMQ?

I noticed that the hot new feature in RabbitMQ 2.6 is Active/Active HA on the server side. How can I take advantage of this on the client side? AFAIK the client only knows how to connect to a single server -- you can't give it a list of servers for failover purposes.

<div><p>I noticed that the hot new feature in RabbitMQ 2.6 is Active/Active HA on the server side. How can I take advantage of this on the client side? AFAIK the client only knows how to connect to a single server -- you can't give it a list of servers for failover purposes.<br></p></div>
Alain Dazzi | 1 Oct 2011 02:25

rabbitmq 2.6.1 cluster failure recovery

Hi,

I can't get my rabbitmq cluster to recover from a dead node. So
perhaps someone can help ...

node-1 (cumulonimbus)
Linux cumulonimbus 2.6.38-11-server #50-Ubuntu SMP Mon Sep 12 21:34:27
UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
ii  rabbitmq-server                       2.6.1-1
root <at> cumulonimbus:~# ls -1 /usr/lib/rabbitmq/lib/rabbitmq_server-2.6.1/plugins/
amqp_client-2.6.1.ez
mochiweb-1.3-rmq2.6.1-git9a53dbd.ez
rabbitmq_management-2.6.1.ez
rabbitmq_management_agent-2.6.1.ez
rabbitmq_management_visualiser-2.6.1.ez
rabbitmq_mochiweb-2.6.1.ez
README
webmachine-1.7.0-rmq2.6.1-hg0c4b60a.ez

node-2 (nuage-informatique)
Linux nuage-informatique 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12
21:17:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
ii  rabbitmq-server                       2.6.1-1

1/ stop both servers and set-up same .erlang_cookie value; restart nodes

2/ on node1 I create a cluster
    rabbitmqctl stop_app
    rabbitmqctl reset
    rabbitmqctl cluster rabbit <at> nuage-informatique rabbit <at> cumulonimbus
Clustering node rabbit <at> cumulonimbus with ['rabbit <at> nuage-informatique',
                                          rabbit <at> cumulonimbus] ...
...done.

3/ This creates 2 disc nodes !!!

4/ run a test and pass data successfully

5/ restart node-2 (service rabbitmq-server stop)
service rabbitmq-server start ... fails with ...
root <at> nuage-informatique:~/Desktop# service rabbitmq-server start
Starting rabbitmq-server: FAILED - check /var/log/rabbitmq/startup_{log, _err}
rabbitmq-server.
Erlang has closed
^M
Crash dump was written to: erl_crash.dump^M
Kernel pid terminated (application_controller)
({application_start_failure,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot}}}}})^M

Activating RabbitMQ plugins ...
1 plugins activated:
* rabbitmq_management_agent-2.6.1

+---+   +---+
|   |   |   |
|   |   |   |
|   |   |   |
|   +---+   +-------+
|                   |
| RabbitMQ  +---+   |
|           |   |   |
|   v2.6.1  +---+   |
|                   |
+-------------------+
AMQP 0-9-1 / 0-9 / 0-8
Copyright (C) 2007-2011 VMware, Inc.
Licensed under the MPL.  See http://www.rabbitmq.com/

node           : rabbit <at> nuage-informatique
app descriptor :
/usr/lib/rabbitmq/lib/rabbitmq_server-2.6.1/sbin/../ebin/rabbit.app
home dir       : /var/lib/rabbitmq
config file(s) : (none)
cookie hash    : qHpvLciGsi5o4f8ScVzyWg==
log            : /var/log/rabbitmq/rabbit@...
sasl log       : /var/log/rabbitmq/rabbit@...
database dir   : /var/lib/rabbitmq/mnesia/rabbit <at> nuage-informatique
erlang version : 5.7.4

-- rabbit boot start
starting file handle cache server                                     ...done
starting worker pool                                                  ...done
starting database
...BOOT ERROR: FAILED
Reason: {error,
            {timeout_waiting_for_tables,
                [rabbit_user,rabbit_user_permission,rabbit_vhost,
                 rabbit_durable_route,rabbit_durable_exchange,
                 rabbit_durable_queue]}}
Stacktrace: [{rabbit_mnesia,wait_for_tables,1},
             {rabbit_mnesia,check_schema_integrity,0},
             {rabbit_mnesia,ensure_schema_integrity,0},
             {rabbit_mnesia,init,0},
             {rabbit,'-run_boot_step/1-lc$^1/1-1-',1},
             {rabbit,run_boot_step,1},
             {rabbit,'-start/2-lc$^0/1-0-',1},
             {rabbit,start,2}]
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot}}}}}"}^M

At this point I have to re-install node-2 to recover.

Any idea why?

Thank you,

next I would like to test mirrored q but obviously this has to work first...

-Alain
Roman Borisenko | 1 Oct 2011 09:32
Picon
Gravatar

Routing Key issue

--
Regards,
Roman B.

<div><p>-- <br>Regards,<br>Roman B.<br><br></p></div>
lngphp | 1 Oct 2011 09:34
Picon
Gravatar

Routing Key issue

Hi

I'm trying to figure out how RabbitMQ/php-amqplib work and have issue
with Routing Keys.
Two messages are sent to 'Queue' queue using Routing Keys:
'server1.info' and 'server1.error':

$server = 1;
$conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST);
$channel = $conn->channel();
$channel->exchange_declare(XCHANGE_NAME, 'topic', false, true, false);
$msg = new AMQPMessage('Server '.$server.' INFO'
, array('content_type' => 'text/plain'));
$channel->basic_publish($msg, XCHANGE_NAME
, 'server'.$server.'.info');
$msg = new AMQPMessage('Server '.$server.' ERROR'
, array('content_type' => 'text/plain'));
$channel->basic_publish($msg, XCHANGE_NAME
, 'server'.$server.'.error');

On the other end, I use '#.error' in consumer-error.php and '#.info'
in consumer-info.php, but both messages are appeared if I run any of
the consumers:

$conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST);
$channel = $conn->channel();
$channel->exchange_declare(XCHANGE_NAME, 'topic', false, true, false);
$channel->queue_declare(QUEUE_NAME, false, true, false, false);
$channel->queue_bind(QUEUE_NAME, XCHANGE_NAME, '#.info');
function process_message($msg) {
echo $msg->body."\n";
$msg->delivery_info['channel']->
basic_ack($msg->delivery_info['delivery_tag']);
}
$channel->basic_consume(QUEUE_NAME, 'consumer', false, false, false,
false, 'process_message');
while(count($channel->callbacks)) {
$channel->wait();
}

I'm expecting the separation by this key, but it doesn't happen. What
am I doing wrong?

Regards,
Roman
lngphp | 2 Oct 2011 07:06
Picon
Gravatar

Re: Routing Key issue

Resolved - I needed to have different Queues...

On Oct 1, 3:34 pm, lngphp <lng...@...> wrote:
> Hi
>
> I'm trying to figure out how RabbitMQ/php-amqplib work and have issue
> with Routing Keys.
> Two messages are sent to 'Queue' queue using Routing Keys:
> 'server1.info' and 'server1.error':
>
> $server = 1;
> $conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST);
> $channel = $conn->channel();
> $channel->exchange_declare(XCHANGE_NAME, 'topic', false, true, false);
> $msg = new AMQPMessage('Server '.$server.' INFO'
> , array('content_type' => 'text/plain'));
> $channel->basic_publish($msg, XCHANGE_NAME
> , 'server'.$server.'.info');
> $msg = new AMQPMessage('Server '.$server.' ERROR'
> , array('content_type' => 'text/plain'));
> $channel->basic_publish($msg, XCHANGE_NAME
> , 'server'.$server.'.error');
>
> On the other end, I use '#.error' in consumer-error.php and '#.info'
> in consumer-info.php, but both messages are appeared if I run any of
> the consumers:
>
> $conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST);
> $channel = $conn->channel();
> $channel->exchange_declare(XCHANGE_NAME, 'topic', false, true, false);
> $channel->queue_declare(QUEUE_NAME, false, true, false, false);
> $channel->queue_bind(QUEUE_NAME, XCHANGE_NAME, '#.info');
> function process_message($msg) {
> echo $msg->body."\n";
> $msg->delivery_info['channel']->
> basic_ack($msg->delivery_info['delivery_tag']);}
>
> $channel->basic_consume(QUEUE_NAME, 'consumer', false, false, false,
> false, 'process_message');
> while(count($channel->callbacks)) {
> $channel->wait();
>
> }
>
> I'm expecting the separation by this key, but it doesn't happen. What
> am I doing wrong?
>
> Regards,
> Roman
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc...@...://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

Gmane