Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help: hfaxd says "cant stat /dev/null" (2nd try)



> 
> > I have the following problem setting up hylafax:
> > hfaxd exits immediately with the following message in syslog:
> > 
> > "Jun 18 19:52:09 cygnus HylaFAX[1014]: stat(/dev/null): No such file 
                                                                          or
> > directory"

hfaxd chroot's to /var/spool/fax, so /var/spool/fax/dev/null needs to exist.
My beta 020 version successfully creates this (or at least the failure produces
no error messages).  It is just possible that someone has moved the chroot
call to before the point where /var/spool/fax/dev/null is created.  This
will work if a previous version has been run and created the file.  This would
be consistent with the error message

You can check for this by using strace.  hfaxd doesn't disassociate from
the terminal until after the cloning of /dev/null.  Better would be to look
at the source (hfaxd/main.c++; I don't have the current sources because the
office went for a commercial product and Hylafax is not exercised enough to
find bugs that need repairing).

If a moved chroot is the problem, mknodding dev/null in /var/spool/fax 
should get you past the failure.

> > 
> > Here's my configuration for the fax server:
> > 
> > PC 486/33, 8MB RAM
> > Linux based on Slackware (with several updates)
> > hylafax_4_0_1_orig.tar.gz / Linux-binary version

This is not what I would consider the configuration and is incomplete;
there are many versions of Slackware and conceivably many binary ports
of Hylafax to Linux.

Actually, there is a general problem with binary ports, in that they
tend to be used by plug and play users, even though Hylafax is not plug
and play.  That means that first level support really needs to come from
whoever packaged the binary.  That support might still be through the
mailng list, but it would help if the nature of the port were in the
subject line.

> > 
> To complete the facts which were indicated in your mails:
> - I've run faxsetup (several times now)
> - /dev/null exists, works fine, and you can be "stat"ed (done it
> manually)
> - hfaxd is owned by root and has permissions -rwsr-xr-x, suid is set
> - /var/spool/fax/dev/ is empty. What should be there? Can I set this up 
> manually? The error message in syslog references "/dev/null".

> - hfaxd is called by inetd (if I try to connect) and exits at once.
> 
> Can now somebody figure out what this strange message means. 
> 
> Thanx in advance
> 	Joe
> 
> PS: Please answer with email to me, not to the mailing list, i'm not
> subscribed...

This isn't a developer's list, it is a mutual support list, so you should
subscribe if you expect support.  I've noticed quite a few repeat questions
about USR modems and many questions about transmit phase B errors (which
would have had more specific subjects if people had read the list and
realised that this is a generic error message for class 2 modem problems).


These are the relevant fragments of code in beta 020:

In main:

   237      if (detach == -1)                   // no protocol options means -I
   238          detach = FALSE;
   239      if (Sys::chdir(queueDir) < 0)
   240          fatal(queueDir | ": Can not change directory");
   241      CheckSpoolingSetup();
   242      if (detach)
   243          detachFromTTY();


A chroot between 240 and 241 would cause the symptoms.

In CheckSpool:

    91       * Craft a private /dev/null in the chroot'd filesystem
    92       * for use by syslog because some syslogs require this
    93       * to function correctly.
    94       */
    95      if (!Sys::isCharSpecialFile(PATH_DEVNULL)) {
    96          if (!Sys::isCharSpecialFile("/" PATH_DEVNULL, sb))
    97              fatal("stat(%s): %s", "/" PATH_DEVNULL, strerror(errno));
    98          if (mknod(PATH_DEVNULL, sb.stsmode, sb.stsrdev) < 0)
    99              fatal("Could not create %s: %s", PATH_DEVNULL_ strerror(errno));



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services