On May 9, 2018, at 8:16 PM, Bashar Al Masri <bes...@gmail.com
> First of all i searched the this group , and nothing worked with me !
> I installed gearmand 1.1.18 on my centos7.
FWIW, I use gearmand 1.1.18 on CentOS 7.4 all the time (and before that on CentOS 7.2 and 7.3) without problems.
You didn't say how you installed it. Did you compile from source or did you install an rpm with yum?
I compiled from source downloaded from https://github.com/gearman/gearmand/releases/download/1.1.18/gearmand-1.1.18.tar.gz
> and here is my conf file
Sorry, where did you put this conf file? The only conf file I use with gearmand is a supervisord conf file, and the syntax doesn't look anything like this.
I also don't specify the "--listen" option or use mysql. I really doubt you need to specify "--listen". May I suggest starting with the basics first and seeing if that works? Remove the conf file and just start it like this:
% /path/to/gearmand &
> --listen 127.0.0.1
> --mysql-host localhost
> --mysql-port 3306
> --mysql-user mysql_user
> --mysql-password password
> --mysql-db db_name
> --mysql-table gearman_queue
I don't know if it matters or not, but I note that some of the options in your "conf file" have equal signs ("=") after them and some do not. Perhaps you need to be consistent and replace the equal signs with spaces?
> nothing in /output/gearmand.log
Are you sure the user executing gearmand has the permissions to write to /output/gearmand.log?
> Problems start when i add gearmand to supervisor :
My supervisord conf file for gearmand (which should be located at /etc/supervisor/conf.d/gearmand.conf) looks something like this:
user = gearman
priority = 100
command = /sbin/gearmand --port 4730 --verbose INFO -l /var/log/gearmand.log
redirect_stderr = true
stdout_logfile = /var/log/gearmand-supervisor.log
stdout_logfile_maxbytes = 10MB
stdout_logfile_backups = 5
startsecs = 5
autorestart = true
I don't recommend running gearmand as root, so I specify "user = gearman".
# useradd -r -g supervisor gearman
Make sure /var/log/gearmand.log and /var/log/gearmand-supervisor.log are created first and both are owned by the gearman user.
# touch /var/log/gearmand.log /var/log/gearmand-supervisor.log && chown gearman:root /var/log/gearmand.log /var/log/gearmand-supervisor.log
You do NOT want supervisord to start gearmand with --daemon. Supervisord takes care of that for you. That's probably part of the problem you are seeing!
The log file you sent shows that bind is failing because the port is already in use. I don't know what that could be from. A previous attempt perhaps that's still running?
What does the output of "lsof -i :4730" say?
How about trying a different port? /path/to/gearmand --port 47300
If that doesn't work, try rebooting.
Also, CentOS 7.x uses firewalld by default, so make sure you know how to configure that properly or disable it.
Hoping this helps,