RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1039685 - init script incorrectly reports runing bind even there is none
Summary: init script incorrectly reports runing bind even there is none
Keywords:
Status: CLOSED DUPLICATE of bug 980632
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bind
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomáš Hozza
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-09 18:54 UTC by Milan Kerslager
Modified: 2013-12-10 09:51 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-10 09:51:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milan Kerslager 2013-12-09 18:54:26 UTC
Sometimes bind die and leaves pid file in place. Then "status" query is reported incorrectly as running even there is no running process at all:

$ /etc/init.d/named status
rndc: connect failed: 127.0.0.1#953: connection refused
named (pid  1319) is running...
[root@neptun ~]# echo $?
0
$ ps xaOT | grep 1319
31465 pts/0    S+     0:00 grep 1319
$ cat /var/named/chroot//var/run/named/named.pid
1319
$ bash -x /etc/init.d/named status
+ . /etc/rc.d/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -f /etc/sysconfig/i18n -a -z '' -a -z '' ']'
++ . /etc/profile.d/lang.sh
++ unset LANGSH_SOURCED
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'
+++ SETCOLOR_WARNING='echo -en \033[0;33m'
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'
+++ PROMPT=yes
+++ AUTOSWAP=no
+++ ACTIVE_CONSOLES='/dev/tty[1-6]'
+++ SINGLE=/sbin/sushell
++ '[' pty = serial ']'
++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
+ '[' -r /etc/sysconfig/named ']'
+ . /etc/sysconfig/named
++ ROOTDIR=/var/named/chroot
+ RETVAL=0
+ export KRB5_KTNAME=/etc/named.keytab
+ KRB5_KTNAME=/etc/named.keytab
+ named=named
+ '[' -x /usr/sbin/named-sdb ']'
+ NAMED_SHUTDOWN_TIMEOUT=25
+ '[' -n /var/named/chroot ']'
++ echo /var/named/chroot
++ sed 's#//*#/#g;s#/$##'
+ ROOTDIR=/var/named/chroot
++ /usr/bin/readlink /var/named/chroot
+ rdl=
+ '[' -n '' ']'
+ PIDFILE=/var/run/named/named.pid
+ ROOTDIR_MOUNT='/etc/named /etc/pki/dnssec-keys /var/named /etc/named.conf
/etc/named.dnssec.keys /etc/named.rfc1912.zones /etc/rndc.conf /etc/rndc.key
/usr/lib64/bind /usr/lib/bind /etc/named.iscdlv.key /etc/named.root.key'
+ case "$1" in
+ rhstatus
+ '[' -x /usr/sbin/rndc ']'
+ /usr/sbin/rndc status
rndc: connect failed: 127.0.0.1#953: connection refused
+ status -p /var/named/chroot//var/run/named/named.pid -l named /usr/sbin/named
+ local base pid lock_file= pid_file=
+ '[' 5 = 0 ']'
+ '[' -p = -p ']'
+ pid_file=/var/named/chroot//var/run/named/named.pid
+ shift 2
+ '[' -l = -l ']'
+ lock_file=named
+ shift 2
+ base=named
+ __pids_var_run /usr/sbin/named /var/named/chroot//var/run/named/named.pid
+ local base=named
+ local pid_file=/var/named/chroot//var/run/named/named.pid
+ pid=
+ '[' -f /var/named/chroot//var/run/named/named.pid ']'
+ local line p
+ '[' '!' -r /var/named/chroot//var/run/named/named.pid ']'
+ :
+ read line
+ '[' -z 1319 ']'
+ for p in '$line'
+ '[' -z '' -a -d /proc/1319 ']'
+ pid=' 1319'
+ :
+ read line
+ '[' -z '' ']'
+ break
+ '[' -n ' 1319' ']'
+ return 0
+ RC=0
+ '[' -z /var/named/chroot//var/run/named/named.pid -a -z ' 1319' ']'
+ '[' -n ' 1319' ']'
+ echo 'named (pid  1319) is running...'
named (pid  1319) is running...
+ return 0
+ return 0
+ RETVAL=0
+ exit 0

I did not tested English locale (I have cs_CZ.UTF-8).
I have bind-9.8.2-0.17.rc1.el6_4.6.x86_64

Comment 2 Tomáš Hozza 2013-12-10 09:51:30 UTC

*** This bug has been marked as a duplicate of bug 980632 ***


Note You need to log in before you can comment on or make changes to this bug.