Unable to install Gearman on Ubuntu 18.04 using PHP

32 views
Skip to first unread message

Rahul Bohra

unread,
Feb 28, 2023, 7:09:07 AM2/28/23
to Gearman
Hi Team,

I tried installing gearman via brew and the PHP PECL but could not execute the hello world revers string.

Please find the error message

PHP Warning:  GearmanWorker::work(): gearman_worker_grab_job(GEARMAN_UNEXPECTED_PACKET) unexpected packet:GEARMAN_TEXT -> libgearman/worker.cc:879: pid(20663) in /home/labs/public_html/gearman/reverse/worker.php on line 12

Edward J. Sabol

unread,
Feb 28, 2023, 10:32:34 AM2/28/23
to gea...@googlegroups.com
On Feb 28, 2023, at 7:09 AM, 'Rahul Bohra' via Gearman <gea...@googlegroups.com> wrote:
> I tried installing gearman via brew and the PHP PECL but could not execute the hello world revers string.

Brew works on Ubuntu? I thought brew was a macOS thing?

What version of gearmand are you using? (gearmand -V)

Did you start gearmand before starting the PHP worker? How exactly (i.e., what command line arguments did you specify)?

Have you checked the gearmand log file or output?

Take PHP out of the equation for the moment. You can create a simple worker and test it using just command tools.

Start server:

gearmand -d --verbose INFO -l /path/to/writeable/directory/gearmand.log

Example test worker:

gearman -w -f wordcount wc &

Example test client:

gearman -f wordcount "Hello world"

Should return "2". If it does, then your problem is with PHP or the PHP extension.

Regards,
Ed

Reply all
Reply to author
Forward
0 new messages