HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
RE: Cannot create data socket (127.0.0.1, 4558): Address already in use
> -----Oorspronkelijk bericht-----
> Van: David Woolley [SMTP:david@djwhome.demon.co.uk]
> Verzonden: Friday, April 14, 2000 12:38 AM
> Aan: Bastiaan.Bakker@lifeline.nl
> CC: flexfax@sgi.com
> Onderwerp: Re: flexfax: Cannot create data socket (127.0.0.1, 4558):
> Address already in use
>
> > How can I make sure this error does not occur? Is it a configuration
> > error in Sendmail or HylaFAX or a bug? Is it absolutely necessary that
>
> As Hylafax uses SO_REUSEADDR, I assume it is a bug in your OS (Linux
> has this bug). The OS is probably using 4558 as a dynamic port number,
> when it should be using port numbers which start just a little below
> 50,000, up to the maximum.
>
Yes, the machine is running Linux. I'm a bit confused about Linux'
behaviour with respect to SO_REUSEADDR, it seems its semantics on Linux have
changed quite often lately. Could you please elaborate on how it is broken
and how that relates to the HylaFAX problem?
The ip local port range (as in
/proc/sys/net/ipv4/ip_local_port_range) is 1024:4999, the default for
most(?) Linux distributions. Should I change this to something higher?
> > the data socket always is on port 4558 rather than an arbitrary free
> > socket? Would a passive connection solve the problem? If so, where can I
>
> This is the same protocol as used by FTP. FTP uses a port in the
> privileged server range, whereas Hylafax uses one in the unprivileged
> server range. Although it could probably retry, this would fall
> foul of any firewall configuration set up to permit the use of the
> standard port.
>
Well, the connection is not going through a firewall, so I don't
really care about the port number. Would changing
data_source.sin_port = htons(ntohs(ctrl_addr.sin_port)-1);
to
data_source.sin_port = htons(0);
in hfaxd/InetFaxServer.c++ be OK?
> > find some documentation about this feature?
>
> Try Unix Network Programming.
>
Well, I was refering to the passive FTP feature in hfaxd. After
browsing through the source a bit more, it seems that for a passive FTP type
connection I would need to modify class InetTransport. Before I start
hacking away, would a passive connection solve the problem?
Thanks,
Bastiaan Bakker