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
>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, 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 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>
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/
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
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