[rabbitmq-discuss] Problem with using rabbitmqctl on EC2

Codevally codevally at gmail.com
Tue Feb 28 00:20:04 GMT 2012


Hi

Both ping `hostname` and ping `hostname -f` is working fine.

The latest issue is when I try to get the status using rabbitmqctl
(rabbitmq status) it says

ec2test2:/app/rabbitmq/sbin # sh rabbitmqctl status
Status of node rabbit at ec2test2 ...

=ERROR REPORT==== 28-Feb-2012::00:14:34 ===
** System running to use fully qualified hostnames **
** Hostname ec2test2 is illegal **
Error: unable to connect to node rabbit at ec2test2: nodedown
diagnostics:
- nodes and their ports on ec2test2: [{rabbit,30000},
{rabbitmqctl12151,54167}]
- current node: 'rabbitmqctl12151 at ec2test2.xx-
xx-1.compute.amazonaws.com'
- current node home dir: /root
- current node cookie hash: 4lZvwoYL5ZJbkEiBx9CgDB==

But if I specify the node using -n (rabbitmqctl -n ec2test2 status)
and it says

ec2test2:/app/rabbitmq/sbin # sh rabbitmqctl -n ec2test2 status
Status of node 'ec2test2 at ec2test2.xx-xx-1.compute.amazonaws.com' ...
Error: unable to connect to node 'ec2test2 at ec2test2.xx-
xx-1.compute.amazonaws.com': nodedown
diagnostics:
- nodes and their ports on ec2test2.xx-xx-1.compute.amazonaws.com:
[{rabbit,
 
30000},
 
{rabbitmqctl12163,
 
56206}]
- current node: 'rabbitmqctl12163 at ec2test2.xx-
xx-1.compute.amazonaws.com'
- current node home dir: /root
- current node cookie hash: 4lZvwoYL5ZJbkEiBx9CgDB==

Any idea??

On Feb 27, 11:25 pm, Marek Majkowski <maje... at gmail.com> wrote:
> On Mon, Feb 27, 2012 at 03:00, Codevally <codeva... 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.  Seehttp://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/rab... at ec2test2.log
> > sasl log       : /var/log/rabbitmq/rab... 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
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list