[rabbitmq-discuss] Problem with using rabbitmqctl on EC2

Marek Majkowski majek04 at gmail.com
Mon Feb 27 12:25:08 GMT 2012


On Mon, Feb 27, 2012 at 03:00, Codevally <codevally at gmail.com> wrote:
> I have installed RabbitMQ 2.7.1 on EC2 (host name is ec2test2) and
> server getting started without any issue.
>
> 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 ec2test2
> app descriptor : /app/rabbitmq_server-2.7.1/sbin/../ebin/rabbit.app
> home dir       : /root
> config file(s) : (none)
> cookie hash    : 4lZvwoYL5ZJbkEiBx9CgDA==
> log            : /var/log/rabbitmq/rabbit at ec2test2.log
> sasl log       : /var/log/rabbitmq/rabbit at ec2test2-sasl.log
> database dir   : /app/rabbitmq-config/lib/rabbitmq/mnesia/
> rabbit at ec2test2
> erlang version : 5.9
>
> But when I try to use rabbitmqctl, I am getting the below error.
>
> ec2test2:/app/rabbitmq/sbin # sh rabbitmqctl
> {error_logger,{{2012,2,27},{2,55,8}},"Can't set long node name!
> \nPlease check your configuration\n",[]}
> {error_logger,{{2012,2,27},{2,55,8}},crash_report,[[{initial_call,
> {net_kernel,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},
> {error_info,{exit,{error,badarg},[{gen_server,init_it,6,
> [{file,"gen_server.erl"},{line,313}]},{proc_lib,init_p_do_apply,3,
> [{file,"proc_lib.erl"},{line,227}]}]}},{ancestors,
> [net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[<0.17.0>]},
> {dictionary,[{longnames,true}]},{trap_exit,true},{status,running},
> {heap_size,6765},{stack_size,24},{reductions,2361}],[]]}
>
> Host name is correctly configured and it displays:
> ec2test2:/app/rabbitmq/sbin # hostname
> ec2test2
> ec2test2:/app/rabbitmq/sbin #
>
> Could someone please explain this erroneous behavior?

Google suggests:
 https://groups.google.com/group/erlang-programming/msg/72f4dc5311729eb2

> A little more experimentation revealed that the problem was that the
> system returned no FQDN for itself, as indicated for example by
> 'hostname -f'. A little /etc/hosts manipulation fixed that, and all
> was well.

Basically, make sure that this works fine:
  ping `hostname`
  ping `hostname -f`

Cheers,
    Marek


More information about the rabbitmq-discuss mailing list