[rabbitmq-discuss] Strange RabbitMQ management plugin error!

Ciprian Dorin Craciun ciprian.craciun at gmail.com
Tue Jan 11 18:48:02 GMT 2011


On Tue, Jan 11, 2011 at 12:34, Simon MacMullen <simon at rabbitmq.com> wrote:
> On 10/01/11 22:30, Ciprian Dorin Craciun wrote:
>>
>>     Hello all!
>
> Hi Ciprian.
>
>>    I've installed the management plugin (and it's dependencies), and
>> when accessing it I get the following error on almost all pages and I
>> don't see any counters... (But it seems to work otherwise as I can see
>> and manipulate other entities: queues, exchanges, etc.)
>>
>> ~~~~
>> TypeError: overview.queue_totals is undefined
>> ~~~~
>
> Thanks for explaining the unusual way you're starting RabbitMQ. That is
> likely to be the problem.

    It seems that indeed this is the problem...


> The management plugin uses a feature (fine grained statistics) that it needs
> to turn on in the main rabbit application. It sounds like this is not
> happening. This is controlled via a couple of application configuration
> parameters. Normally they default to turning this on, and the management
> plugin should detect if that's switched off and adjust the interface (and
> display warnings) accordingly, but that might not be happening for you.

    I don't see any errors displayed from the management plugin. It
just says that it started the web server, serving the usual URL.
    I've also tried to set both the `force_fine_statistics` and
`collect_statistics` but they don't seem to have any effect.


> What does your config file look like?

~~~~
[
	{sasl, [
		{errlog_type, error}]},
	{os_mon, [
		{start_cpu_sup, true},
		{start_memsup, true},
		{start_disksup, true},
		{start_os_sup, false}]},
	{mnesia, [
		{dir, "/tmp/rabbit.db"}]},
	{rabbit, [
		{tcp_listeners, [{"127.0.0.1", 5672}]},
		{collect_statistics, fine}]},
	{rabbit_management_agent, [
		{force_fine_statistics, true}]},
	{rabbit_mochiweb, [
		{port, 55672}]},
	{rabbit_management, [
		{http_log_dir, none}]}
].
~~~~

    And this is how I've started the whole thing up -- not by using
the boot script:

~~~~
erl -env ERL_LIBS /tmp/rabbit.lib -config /tmp/rabbit.config -run run_rabbit run
~~~~

-module (run_rabbit).

-export ([run/0]).

run () ->
	
	ok = application:start (sasl, permanent),
	ok = application:start (os_mon, permanent),
	ok = application:start (mnesia, permanent),
	
	if
		true ->
			ok = application:start (inets, permanent),
			ok = application:start (crypto, permanent),
			ok = application:start (mochiweb, permanent),
			ok = application:start (rabbit_mochiweb, permanent);
		true -> ok
	end,
	
	ok = rabbit:prepare (),
	ok = application:start (rabbit, permanent),
	ok = application:start (amqp_client, permanent),
	
	if
		true ->
			ok = application:start (rabbit_management_agent, permanent),
			ok = application:start (webmachine, permanent),
			ok = application:start (rabbit_management, permanent);
		true -> ok
	end,
	
	ok = timer:sleep (120 * 1000),
	
	ok = init:stop(),
	ok.
~~~~

    I've also tried to start with that module and the default RabbitMQ
installation and the same problem appears... So it's definitely a
configuration problem... But I'm not seeing where I'm wrong...


> Also, why have you done this? What problem is it solving?
>
> Cheers, Simon

    Good question. :) We'll I'm trying to "embed" RabbitMQ into
another Erlang application -- a web server that instead of handling
the requests it just puts them on a queue, and waits for the response
(the same pattern as in the rpc module is doing). I intend to use
`amqp_client` in with the `direct` connector. I've seen that there is
a similar project but for SMTP -- `rabbitmq-smtp`.

    Thanks for your time,
    Ciprian.


More information about the rabbitmq-discuss mailing list