tinyerp-server start-stop-daemon: warning: failed to kill : No such process

Bug #220897 reported by Schmirrwurst
4
Affects Status Importance Assigned to Milestone
tinyerp-server (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: tinyerp-server

My tinyerp-server does not seems to work correctly, the most important failure seems to be that it can be restarted properly, or shutdown :
# /etc/init.d/tinyerp-server restart
Restarting tinyerp-server: start-stop-daemon: warning: failed to kill 18819: No such process
tinyerp-server.

Under Ubuntu 8.04, and with tinyerp-server-4.2.0-1ubuntu1

Revision history for this message
Nicolas Valcarcel (nvalcarcel) wrote :

Can you please run:
sh -x /etc/init.d/tinyerp-server restart
and paste the output here?

Revision history for this message
trevonio (carlos-lopezr) wrote :

Same problem. Still trying to figure out if is an installation problem... Anyway I write here my output:

+ PATH=/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/tinyerp-server
+ NAME=tinyerp-server
+ DESC=tinyerp-server
+ test -x /usr/sbin/tinyerp-server
+ . /etc/default/tinyerp-server
+ LOGFILE=/var/log/tinyerp.log
+ CONFIGFILE=/etc/tinyerp-server.conf
+ PORT=8069
+ INTERFACE=localhost
+ USER=terp
+ DATABASE_NAME=terp
+ DATABASE_USER=terp
+ DATABASE_PASSWORD=
+ DATABASE_HOST=
+ DATABASE_PORT=5433
+ DAEMON_OPTS=--config=/etc/tinyerp-server.conf --port=8069 --interface=localhost --database=terp --db_user=terp --db_password= --db_host= --db_port=5433 --logfile=/var/log/tinyerp.log
+ set -e
+ echo -n Restarting tinyerp-server:
Restarting tinyerp-server: + start-stop-daemon --stop --quiet --pidfile /var/run/tinyerp-server.pid --oknodo
start-stop-daemon: warning: failed to kill 26818: No such process
+ sleep 1
+ start-stop-daemon --start --quiet --pidfile /var/run/tinyerp-server.pid --chuid terp --background --make-pidfile --exec /usr/sbin/tinyerp-server -- --config=/etc/tinyerp-server.conf --port=8069 --interface=localhost --database=terp --db_user=terp --db_password= --db_host= --db_port=5433 --logfile=/var/log/tinyerp.log
start-stop-daemon: Unable to open pidfile `/var/run/tinyerp-server.pid' for writing: Permission denied (Permission denied)
+ echo tinyerp-server.
tinyerp-server.
+ exit 0

Revision history for this message
Yannick Warnier (ywarnier) wrote :

The process ID you get before issuing a restart (for example with "ps aux|grep tinyerp-server") is it the same as the one that the restart command tries to kill (in the message "...no such process")?

Apparently the tinyerp-server process cannot write to /var/run/tinyerp-server.pid, preventing it to write its process ID, thus preventing restart to get it when trying to kill the process.

Please check that the user you use to start the tinyerp-server process has the write to write inside /var/run (launching the "start" command as root should do the trick).

Revision history for this message
Yannick Warnier (ywarnier) wrote :

Considering the log tells you specifically that:

start-stop-daemon: Unable to open pidfile `/var/run/tinyerp-server.pid' for writing: Permission denied (Permission denied)

... I don't think it should be considered as a bug ;-)

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

I think it should be sonsidered as a bug, because a package should work out of the box. If the startup script /etc/init.d/tinyerp-server does not use a user able to write in /var/run, then it as to be fixed in the package...
It is the package that create the user terp, it could then also give it the rights to write in /var/run; or it could be decided to run tinyerp-server as another user (root), what might be the worst scenario.

Anyway, the solution has to be provided by the package, it is not the aim of a package, that the enduser must change rights and so on... manually after install

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

In fact I could find one possible reason of that problem (it might be other one) : when the server failed to start (in my case because unable to connect database), the pid file is written anyway... to the startup script is trying to kill a pid that is not existing...
The nice way, where to rewrite the startup script to display an error when trying to restart a server that is not running...

Changed in tinyerp-server:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.