Rabbitmq configuration doesn't work

1,274 views
Skip to first unread message

Roman Gelembjuk

unread,
Sep 22, 2015, 9:00:43 AM9/22/15
to rabbitmq-users
I have installed rabbitmq on centos5 . it works fine.
I wanted to add some configs . There was no config file in /etc/rabitmq . I created the file /etc/rabbitmq/rabbitmq-env.conf and added simplest configuration there

[
    {mnesia, [{dump_log_write_threshold, 1000}]},
    {rabbit, [{tcp_listeners, [5673]}]}
  ].

It is from man pages https://www.rabbitmq.com/configure.html#configuration-file

but my rabbit doesn't want to start with this simple conf file

# /etc/init.d/rabbitmq-server start
Starting rabbitmq-server: FAILED - check /var/log/rabbitmq/startup_{log, _err}
rabbitmq
-server.


contents of /var/log/rabbitmq/startup_err is
/etc/rabbitmq/rabbitmq-env.conf: line 1: [: missing `]'

what do i do wrong?

i also tries config file contents like '[].' . it also gives error 
/etc/rabbitmq/rabbitmq-env.conf: line 1: [].: command not found



Alvaro Videla

unread,
Sep 22, 2015, 9:03:01 AM9/22/15
to rabbitm...@googlegroups.com
rabbitmq-env.conf is a shell script that should take shell environment variables you want to modify.

For the kind of settings you want, take a look at rabbitmq.config

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Roman Gelembjuk

unread,
Sep 22, 2015, 9:09:50 AM9/22/15
to rabbitmq-users
an you give me some simple example of this file? some very basic working example on centos

in the config file i want to set shovel configuration 

Michael Klishin

unread,
Sep 22, 2015, 9:12:12 AM9/22/15
to rabbitm...@googlegroups.com, Roman Gelembjuk
 On 22 Sep 2015 at 16:09:56, Roman Gelembjuk (towe...@gmail.com) wrote:
> an you give me some simple example of this file? some very basic
> working example on centos
>
> in the config file i want to set shovel configuration

https://www.rabbitmq.com/shovel-static.html

You can also set up shovels dynamically via rabbitmqctl or
HTTP API:
https://www.rabbitmq.com/shovel-dynamic.html
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Roman Gelembjuk

unread,
Sep 22, 2015, 9:16:48 AM9/22/15
to rabbitmq-users, towe...@gmail.com
I sow that example, but before running with shovels i wanted to ensure i have some base working config file . and i can not get it.
i need empty or very basic config file to make it running.
after i know my config is fine i will start to add shovel configuration. else i will not be sure if problems are in my shovel config or it is some general problem with a config file 

Michael Klishin

unread,
Sep 22, 2015, 9:19:59 AM9/22/15
to rabbitm...@googlegroups.com, Roman Gelembjuk
On 22 Sep 2015 at 16:16:51, Roman Gelembjuk (towe...@gmail.com) wrote:
> I sow that example, but before running with shovels i wanted
> to ensure i have some base working config file . and i can not get
> it.
> i need empty or very basic config file to make it running.
> after i know my config is fine i will start to add shovel configuration.
> else i will not be sure if problems are in my shovel config or it
> is some general problem with a config file

Here’s a “blank” config:
https://gist.github.com/michaelklishin/6397dedc00ce632617ec

You can check that it is indeed used by looking at the node page in the management UI
(there’s a config path, which would say “Not found” if the file couldn’t be loaded).

There’s also
https://github.com/rabbitmq/rabbitmq-server/blob/master/docs/rabbitmq.config.example 

Roman Gelembjuk

unread,
Sep 22, 2015, 9:23:16 AM9/22/15
to rabbitmq-users, towe...@gmail.com
the blank config doesn't work for me. what can be the reason?

there is all i did

# /etc/init.d/rabbitmq-server stop
Stopping rabbitmq-server: rabbitmq-server.
-bash-3.2# nano /etc/rabbitmq/rabbitmq-env.conf
-bash-3.2# /etc/init.d/rabbitmq-server start

Starting rabbitmq-server: FAILED - check /var/log/rabbitmq/startup_{log, _err}
rabbitmq
-server.
-bash-3.2# cat startup_err
/etc/rabbitmq/rabbitmq-env.conf: line 1: [: missing `]'
-bash-3.2# cat /etc/rabbitmq/rabbitmq-env.conf
[
 {rabbit, [
           
          ]
 }
].
-bash-3.2#

Michael Klishin

unread,
Sep 22, 2015, 9:26:03 AM9/22/15
to rabbitm...@googlegroups.com, Roman Gelembjuk
On 22 Sep 2015 at 16:23:21, Roman Gelembjuk (towe...@gmail.com) wrote:
> /etc/rabbitmq/rabbitmq-env.conf: line 1: [: missing `]'

Roman,

I believe this has already been answered by Álvaro.

RabbitMQ config file must be in rabbitmq.config. You’re trying to use
rabbitmq-env.conf, which is supposed to contain environment
variables without the RABBITMQ_* prefix, e.g. NODENAME=rabbit1@hostname. 

Roman Gelembjuk

unread,
Sep 22, 2015, 9:30:33 AM9/22/15
to rabbitmq-users, towe...@gmail.com
you are right. i am stupid :)
Álvaro did good answer but i didn't understand initially. thanks !
Reply all
Reply to author
Forward
0 new messages