Cloudstack integration with RabbitMQ
I've still not managed to get Cloudstack to generate any traffic to the RabbitMQ server over the weekend. There doesn't seem to be enough information in the guide to get this running?
Hi there,
I have a Cloudstack instance running v4.3.
On a separate server, I have setup RabbitMQ, running on CentOS 6.5 by following the steps below:
rpm -ivh http://download.fedoraproject.org/pub/epel/6/$(arch)/epel-release-6-8.noarch.rpm
sudo yum install -y erlang
rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo yum install -y rabbitmq-server.noarch
sudo chkconfig rabbitmq-server on
I've opened port 5672 through the firewall solely to the Cloudstack instance.
I have permitted remote users to connect with the following configuration:
cat /etc/rabbitmq/rabbitmq.config
[
{rabbit, [{loopback_users, []}]}
].
I have removed the guest user, created a new user, provided that user with administrator privileges and allowed that user permissions over the default zone '/'
rabbitmqctl add_user rabbituser password123
rabbitmqctl set_user_tags rabbituser administrator
set_permissions -p / rabbituser ".*" ".*" ".*"
I have setup the following file on my Cloudstack instance and restarted Cloudstack:
cat /etc/cloudstack/management/componentContext.xml
<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:context="http://www.springframework.org/schema/context";
xmlns:aop="http://www.springframework.org/schema/aop";
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd";>
<bean id="eventNotificationBus" class="org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus">
<property name="name" value="eventNotificationBus"/>
<property name="server" value="192.168.1.12"/>
<property name="port" value="5672"/>
<property name="username" value="rabbituser"/>
<property name="password" value="password123"/>
<property name="exchange" value="cloudstack-events"/>
</bean>
</beans>
sudo /etc/init.d/cloudstack-management stop && sudo /etc/init.d/cloudstack-management start
I can telnet from the Cloudstack instance to the RabbitMQ instance on port 5672 successfully.
I have then used tcpdump on both the Cloudstack instance and the RabbitMQ instance to look for traffic on port 5672 but there is none. Nothing is initiated by the Cloudstack instance.
Is /etc/cloudstack/management/componentContext.xml the correct location for this file? I cannot see anything erroneous in the cloudstack-management log file that shows it being picked up at all.
Have I missed something or is there a more verbose guide available than those detailed at http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.1.1/html/Admin_Guide/events.html ?
Thanks
To simplify things I've now added RabbitMQ to the same server as the Cloudstack UI, running with default guest credentials and still no luck.
Has anyone got this working either local to Cloudstack or remotely?
I've also tried /usr/share/cloudstack-management/webapps/client/WEB-INF/classes/META-INF/cloudstack/componentContext.xml as a location for the bean definition but it makes no difference.
Given there is no traffic generated and no error in the Cloudstack log file on startup I can only conclude that the file is not in the correct location?
I'm still no further on this and given the lack of replies, can I presume that no one is using this feature in Cloudstack?
Based on some mentions in the Cloudstack mailing list I've tried putting this file in both of
/etc/cloudstack/management/spring-eventbus-context.xml
/etc/cloudstack/management/spring-event-bus-context.xml
But there is still no evidence in the logs or on the (now local) RabbitMQ server that these settings are being picked up.
Is anyone able to give me a pointer on why this might not be working?
Hi,
Cloudstack version 4.2 rabbitmq-documentation is available in cloudstack admin document but this doc not work for cloudstack version 4.3 and 4.4. You need to follow our link to integrate rabbitmq in cloudstack.
http://www.fogpanel.com/blog/integrate-rabbit-mq-cloudstack-4-4/
Ask, Discuss, Answer