FreeBSD 6.2 + xinetd + amanda problem

Matt Ruzicka matt at frii.com
Thu Jan 25 18:33:32 UTC 2007


I sent this to freebsd-questions first, but hadn't heard anything.  I 
wasn't sure if this wasn't the better place for it anyway.

I seem to be running into a strange issue/bug that appears to be related 
to FreeBSD 6.2, manifesting itself in my case through problems with xinetd 
and amanda.

FreeBSD 6.2 was released while we was building out a couple new servers so 
we took the opportunity to upgrade these boxes from 6.1 to 6.2 following 
the instructions in UPDATING.  Initially everything seemed fine, but then 
we noticed that our previously working amanda backups started to fail. 
(We install amanda from source and run it from xinetd, which we install 
from ports.)

Initially I figured amanda just needed to be recompiled, but the new install 
was failing as well.  Specifically amcheck from the amanda server was reporting 
that the client self check was timing out.  (A common and usually easily fixed 
issue.)  During the troubleshooting I noticed that xinetd was reporting the 
following errors in /var/log/messages.

Jan 24 14:36:34 hostname xinetd[44463]: fcntl( 0, clear close-on-exec ) failed: Bad file descriptor (errno = 9)
Jan 24 14:36:34 hostname xinetd[44463]: dup2( 0, 0 ) failed: Bad file descriptor (errno = 9)

After these errors finished the amanda server would report the selfcheck 
request timed out and suggest the host was down.  Normally when this runs 
the amanda client creates a /tmp/amanda directory on the client being 
backed up, but after the selfcheck fails the directory has not been 
created.  This seems to imply that amanda is never actually starting.

This lead me to believe that there was something wrong with xinetd and not 
amanda so I disabled amanda from the xinetd config and added it to plain old 
inetd and fired it up.  With amanda running from inetd the selfcheck would 
complete properly and the /tmp/amanda would be created with the proper 
files.

The strange thing I have two other services running from xinetd that /are/ 
working just fine, so xinetd itself seems to be at least partially ok.

After re-installing xinetd about a dozen times with variations in the 
config options and from both ports and source I'm still getting the same 
errors and it's really eating my lunch.

I am able to confirm that the amanda and xinetd configs were working under 
6.1 because we have backups of these machines before the upgrade.  Also, 
this combination of services are running just fine on other servers. 
Just to be sure though I reinstalled amanda and xinetd on one of my 6.1 
boxes from the same source that I'm having trouble with on 6.2 and 
everything works fine on 6.1.

So in short:

  Under FreeBSD 6.1 xinetd and amanda work fine
  Under FreeBSD 6.2 xinetd works for some services, but not amanda
  Under FreeBSD 6.2 amanda works through inetd, but not xinetd
  Both xinetd and amanda have been recompiled on FreeBSD 6.2

It seems very odd, but there does seem to be some strange subtle issue or bug 
with FreeBSD 6.2 as it relates to the combination of amanda and xinetd.

Has anyone else seen anything even remotely similar with FreeBSD 6.2?

What other information can I gather to help shed more light on this?

Thanks in advance for your time and I apologize if something similar has 
already been discussed and I somehow missed it in my troubleshooting and 
research.

Thanks.

Matt Ruzicka - Senior Systems Administrator
FRII
970-212-0728  matt at frii.net


More information about the freebsd-hackers mailing list