Shovel RabbitMQ won't start

I have a couple of computers running linux with rabbitmq message queues, and I want to use a shovel to move messages from the queue on the first computer to the queue on the second. Unfortunately, I cannot create a shovel or even verify that my rabbitmq.config file is being read.

Computer 1 has an IP address of 192.168.6.66

/etc/rabbitmq/rabbitmq-env.conf

NODENAME=bunny NODE_IP_ADDRESS=192.168.6.66 NODE_PORT=5672 LOG_BASE=/var/log/rabbitmq MNESIA_BASE=/var/lib/rabbitmq/mnesia RABBITMQ_PLUGINS_DIR=/usr/lib/rabbitmq/lib/rabbitmq_server-2.7.1/plugins 

/etc/rabbitmq/rabbitmq.conf

 [ {mnesia, [{dump_log_write_threshold, 100}]}, {bunny, [{vm_memory_high_watermark, 0.3}]}, {rabbitmq_shovel, [{shovels, [{test_shovel, [{sources, [{broker, "amqp://shoveluser: shoveluser@192.168.6.64 :5672/"}]}, {destinations, [{broker, ""}]}, {queue, <<"observation2">>} ] }] }] } ]. 

Computer 2 has an IP address of 192.168.6.64

/etc/rabbitmq/rabbitmq-env.conf

 NODENAME=bunny NODE_IP_ADDRESS=0.0.0.0 NODE_PORT=5672 LOG_BASE=/var/log/rabbitmq MNESIA_BASE=/var/lib/rabbitmq/mnesia RABBITMQ_PLUGINS_DIR=/usr/lib/rabbitmq/lib/rabbitmq_server-2.7.1/plugins 

When I restart the rabbitmq server on computer 1, this is the result:

 [ root@test _toshiba ~]# /etc/rc.d/rabbitmq-server restart :: Stopping rabbitmq-server daemon [BUSY] Stopping and halting node bunny@localhost ... ...done. [DONE] :: Starting rabbitmq-server daemon [BUSY] Activating RabbitMQ plugins ... ******************************************************************************** ******************************************************************************** 9 plugins activated: * amqp_client-2.7.1 * erlando-2.7.1 * mochiweb-1.3-rmq2.7.1-git * rabbitmq_management-2.7.1 * rabbitmq_management_agent-2.7.1 * rabbitmq_mochiweb-2.7.1 * rabbitmq_shovel-2.7.1 * rabbitmq_shovel_management-2.7.1 * webmachine-1.7.0-rmq2.7.1-hg 

I expected to see this "configuration file (s): / etc / rabbitmq / rabbitmq.config", given the description of the documentation for the configuration file here

And after starting the rabbitmq server, I ran this command and I don’t see the shovel:

 [ root@test _toshiba ~]# rabbitmqctl eval 'rabbit_shovel_status:status().' [] ...done. 

Here is the status of rabbitmq

 [ root@test _toshiba ~]# rabbitmqctl status Status of node bunny@localhost ... [{pid,14225}, {running_applications, [{rabbitmq_shovel,"Data Shovel for RabbitMQ","2.7.1"}, {erlando,"Syntax extensions for Erlang","2.7.1"}, {rabbitmq_shovel_management,"Shovel Status","2.7.1"}, {rabbitmq_management,"RabbitMQ Management Console","2.7.1"}, {rabbitmq_management_agent,"RabbitMQ Management Agent","2.7.1"}, {amqp_client,"RabbitMQ AMQP Client","2.7.1"}, {rabbit,"RabbitMQ","2.7.1"}, {os_mon,"CPO CXC 138 46","2.2.9"}, {sasl,"SASL CXC 138 11","2.2.1"}, {rabbitmq_mochiweb,"RabbitMQ Mochiweb Embedding","2.7.1"}, {webmachine,"webmachine","1.7.0-rmq2.7.1-hg"}, {mochiweb,"MochiMedia Web Server","1.3-rmq2.7.1-git"}, {inets,"INETS CXC 138 49","5.9"}, {mnesia,"MNESIA CXC 138 12","4.7"}, {stdlib,"ERTS CXC 138 10","1.18.1"}, {kernel,"ERTS CXC 138 10","2.15.1"}]}, {os,{unix,linux}}, {erlang_version, "Erlang R15B01 (erts-5.9.1) [source] [smp:4:4] [async-threads:30] [hipe] [kernel-poll:true]\n"}, {memory, [{total,18530752}, {processes,6813815}, {processes_used,6813800}, {system,11716937}, {atom,428361}, {atom_used,414658}, {binary,182176}, {code,8197217}, {ets,911776}]}, {vm_memory_high_watermark,0.39999999942574066}, {vm_memory_limit,417929625}] ...done. 

The logs in / var / log / rabbitmq did not contain error messages.

How can I verify that my configuration file is being used, and why won't my spade start?

0
source share
2 answers

You need to determine the destination for the shovel.

     [{mnesia, [{dump_log_write_threshold, 100}]},
         {bunny, [{vm_memory_high_watermark, 0.3}]},
         {rabbitmq_shovel,
             [{shovels,
                 [{test_shovel,
                     [{sources, [{broker, "amqp: // shoveluser: shoveluser@192.168.6.64 : 5672 /"}]},
                      {destinations, [{broker, "amqp: // shoveluser: shoveluser@192.168.6.66 : 5672 /"}]},
                      {queue,>}
                     ]
                 }]

             }]
         }
     ].

+2
source

I think "is not enough to specify localhost broker (in the terminal" destination "). I believe that" amqp: // "is required instead.

So, your appointment deadline should read:

{destination, [{broker, "amqp: //"}]}

Setting the local and broker hostnames (another answer) may also work, but I don't think it is necessary.

0
source

All Articles