I have Gearman installed, running and passing jobs around perfectly fine but only when I manually start up the job queue with this command:
/usr/sbin/gearmand -p 4730 -vvvv -u gearman
If I do this I have another EC2 instance running as a worker and a third passing in jobs. Perfect, but I don't want to have to keep a terminal open (obviously) or mess around with screen. I'd like this to run on startup.
$ ps aux | grep gearman gearman 745 0.2 0.2 8096 1388 ? Ss 19:11 0:00 /usr/sbin/gearmand --pid-file=/var/run/gearman/gearmand.pid --user=gearman --daemon --log-file=/var/log/gearman-job-server/gearman.log --listen=127.0.0.1
Looks good to me. But when I tell my worker to connect:
$ php workers/resize.php Waiting for job... PHP Warning: GearmanWorker::work(): gearman_connection_flush:write:111 in /home/ubuntu/workers/resize.php on line 20
Also I have noticed nothing is going into the log file (it was not created automatically, but was referenced in this init.d script on install). I tried creating it and even chowning to gearman:gearman but no joy there, so it's tough to debug.