Start the gearman service in Linux and start gearman in linux.
Gearman has not been used for a long time. The Gearman server on the server does not know when it will be stopped. Therefore, when executing the program, an error is reported:
File "python/response.py", line 41, in <module> File "python/response.py", line 38, in main gm_worker.set_client_id('your_worker_client_id_name') File "/usr/lib64/python2.7/site-packages/gearman-2.0.2-py2.7.egg/gearman/worker.py", line 98, in work continue_working = self.poll_connections_until_stopped(worker_connections, continue_while_connections_alive, timeout=poll_timeout) File "/usr/lib64/python2.7/site-packages/gearman-2.0.2-py2.7.egg/gearman/connection_manager.py", line 204, in poll_connections_until_stopped raise ServerUnavailable('Found no valid connections in list: %r' % self.connection_list)gearman.errors.ServerUnavailable: Found no valid connections in list: [<GearmanConnection localhost:4730 connected=False>]
The last ServerUnavailable line of error log shows that the server of Gearman has been stopped.
1. When I run the gearmand-d command, first the prompt/var/log/gearman. log does not exist. Therefore, create a log file in this path;
2. Start the Server on the local machine. The port number is 4730. The command is:
gearmand --log-file gearmand.log --listen 127.0.0.1 --port=4730 --verbose=INFO &
References: http://tech-lightnight.blogspot.jp/2013/04/start-with-gearman.html