gearmand ignores the "listen" command-line option
Bug #1127347 reported by
Kevin Bowman
This bug affects 6 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman |
Fix Released
|
Critical
|
Brian Aker |
Bug Description
Regardless of whether "--listen" or "-L" is used, I found that gearmand is always binding to 0.0.0.0 (instead of the "127.0.0.1" which I was trying to set it to). After fiddling with the code, I think it's related to this around line 97 in libgearman-
if (host)
{
host= strdup(host_);
}
Removing the "if" test (and always forcing it to run "host= strdup(host_);") makes the listen argument work again. I'm not familiar enough with C++ to know why the if test is there, but it seems to be causing the host property to get lost. Later in the code, if there is no host set, it defaults to "<any>" which then turns into a bind to INADDR_ANY.
Changed in gearmand: | |
status: | New → In Progress |
assignee: | nobody → Brian Aker (brianaker) |
milestone: | none → 1.0.4 |
Changed in gearmand: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
Tried with all variations of -L and --listen with and without equals sign.
root@host: /usr/local# /usr/local/ sbin/gearmand --version /bugs.launchpad .net/gearmand
gearmand 1.0.3 - https:/
root@host: /usr/local# /usr/local/ sbin/gearmand --verbose INFO --listen=10.0.0.3 -p 4477
INFO 2013-02-20 18:49:29.086606 [ main ] Initializing Gear
INFO 2013-02-20 18:49:29.000000 [ main ] Starting up(5013), verbose set to INFO
INFO 2013-02-20 18:49:29.000000 [ main ] Listening on 0.0.0.0:4477 (8)
INFO 2013-02-20 18:49:29.000000 [ main ] Listening on :::4477 (9)
INFO 2013-02-20 18:49:29.000000 [ main ] Adding event for listening socket (8)
INFO 2013-02-20 18:49:29.000000 [ main ] Adding event for listening socket (9)