Ubuntu

/var/run/zabbix-server deleted after reboot

Reported by c.bubel on 2007-11-29
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zabbix (Ubuntu)
Undecided
Unassigned
Hardy
Undecided
Unassigned

Bug Description

Same Problem as in "#96644 zabbix_agentd will not start after reboot"

Here is a fixed version of /etc/init.d/zabbix-server

#! /bin/sh
### BEGIN INIT INFO
# Provides: zabbix-server
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Start zabbix-server daemon
### END INIT INFO
DAEMON=/usr/sbin/zabbix_server
NAME=zabbix_server
DESC="Zabbix server"
PID=/var/run/zabbix-server/$NAME.pid

### BEGIN /var/run Fix

DIR=/var/run/zabbix-server

if test ! -d "$DIR"; then
        mkdir "$DIR"
        chown -R zabbix:zabbix "$DIR"
fi

### END /var/run Fix

test -f $DAEMON || exit 0

set -e

export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"

case "$1" in
  start)
    rm -f $PID
        echo "Starting $DESC: $NAME"
        start-stop-daemon --oknodo --start --pidfile $PID \
                --exec $DAEMON < /dev/null &> /dev/null
        ;;
  stop)
        echo "Stopping $DESC: $NAME"
        start-stop-daemon --oknodo --stop --pidfile $PID \
                --exec $DAEMON
        ;;
  restart|force-reload)
        $0 stop
        sleep 2
        $0 start
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0

Michael (m-gruys) wrote :

Great code. It works smoothly in Ubuntu 7.10. I had already a workaround of this "startup failure" bug, but my code was not integrated in the init.d startup file.
Thanks a lot.

Stephan Adig (sadig) on 2008-04-07
Changed in zabbix:
assignee: nobody → shermann
status: New → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zabbix - 1:1.4.2-4ubuntu3

---------------
zabbix (1:1.4.2-4ubuntu3) hardy; urgency=low

  * debian/zabbix-agent.init:
    + fixing missing pid directory in /var/run
      - Closes (LP: #96644)
      - Closes (LP: #172775)
  * Modify Maintainer value to match the DebianMaintainerField
    specification.

 -- Stephan Hermann <email address hidden> Mon, 07 Apr 2008 08:39:06 +0200

Changed in zabbix:
status: Confirmed → Fix Released
Michele Cella (mcella82) wrote :

Actually this bug is not fixed.

The proposed fix is good (and is the same used in #96644) but the zabbix-1.4.2-4ubuntu3 package only fixed the zabbix-agent.init script and not the server init scripts (I double checked looking at the package sources):

- zabbix-server-pgsql.zabbix-server.init
- zabbix-server-mysql.zabbix-server.init

Please apply the same fix to both of these files.

Thanks!

Changed in zabbix:
status: Fix Released → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zabbix - 1:1.4.5-1ubuntu1

---------------
zabbix (1:1.4.5-1ubuntu1) intrepid; urgency=low

  * Merge from debian unstable, remaining changes:
    + fixing missing pid directory in /var/run
  * Added the same patch to debian/zabbix-server-{mysql,pgsql}.zabbix-server.init
    (LP: #172775)

zabbix (1:1.4.5-1) unstable; urgency=high

  * New upstream release
  * Fixed remote DoS (CVE-2008-1353) Closes: #471678

zabbix (1:1.4.4-5) UNRELEASED; urgency=low

  * NOT RELEASED YET

zabbix (1:1.4.4-4) unstable; urgency=low

  * Depend on php5 only (Closes: #466415)

zabbix (1:1.4.4-3) unstable; urgency=low

  * Add polish po file
  * sleep on agent restart (Closes: #459870)
  * remove bashisms (Closes: #465381, #465382, #465383)

zabbix (1:1.4.4-2) unstable; urgency=high

  * install images_mysql.sql and images_pgsql.sql
    Closes: #456517

zabbix (1:1.4.4-1) unstable; urgency=high

  * New upstream release
  * Remove patch for vm memory size and CVE, both have been
    merged upstream.
  * Compile server with jabber support, add libiksemel-dev to b-d
    Closes: #454541
  * Add nl.po (Closes: #448929)
  * do not install empty directory for agent package
  * should be compliant with standards version 3.7.3

 -- Stephan Hermann <email address hidden> Wed, 04 Jun 2008 09:22:37 +0200

Changed in zabbix:
status: Confirmed → Fix Released
msk (dusanmsk) wrote :

Fixed package still not provided by hardy-updates, ubuntu server edition still affected!

Chris Wadge (cwadge) wrote :

I can confirm that it does still affect Hardy and it's also a problem in Intrepid. Same problems, identical symptoms, in both server and agent.

Changed in zabbix (Ubuntu):
status: Fix Released → Confirmed
Changed in zabbix (Ubuntu):
assignee: Stephan Hermann (shermann) → Krzysztof Klimonda (kklimonda)
status: Confirmed → In Progress
Miek Gieben (miek) wrote :

Why not use the following code:

if test ! -d $(dirname $PID); then
    mkdir $(dirname $PID)
    chown -R zabbix:zabbix $(dirname $PID)
fi

safes a variable, not a big deal, but still.

Changed in zabbix (Ubuntu):
assignee: Krzysztof Klimonda (kklimonda) → nobody
status: In Progress → Confirmed
Jonathan Riddell (jr) wrote :

This seems to have been uploaded to hardy-proposed but there's no patch on this bug report and no moru-sru approval so it'll stay in Unapproved for now.

Jonathan Riddell (jr) wrote :

Turns out this patch is actually from bug 96644

Accepted into hardy-proposed, please test

Changed in zabbix (Ubuntu):
status: Confirmed → Fix Committed
Martin Pitt (pitti) wrote :

Anyone who could test this? Otherwise I'll remove it from -proposed again.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zabbix - 1:1.6.1-3ubuntu0.1

---------------
zabbix (1:1.6.1-3ubuntu0.1) jaunty-proposed; urgency=low

  * debian/zabbix-agent.init:
    - Create pid directory in /var/run on start (LP: #96644)
  * debian/zabbix-server-{mysql,pgsql}.zabbix-server.init:
    - Create pid directory in /var/run on start (LP: #172775)

 -- Krzysztof Klimonda <email address hidden> Thu, 21 May 2009 14:22:17 +0200

Changed in zabbix (Ubuntu):
status: Fix Committed → Fix Released
Martin Pitt (pitti) on 2010-01-25
Changed in zabbix (Ubuntu Hardy):
status: New → Fix Committed
Paul Elliott (omahn) wrote :

I'm happy to confirm that 1.4.2-4ubuntu3.1 of zabbix-server-mysql from hardy-proposed successfully restarts after a reboot, unlike 1.4.2-4ubuntu3 from hardy. zabbix-agent also tested and restarts successfully after a reboot.

Martin Pitt (pitti) on 2010-03-24
tags: added: verification-done
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zabbix - 1:1.4.2-4ubuntu3.1

---------------
zabbix (1:1.4.2-4ubuntu3.1) hardy-proposed; urgency=low

  * debian/zabbix-server-{mysql,pgsql}.zabbix-server.init:
    - Create pid directory in /var/run on start (LP: #172775)

 -- Krzysztof Klimonda <email address hidden> Thu, 21 May 2009 17:36:58 +0200

Changed in zabbix (Ubuntu Hardy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers