Baruwa / Celery Broker err, broken..

Report bugs and workarounds
Post Reply
m477
Posts: 11
Joined: 07 Dec 2012 03:01

Baruwa / Celery Broker err, broken..

Post 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?
m477
Posts: 11
Joined: 07 Dec 2012 03:01

Re: Baruwa / Celery Broker err, broken..

Post 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...
m477
Posts: 11
Joined: 07 Dec 2012 03:01

Re: Baruwa / Celery Broker err, broken..

Post 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
User avatar
darky83
Site Admin
Posts: 540
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Baruwa / Celery Broker err, broken..

Post 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.
Version eFa 4.x now available!
rooter_c
Posts: 13
Joined: 05 Mar 2013 04:52

Re: Baruwa / Celery Broker err, broken..

Post by rooter_c »

I have to do this procedure every time I reboot.
Gunisa
Posts: 4
Joined: 29 May 2013 13:01

Re: Baruwa / Celery Broker err, broken..

Post by Gunisa »

Any solutions for this problem??
Do this everytime it reboots :(
rhostager
Posts: 2
Joined: 29 Jan 2013 01:40

Re: Baruwa / Celery Broker err, broken..

Post 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
User avatar
darky83
Site Admin
Posts: 540
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Baruwa / Celery Broker err, broken..

Post 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.
Version eFa 4.x now available!
ge2000
Posts: 28
Joined: 23 Jan 2013 19:27

Re: Baruwa / Celery Broker err, broken..

Post 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
Post Reply