4

I have been trying to work with persistent job queues of gearman. When I try to use libdrizzle like-

gearmand -q libdrizzle --libdrizzle-host=127.0.0.1 --libdrizzle-user=gearman --libdrizzle-password=secret --libdrizzle-db=some_db --libdrizzle-table=gearman_queue --libdrizzle-mysql

It gives me error like-

gearmand: unknown option libdrizzle-host

Also a strange thing is that when I do man gearmand it does not have the libdrizzle options. What should I do? I want the persistent queues in mysql. I had tried using gearman_udf_mysql but it did not work too. I have posted the problem. see Where does mysql save the path for gearman mysql udf files?

Community
  • 1
  • 1
Hussain
  • 5,057
  • 6
  • 45
  • 71

1 Answers1

0

Gearman must be compiled with libdrizzle/mysql support. You can check if it's been compiled in by running the command gearmand --help or on older versions man gearmand.

If libdrizzle/mysql support is available, you will see the Drizzle/Mysql options in the help. If it's not there, you will need to recompile gearmand. Here are the commands to install Gearman 1.1.12 on Ubuntu 12.04 LTS (tested on a clean Vagrant precise64 box):

vagrant@precise64:~$ sudo apt-get update
vagrant@precise64:~$ sudo apt-get install libboost-all-dev gperf libevent-dev uuid-dev libmysqld-dev
vagrant@precise64:~$ wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz
vagrant@precise64:~$ tar zxvf gearmand-1.1.12.tar.gz
vagrant@precise64:~$ cd gearmand-1.1.12/
vagrant@precise64:~/gearmand-1.1.12$ ./configure

At this point, look for the following lines at the end of the ./configure output, which indicates Mysql support is installed:

* Building with libdrizzle   yes
* Building with libmysql     yes

Then continue with the installation:

vagrant@precise64:~/gearmand-1.1.12$ make
vagrant@precise64:~/gearmand-1.1.12$ sudo make install

Gearmand is now configured with libdrizzle and will store jobs in a Mysql database.

Kris Peeling
  • 1,025
  • 8
  • 18