I'm using Ubuntu Server 14.04. After I make modification to /etc/init.d/gearman-job-server and type:

# sudo service gearman-job-server restart

it ignores modification I've made. But then I type:

# /etc/init.d/gearman-job-server restart

everything works. Do those scripts are now in Ubuntu 14.04 are cached somethere?

  • Does the service have an upstart job file in addition to the sysv init script?
    – jordanm
    Commented Jul 13, 2015 at 13:13

2 Answers 2


After having a similar problem on Ubuntu 15.10 trying to change the listen address, I discovered that the traditional init scripts are ignored, and the systemd configuration is hard-coded to listen only on

The solution is to modify the systemd configuration, reload it, and then restart the service.

Modify the configuration

The configuration can be modified directly or via an override file.

Via direct modification

The systemd service configuration is located at /lib/systemd/system/gearman-job-server.service. Edit this file and change the ExecStart line to include the parameters you need.

Via an override file

Create the file /etc/systemd/system/gearman-job-server.service.d/gearman-job-server.conf.

Put the following configuration into the file to override the ExecStart command.

ExecStart=/usr/sbin/gearmand --pid-file=/run/gearman/server.pid --log-file=/var/log/gearman-job-server/gearman.log

The empty ExecStart= line is necessary to remove the original command line. Without it the system would try and execute both the original and the custom one.

Reload the configuration

Run the following command so that systemd will reload the service configuration

/bin/systemctl daemon-reload

Restart the service

service gearman-job-server restart

When using sudo service Ubuntu 12.04 and Ubuntu 14.04 will first to look init script in /etc/init (upstart) and then /etc/init.d, so it first will find this script:


and then


Btw there is also bug in gearman-job-server.conf which is described here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .