Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[hylafax-users] HylaFAX on Ubuntu 9.10: hosts.hfaxd issues

321 views
Skip to first unread message

Alessandro Ranellucci

unread,
Nov 9, 2009, 2:09:23 PM11/9/09
to hylafa...@hylafax.org
Hi all,

I've got trouble in using HylaFAX on a freshly installed Ubuntu
9.10. I found reports from other users about the same issue, so
I think that it could be an issue in the Ubuntu hylafax-server
package (2:6.0.3-2ubuntu1).

1) If I populate the /etc/hylafax/hosts.hfaxd manually (for
example by putting 127.0.0.1 into it), programs like faxstat
ignore it and keep requesting a password.

2) If I run the command faxadduser (with or without arguments),
then hosts.hfaxd is emptied and nothing is written to it. No
errors are returned.

I can't find anything in the logs.

I reported the bug to Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/hylafax/+bug/477478

Any clue about how to debug this?
Thanks,

alessandro ranellucci.


____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-us...@hylafax.org < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sa...@ifax.com.*

Siri Vias Khalsa

unread,
Nov 9, 2009, 3:04:30 PM11/9/09
to Alessandro Ranellucci, hylafa...@hylafax.org
You might be formatting the entries incorrectly. Try adding the same
thing from faxadduser and compare.

-Siri Vias

Alessandro Ranellucci

unread,
Nov 9, 2009, 3:10:55 PM11/9/09
to hylafa...@hylafax.org
On 9-11-2009 at 21:01, Siri Vias Khalsa wrote:

>You might be formatting the entries incorrectly. Try adding
the same
>thing from faxadduser and compare.

Thanks for your answer.

As I said, whenever I run faxadduser hosts.hfaxd is emptied and
nothing is written to it. So there's nothing to compare. :-)

Any idea?

- alessandro ranellucci.

Andy Rogers

unread,
Nov 9, 2009, 3:36:16 PM11/9/09
to Alessandro Ranellucci, hylafa...@hylafax.org
> Have you tried running "/etc/init.d/hylafax restart" command once you have
> made changes to hosts.hfaxd file.
>
> I belive hylafax then copies files from this location to
> /var/spool/hylafax/etc/ directory kind of syncing them on a debian based
> system.
>
> I would recommend to use the faxadduser command each time to alter this
> file.
>
> I find it usually best to do this to make sure hylafax is aware of changes
> to files after they have been made.
>
> Andy
>
> 2009/11/9 Alessandro Ranellucci <al...@primafila.net>

Alessandro Ranellucci

unread,
Nov 10, 2009, 5:02:32 AM11/10/09
to hylafa...@hylafax.org
On 9-11-2009 at 21:35, Andy Rogers wrote:
>I would recommend to use the faxadduser command each time to alter
>this file.

Andy, thanks for your answer.

I guess I wasn't clear enough in stressing that the problem is _faxadduser_not_working_:

root@intranet:/etc/hylafax# faxadduser -a pwd admin
root@intranet:/etc/hylafax# cat /etc/hylafax/hosts.hfaxd
root@intranet:/etc/hylafax# cat /var/spool/hylafax/etc/hosts.hfaxd
root@intranet:/etc/hylafax#

Some more debugging info, including a strace of faxadduser can
be found here: http://pastebin.ca/1664678

What could be wrong?

Andy Rogers

unread,
Nov 10, 2009, 7:08:21 AM11/10/09
to Alessandro Ranellucci, hylafa...@hylafax.org
Ok, Sorry i did miss read your email a little bit earlier on before.

I have just done a fresh install of hylafax 6.0.3 from the Ubuntu Repo's on
9.10 and before I used faxadduser there was writing in the hosts file under
/etc/hylafax, but then after running the file faxadduser, hosts file was
completly blank.

Looking at your pastebin from the strace command, it looks like some files
have moved location, as when hylafax is looking for them they are not
present.

I think needs to be looked at a bit closer by the developers so see if they
can shed somelight on this. I know that gcc 4.4 is now the default so this
maybe something to do with it.

Comments please.....

2009/11/10 Alessandro Ranellucci <al...@primafila.net>

Aidan Van Dyk

unread,
Nov 10, 2009, 9:43:08 AM11/10/09
to Alessandro Ranellucci, Giuseppe Sacco, hylafa...@hylafax.org
* Alessandro Ranellucci <al...@primafila.net> [091110 05:02]:

> On 9-11-2009 at 21:35, Andy Rogers wrote:
> >I would recommend to use the faxadduser command each time to alter
> >this file.
>
> Andy, thanks for your answer.
>
> I guess I wasn't clear enough in stressing that the problem is _faxadduser_not_working_:
>
> root@intranet:/etc/hylafax# faxadduser -a pwd admin
> root@intranet:/etc/hylafax# cat /etc/hylafax/hosts.hfaxd
> root@intranet:/etc/hylafax# cat /var/spool/hylafax/etc/hosts.hfaxd
> root@intranet:/etc/hylafax#
>
> Some more debugging info, including a strace of faxadduser can be found
> here: http://pastebin.ca/1664678
>
> What could be wrong?

I would guess this is ubuntu/debian specific with the new debian packaging stuff...

IIRC, Guisseppe said he intended to change the HylaFAX init scripts to
bind-mount all of /etc/hylafax into /var/spool/hylafax/etc...

Another patch debian used to carry (which I'm assuming would change if
he bind-mounts things) is that faxadduser wrote to
$SPOOL/etc/hosts.hfaxd, and then "re-wrote" /etc/hylafax/hosts.hfaxd.
Looking at your strace:

29 open("/var/spool/hylafax/etc/hosts.hfaxd", O_RDWR|O_CREAT|O_APPEND, 0666) = 3
30 fstat(3, {st_mode=S_IFREG|0666, st_size=0, ...}) = 0
31 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9337780000
32 write(3, "^admin@:::0pwgpNhfgByXM\n", 24) = 24
33 close(3) = 0

So it's writting $SPOOL/etc/hosts.hfaxd corrctly (appended the line), but then:
35 open("/var/spool/hylafax/etc/hosts.hfaxd", O_RDONLY) = 3
36 open("/etc/hylafax/hosts.hfaxd", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4

If /etc/hylafax is bind-mounted into $SPOOL/etc, then this will effectivaly
truncate *both* files before it can be "re-read and re-copied" to the one
in /etc/hylafax/, as seen:
39 read(3, "", 8192) = 0


So, if you bind-mount /etc/hylafax into $SPOOL/etc , you can't "reread" one
after truncating the other...

a.

--
Aidan Van Dyk ai...@ifax.com
Senior Software Developer +1 215 825-8700 x8103
iFAX Solutions, Inc. http://www.ifax.com/

signature.asc

Giuseppe Sacco

unread,
Nov 10, 2009, 11:18:43 AM11/10/09
to Alessandro Ranellucci, hylafa...@hylafax.org
Il giorno lun, 09/11/2009 alle 20.09 +0100, Alessandro Ranellucci ha
scritto:

> Hi all,
>
> I've got trouble in using HylaFAX on a freshly installed Ubuntu
> 9.10. I found reports from other users about the same issue, so
> I think that it could be an issue in the Ubuntu hylafax-server
> package (2:6.0.3-2ubuntu1).
[...]

I think you found a bug in debian and ubuntu package. hylafax 6.0
package changed the way hfaxd.hosts is managed since the file is now
shared between /etc/hylafax and /var/spool/hylafax/etc using a mount -o
bind command. The problem is that this package need to also keep these
two files in sync when running on kernel different than linux, i.e.,
*bsd or hurd. In the latter case, the file should be copied, while on
linux it shouldn't.

Corrent code is bogus since it does copy the file even when they are the
same. Possibly this code delete the actual content. I'll have a look at
it during next days.

Bye,
Giuseppe

2f@n

unread,
Dec 3, 2009, 2:50:15 AM12/3/09
to
faxadduser tries to copy /var/spool/hylafax/hosts.hfaxd to /etc/
hylafax/hosts.hfaxd or vice versa, but they're the very same file due
to mount of the dir to the other. Therefore, it truncates the file to
the 0 bytes.

use

faxadduser -f ~/hosts.hfaxd -otheroptionsuuse

and then

cp ~/hosts.hfaxd /etc/hylafax

This wasn't enough for my case, by the way, and I had to add

UserAccessFile: "//etc/hylafax/hosts.hfaxd" # note the // at the
beginning

to /etc/hylafax/hfaxd.conf, yes, with double / at the beginning :)

quick... n... dirty...

:)


On Nov 9, 9:09 pm, Alessandro Ranellucci <a...@primafila.net> wrote:
> Hi all,
>
> I've got trouble in using HylaFAX on a freshly installed Ubuntu
> 9.10. I found reports from other users about the same issue, so
> I think that it could be an issue in the Ubuntu hylafax-server
> package (2:6.0.3-2ubuntu1).
>
> 1) If I populate the /etc/hylafax/hosts.hfaxd manually (for
> example by putting 127.0.0.1 into it), programs like faxstat
> ignore it and keep requesting a password.
>
> 2) If I run the command faxadduser (with or without arguments),
> then hosts.hfaxd is emptied and nothing is written to it. No
> errors are returned.
>
> I can't find anything in the logs.
>
> I reported the bug to Ubuntu:https://bugs.launchpad.net/ubuntu/+source/hylafax/+bug/477478
>
> Any clue about how to debug this?
> Thanks,
>
>       alessandro ranellucci.
>
> ____________________ HylaFAX(tm) Users Mailing List _______________________

>   To subscribe/unsubscribe, clickhttp://lists.hylafax.org/cgi-bin/lsg2.cgi
>  On UNIX: mail -s unsubscribe hylafax-users-requ...@hylafax.org < /dev/null

0 new messages