Discussion:
portmapd and sshd won't run as daemons
(too old to reply)
Rob Mitchell
2004-10-11 20:52:01 UTC
Permalink
I have a confusing problem where neither portmapd, or sshd will run as
daemons (eg via /etc/rc.d/init.d/portmap or ssh) but will run fine if I
turn on debugging (eg. /sbin/portmap -d or /usr/sbin/sshd -d ) and run
them in a console (as root)

The message that I get when running redhat-config-services is
"xxx is dead, but subsys locked." (if I try to start portmap for
instance from the redhat ui). At boot time, if I enable portmap or sshd
to run, startup hangs and I have to use interactive mode to get the
system up. (I'm pretty certain that this all worked at one point)

I've removed lock files, even moved /var/lock/subsys and created a new
one. I've looked in /var/run for defunct processes.

When running with debug on, they work fine and processes that use them
(like NFS) work fine.

I've looked through /var/log/messages and boot.log but when portmap is
running as a daemon, it doesn't seem to output anything (and when I turn
on debug, it works!)

Questions:
Is there any way to get some more output from portmap when it is running
as a daemon? How can I turn on -v option?

What other processes does portmap depend on (eg. iptables?)

Thanks for your help!

kernel is vmlinux-2.4.22-1.2115.nptl, fedora core1
Bill Marcum
2004-10-12 03:13:49 UTC
Permalink
["Followup-To:" header set to comp.os.linux.questions.]
On Mon, 11 Oct 2004 16:52:01 -0400, Rob Mitchell
Post by Rob Mitchell
I've looked through /var/log/messages and boot.log but when portmap is
running as a daemon, it doesn't seem to output anything (and when I turn
on debug, it works!)
Are you sure that /var is not full?
--
System Events
=-=-=-=-=-=-=
Sep 16 03:31:11 don kernel: lp0 on fire
Rob Mitchell
2004-10-14 01:08:14 UTC
Permalink
Post by Bill Marcum
["Followup-To:" header set to comp.os.linux.questions.]
On Mon, 11 Oct 2004 16:52:01 -0400, Rob Mitchell
Post by Rob Mitchell
I've looked through /var/log/messages and boot.log but when portmap is
running as a daemon, it doesn't seem to output anything (and when I turn
on debug, it works!)
Are you sure that /var is not full?
[***@boxster robm]$ df /var
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 10270304 6052100 3696496 63% /
[***@boxster robm]$

seems to be ok. Other messages are put in the log just fine. Also,
portmap does work in debug mode (/sbin/portmap -d) which cause it to run
in the foreground and output lots of messages. (all good)

permissions?
-rwxr-xr-x 1 root root 33392 Sep 23 2003 /sbin/portmap

init files?
/etc/rc.d/init.d/portmap
/etc/rc.d/rc0.d/K87portmap
/etc/rc.d/rc1.d/K87portmap
/etc/rc.d/rc2.d/K87portmap
/etc/rc.d/rc3.d/S13portmap
/etc/rc.d/rc4.d/S13portmap
/etc/rc.d/rc5.d/K87portmap
/etc/rc.d/rc6.d/K87portmap

(Note that rc5.d is K, because I had to turn it off in order to boot,
otherwise my system hangs for a while coming up. When on, this was
S13portmap)

[***@boxster robm]$ ll /etc/rc.d/rc5.d/K87portmap
lrwxrwxrwx 1 root root 17 Oct 12 00:19
/etc/rc.d/rc5.d/K87portmap -> ../init.d/portmap
[***@boxster robm]$

[***@boxster init.d]$ ll portmap
-rwxr-xr-x 1 root root 1817 Oct 12 00:11 portmap


What seems to happen is that portmap starts with no messages at all, but
dies (or didn't really start). portmap stop, then fails.

I even hardcoded the path into the portmap script to make sure it was
going the right place.

I'm at a loss.

Rob

Loading...