On my Ubuntu 14.04, when I started celery worker using the "celery worker" command, I encountered "Segmentation fault" (core dumped), as follows:
Jay @ jay-linux :~ /Workspace/aew $ celery-A aew worker
The code is as follows: |
Copy code |
-------------- Celery @ jay-linux v3.1.13 (Cipater) ----****----- --- *** -- Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty --*-****--- -** ---------- [Config] -** ----------.> App: aew: 0x7fd4b547af90 -** ----------.> Transport: amqp: // aew: ** @ 192.168.217.188: 5672/aew -** ----------.> Results: amqp -*** --- ** ---.> Concurrency: 4 (prefork) --*******---- --- ***** ----- [Queues] --------------.> Celery exchange = celery (direct) key = celery Segmentation fault (core dumped) |
Later I found the python-librabbitmq problem in the system. The python-librabbitmq version in the system that encountered this error is 1.0.3-0ubuntu1 and can be queried using the command: dpkg-l | grep python-librabbitmq.
There are two solutions:
1. upgrade python-librabbitmq to a new version, such as 1.5.2. upgrade the deb package or apt-get Command, or use pip to install the package. I use pip to install the default version 1.5.2, as shown below:
Jay @ jay-linux :~ $ Sudo apt-get remove python-librabbitmq # delete the original package
Jay @ jay-linux :~ $ Sudo pip install librabbitmq
2. Delete the python-librabbitmq package directly, so that celery will return to using the python-amqp package.