Page 1 of 1

Baruwa / Celery Broker err, broken..

Posted: 13 Dec 2012 00:16
by m477
So when previewing a message in Baruwa, I'm getting:

Sorry the requested page is unavailable due to a server malfunction.

Enabled debug in Baruwa and it shows:

Code: Select all

Request Method:	GET
Request URL:	http://mail.insolvencysolutions.com.au/messages/preview/538388599.A32D2/
Django Version:	1.2.3
Exception Type:	IOError
Exception Value:	
Socket closed
Exception Location:	/usr/lib/pymodules/python2.6/amqplib/client_0_8/method_framing.py in read_method, line 215
Python Executable:	/usr/bin/python
Python Version:	2.6.6
Python Path:	['/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/pymodules/python2.6']
Server time:	Thu, 13 Dec 2012 02:12:05 +0200
So, I'm guessing it's my celery broker details. But I know nothing about celery.

Help darky?

Re: Baruwa / Celery Broker err, broken..

Posted: 13 Dec 2012 00:23
by m477
more info:

Code: Select all

root@efa:/etc/mysql# tail -f /var/log/baruwa/celeryd.log
[2012-12-13 02:19:42,198: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 6 seconds...
[2012-12-13 02:19:51,210: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 8 seconds...
[2012-12-13 02:20:02,223: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 10 seconds...
[2012-12-13 02:20:15,252: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 12 seconds...
[2012-12-13 02:20:30,268: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 14 seconds...
[2012-12-13 02:20:47,303: ERROR/MainProcess] Consumer: Connection Error: Socket closed. Trying again in 16 seconds...

Re: Baruwa / Celery Broker err, broken..

Posted: 13 Dec 2012 01:08
by m477
alright I fixed it, not sure what the issue is, but it was rabbitmq.

I uninstalled it and purged;

Code: Select all

apt-get remove rabbitmq-server --purge
Then reinstalled it:

Code: Select all

apt-get install rabbitmq-server
Then obtain your celery password from /etc/barruwa/settings.py (under #celery)

and run:

Code: Select all

rabbitmqctl add_user baruwa <password>
rabbitmqctl add_vhost baruwa
rabbitmqctl set_permissions -p baruwa baruwa ".*" ".*" ".*"
rabbitmqctl delete_user guest

Re: Baruwa / Celery Broker err, broken..

Posted: 13 Dec 2012 06:37
by darky83
that was a quick fix :-),

Rabbitmq is generally pretty stable, so no idea what the issue could have been.
maybe it lost its settings somehow.

Re: Baruwa / Celery Broker err, broken..

Posted: 05 May 2013 23:22
by rooter_c
I have to do this procedure every time I reboot.

Re: Baruwa / Celery Broker err, broken..

Posted: 30 May 2013 15:18
by Gunisa
Any solutions for this problem??
Do this everytime it reboots :(

Re: Baruwa / Celery Broker err, broken..

Posted: 12 Jun 2013 20:11
by rhostager
The rabbitmq-server is not starting. It is not set to start under init.d and aparently nowhere else. To fix, edit your rc.local so that it looks like this:

/etc/init.d/baruwa start
/etc/init.d/DCC start
/etc/init.d/rabbitmq-server start
exit 0

Re: Baruwa / Celery Broker err, broken..

Posted: 13 Jun 2013 12:01
by darky83
The startup of baruwa and its dependency's is a bit of a problem sometimes.

I also noticed that on very fast machines the order of startup is OK but because the machine start the items so fast the initialization is not completed yet causing other items to fail.

I guess for 0.4 I will remove the default startups from rc2.d and create a 'EFA-Startup' script that does nothing more than manually start the processes with 'sleeps' in between.

Re: Baruwa / Celery Broker err, broken..

Posted: 27 Jun 2013 19:34
by ge2000
Be aware that rabbit-mq is heavily dependent on the hostname. So either make sure DNS works flawless or add the hostname to /etc/hosts The latter solved in my case several problems.
I'm running a few instances of fast ESXi 5 and 5.1 clusters.

--Ge