Please vote this feature request

Hell people,

Drop appending 127.0.0.2
line to /etc/hosts (incl. related configuration options)

[Bug 573488 - Installation adds
127.0.0.2 to /etc/hosts which breaks a lot of network software](Bug 573488 - Installation adds 127.0.0.2 to /etc/hosts which
breaks a lot of network software)

Bug 824141 -
appending 127.0.0.2 line to /etc/hosts causes postfix to go berseck

In a nutshell: yast network configuration adds a line at the end of the
hosts file that causes some apps to go nuts. Details, links above. Some
of the buzillas are not accessible.

The registration to vote is the same as that of the forum and bugzilla
service.

It is important you vote: this was reported years ago, to be solved on
11.3. They did nothing, 11.3 was out, then the fate was closed
bureaucratically because a fate for 11.3 was too late.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-06-11 02:13, Carlos E. R. wrote:
> Hell people,

Oops. That was intended to be “hello” :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Maybe you had it right the first time :stuck_out_tongue:

I am not understanding the point here. The 127.0.0.2 is only added if I check the box “Assign Hostname to Loopback IP”. So if you don’t check that box, you should be fine.

What am I missing?

Personally, I am using “sendmail” rather than “postfix”. And “sendmail” will probably complain if that line is not added, though it will still work if you ignore the complaint.

On 2013-06-11 03:16, nrickert wrote:
>
> robin_listas;2563973 Wrote:
>> Oops. That was intended to be “hello” :slight_smile:
>
> Maybe you had it right the first time :stuck_out_tongue:
>
> I am not understanding the point here. The 127.0.0.2 is only added if
> I check the box “Assign Hostname to Loopback IP”. So if you don’t check
> that box, you should be fine.

In that case, YaST should warn of the possible consequences.

Besides, I take that IP to be 127.0.0.1, not 2.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On Tue, 11 Jun 2013 00:13:06 +0000, Carlos E. R. wrote:

> Hell people,
>
>
> Drop appending 127.0.0.2
> line to /etc/hosts (incl. related configuration options)

>
> [Bug 573488 - Installation adds
> 127.0.0.2 to /etc/hosts which breaks a lot of network software](Bug 573488 - Installation adds 127.0.0.2 to /etc/hosts which
> breaks a lot of network software)
>
> Bug 824141 -
> appending 127.0.0.2 line to /etc/hosts causes postfix to go
> berseck

>
>
>
> In a nutshell: yast network configuration adds a line at the end of the
> hosts file that causes some apps to go nuts. Details, links above. Some
> of the buzillas are not accessible.
>
> The registration to vote is the same as that of the forum and bugzilla
> service.
>
> It is important you vote: this was reported years ago, to be solved on
> 11.3. They did nothing, 11.3 was out, then the fate was closed
> bureaucratically because a fate for 11.3 was too late.

According to RFC 5735, any address in 127/8 is valid as a loopback
address:

“127.0.0.0/8 - This block is assigned for use as the Internet host
loopback address. A datagram sent by a higher-level protocol to an
address anywhere within this block loops back inside the host. This is
ordinarily implemented using only 127.0.0.1/32 for loopback. As described
in [RFC1122], Section 3.2.1.3, addresses within the entire 127.0.0.0/8
block do not legitimately appear on any network anywhere.”

As such, it seems that applications that assume 127.0.0.1 is the only
valid address for the loopback adapter are incorrect and the proper
course would be to log bugs against those applications.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2013-06-12 02:20, Jim Henderson wrote:
> On Tue, 11 Jun 2013 00:13:06 +0000, Carlos E. R. wrote:

> As such, it seems that applications that assume 127.0.0.1 is the only
> valid address for the loopback adapter are incorrect and the proper
> course would be to log bugs against those applications.

It may be a valid address, but it has no interface assigned. Declaring
it in hosts file causes postfix to crash. According to the feature
request, samba, SLP, LDAP, ntp, break.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

I am inclined to think that a “postfix” bug. It should be checking for interfaces, not for hosts file entries, when deciding which sockets to listen on.

On Wed, 12 Jun 2013 01:03:06 +0000, Carlos E. R. wrote:

> On 2013-06-12 02:20, Jim Henderson wrote:
>> On Tue, 11 Jun 2013 00:13:06 +0000, Carlos E. R. wrote:
>
>
>> As such, it seems that applications that assume 127.0.0.1 is the only
>> valid address for the loopback adapter are incorrect and the proper
>> course would be to log bugs against those applications.
>
> It may be a valid address, but it has no interface assigned. Declaring
> it in hosts file causes postfix to crash. According to the feature
> request, samba, SLP, LDAP, ntp, break.


[jhenderson@lamuella ~]$ ping 127.0.0.2
PING 127.0.0.2 (127.0.0.2) 56(84) bytes of data.
64 bytes from 127.0.0.2: icmp_seq=1 ttl=64 time=0.077 ms
64 bytes from 127.0.0.2: icmp_seq=2 ttl=64 time=0.055 ms
^C
--- 127.0.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.055/0.066/0.077/0.011 ms
[jhenderson@lamuella ~]$ ping 127.0.0.5
PING 127.0.0.5 (127.0.0.5) 56(84) bytes of data.
64 bytes from 127.0.0.5: icmp_seq=1 ttl=64 time=0.074 ms
^C
--- 127.0.0.5 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.074/0.074/0.074/0.000 ms

It responds, so it sure appears to be assigned somewhere.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2013-06-12 03:26, nrickert wrote:
>
> robin_listas;2564175 Wrote:
>> It may be a valid address, but it has no interface assigned. Declaring
>> it in hosts file causes postfix to crash.
>
> I am inclined to think that a “postfix” bug.

No.

The bug was logged against SUSE/openSUSE, several bugs actually for
different products. I’m sure that somebody at the staff would have
thought that samba or potfix or nfs or whatever were the culprits and
would have closed the bug as invalid or upstream.

They did not, thus they accepted that YaST was to blame.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-06-12 03:56, Jim Henderson wrote:
> On Wed, 12 Jun 2013 01:03:06 +0000, Carlos E. R. wrote:

> It responds, so it sure appears to be assigned somewhere.

I know it responds. But several applications break if you define that
entry in hosts; maybe because it is not listed in ipconfig, for example.
I do not know why they break, but they do break. Several apps, it seems.

(I can not verify the old bugzillas, they give access denied; so I do
not know their details).


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On Wed, 12 Jun 2013 03:58:07 +0000, Carlos E. R. wrote:

> On 2013-06-12 03:56, Jim Henderson wrote:
>> On Wed, 12 Jun 2013 01:03:06 +0000, Carlos E. R. wrote:
>
>
>> It responds, so it sure appears to be assigned somewhere.
>
> I know it responds. But several applications break if you define that
> entry in hosts; maybe because it is not listed in ipconfig, for example.
> I do not know why they break, but they do break. Several apps, it seems.

Then it seems those apps have bugs that should be filed against them, as
I said.

They’re legal addresses in a legal and assigned address range. The
kernel understands them fine, but it seems the apps don’t.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2013-06-12 06:54, Jim Henderson wrote:
> On Wed, 12 Jun 2013 03:58:07 +0000, Carlos E. R. wrote:

> Then it seems those apps have bugs that should be filed against them, as
> I said.

If SUSE employees did not say that on the several bugzillas about this
that I have seen, posted in several year span, is because it is not true.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-06-12 06:54, Jim Henderson wrote:
> On Wed, 12 Jun 2013 03:58:07 +0000, Carlos E. R. wrote:
>
>> On 2013-06-12 03:56, Jim Henderson wrote:
>>> On Wed, 12 Jun 2013 01:03:06 +0000, Carlos E. R. wrote:
>>
>>
>>> It responds, so it sure appears to be assigned somewhere.
>>
>> I know it responds. But several applications break if you define that
>> entry in hosts; maybe because it is not listed in ipconfig, for example.
>> I do not know why they break, but they do break. Several apps, it seems.
>
> Then it seems those apps have bugs that should be filed against them, as
> I said.
>
> They’re legal addresses in a legal and assigned address range. The
> kernel understands them fine, but it seems the apps don’t.

The postfix developers says: no.

+++····································
Date: Wed, 12 Jun 2013 12:36:55 -0400 (EDT)
Reply-To: Postfix users <postfix-users@postfix.org>
From: wietse@… (Wietse Venema)
To: Postfix users <postfix-users@postfix.org>

Carlos E. R.:
> Apararently, my previous reply has been lost. I resend.
>
> On 2013-06-12 14:40, Wietse Venema wrote:
> > Carlos E. R.:
>
> >
> > Does the machine have a network interface with IP address 127.0.0.2?
>
> Dunno. I guess not, because it is not listed in ifconfig output.

Then, 127.0.0.2 should not be specified in inet_interfaces.

Wietse
····································+±

That’s looks final to me :wink:


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On Wed, 12 Jun 2013 09:58:07 +0000, Carlos E. R. wrote:

> On 2013-06-12 06:54, Jim Henderson wrote:
>> On Wed, 12 Jun 2013 03:58:07 +0000, Carlos E. R. wrote:
>
>> Then it seems those apps have bugs that should be filed against them,
>> as I said.
>
> If SUSE employees did not say that on the several bugzillas about this
> that I have seen, posted in several year span, is because it is not
> true.

Well, their choice to have software that doesn’t work the way it’s
supposed to, unless they can cite something that says that anything other
than 127.0.0.1 is invalid. Clearly the IETF thinks differently, and
they’re the standards body involved.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Wed, 12 Jun 2013 19:03:47 +0000, Jim Henderson wrote:

> On Wed, 12 Jun 2013 09:58:07 +0000, Carlos E. R. wrote:
>
>> On 2013-06-12 06:54, Jim Henderson wrote:
>>> On Wed, 12 Jun 2013 03:58:07 +0000, Carlos E. R. wrote:
>>
>>> Then it seems those apps have bugs that should be filed against them,
>>> as I said.
>>
>> If SUSE employees did not say that on the several bugzillas about this
>> that I have seen, posted in several year span, is because it is not
>> true.
>
> Well, their choice to have software that doesn’t work the way it’s
> supposed to, unless they can cite something that says that anything
> other than 127.0.0.1 is invalid. Clearly the IETF thinks differently,
> and they’re the standards body involved.

Here’s an idea: Point the openSUSE developers (via a bug) at the postfix/
whomever developers’ bugs where they say that 127.0.0.2 shouldn’t be
valid and suggest that the two groups of developers work together for a
solution that works for everyone.

Problem solved. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

“/etc/hosts” is not a list of inet interfaces. So that does not seem relevant.

Does “postfix” use a separate interface list? Is Yast putting 127.0.0.2 there? Now that would be a bug. The entry in “/etc/hosts” seems perfectly okay.

On 2013-06-12 21:07, Jim Henderson wrote:

>> Well, their choice to have software that doesn’t work the way it’s
>> supposed to, unless they can cite something that says that anything
>> other than 127.0.0.1 is invalid. Clearly the IETF thinks differently,
>> and they’re the standards body involved.
>
> Here’s an idea: Point the openSUSE developers (via a bug) at the postfix/
> whomever developers’ bugs where they say that 127.0.0.2 shouldn’t be
> valid and suggest that the two groups of developers work together for a
> solution that works for everyone.

I already did. Kind of. :slight_smile:

I have not seen an email archive of the postfix mail list, so I can not
post a link to our exchange. I wrote on their user mail list, and got a
fast response from Wietse Venema, who is the main author of postfix (I’m
flattered).

(I understand that he says 127.0.0.2 is not valid because
it doesn’t have an interface, as listed by ifconfig. It is
even possible that the error postfix prints derives from a
library call that says can not find that interface. If that’s
the case, it is absolutely final :wink: )

But surely the SUSE folks have contact with the postfix devs, they can
handle that themselves :slight_smile:

I merely put the ball in motion. :slight_smile:

Bug 824141 - appending 127.0.0.2 line to /etc/hosts causes postfix to go
berseck


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-06-12 22:26, nrickert wrote:
>
> robin_listas;2564340 Wrote:
>> Then, 127.0.0.2 should not be specified in inet_interfaces.
>>
>> Wietse
>>
>
> “/etc/hosts” is not a list of inet interfaces. So that does not seem
> relevant.

Nobody says it is. The available system interfaces are listed by ifconfig.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Carlos E. R. wrote:
> On 2013-06-12 21:07, Jim Henderson wrote:
>
>>> Well, their choice to have software that doesn’t work the way it’s
>>> supposed to, unless they can cite something that says that anything
>>> other than 127.0.0.1 is invalid. Clearly the IETF thinks differently,
>>> and they’re the standards body involved.
>> Here’s an idea: Point the openSUSE developers (via a bug) at the postfix/
>> whomever developers’ bugs where they say that 127.0.0.2 shouldn’t be
>> valid and suggest that the two groups of developers work together for a
>> solution that works for everyone.
>
> I already did. Kind of. :slight_smile:
>
> I have not seen an email archive of the postfix mail list, so I can not
> post a link to our exchange.

Google quickly showed several archives listed at
http://www.postfix.org/lists.html, for example:

http://news.gmane.org/gmane.mail.postfix.user/cutoff=237564

It seems to me that this discussion isn’t getting very far very fast. I
think that may be because people haven’t really understood what the
issue is. I certainly don’t feel that I understand it properly yet.

I would suggest starting again, with a focus on understanding what the
problem is, rather than whether or not we should vote for a particular
solution. A difficulty with understanding the problem is that it appears
it is an old one with various bits of evidence and discussion scattered
around and a lot of context to pick up.

So I think it would be a good idea to focus on two particular points.
Perhaps Carlos could explain and confirm them as well as he can and
others can fill in with more information.

(1) One claim is that some applications try to resolve the hostname and
fail (or take a long time to initialize) when there is no network
present. This sounds like a bug in these applications. Is this still
true? Which applications currently have this bug?

(2) It seems that in order to work around #1, SUSE adds a line to
/etc/hosts for 127.0.0.2 associating it with a hostname. In the example
Carlos gave in the postfix archive, the hostname was identical with the
canonical name associated with a real LAN address also listed in
/etc/hosts. Note that the hostnames were obviously fake, not real, so it
does not prove a problem. Most of my machines have an association for
127.0.0.2 listed, but in no case does it match one for any other
address. However, I manage my machines in weird ways, so my
contraindication doesn’t mean much :slight_smile: So what exactly does openSUSE
currently put in /etc/hosts under what circumstances, and does it ever
list two IP addresses for the same hostname? If so, is that valid thing
to do under whatever rules govern the content of /etc/hosts.

(3) It seems that for some people, the workaround #2 causes knockon
problems with another set of applications, of which postfix is one
example. Apparently, the postfix conf supplied by SUSE provokes a
problem, whilst the default conf supplied by postfix upstream does not.
So why does SUSE supply a different config and can the default be used
instead? What other applications currently have what knockon problems
from this #2 cause

Note that there is no point in wasting much effort on #3 (except for
finding workarounds on affected systems) until it is established that #1
is still an issue nowadays and so workaround #2 is still necessary and
also that workaround #2 is actually valid and is installed by the system
rather than by manual intervention on particular systems, for example.

I’m trying to imagine where this is a problem.

On my machines, regardless whether the Hosts file has 127.0.0.2 or not, “localhost” always maps <only> to 127.0.0.1.
AFAIK <all> apps will work <all the time> on <any machine> because this is common to all.

So, the question then becomes, When and Why might an app use a different address mapped to the local machine (note I did not say “localhost” which should be a special, reserved name).

I configure these “alternative” addresses to be used only by special services like virtualized networking services, eg running a DNS or DHCP strictly for VMs and other services running on the local machine. By configuring a service to run on this “alternate local address” I can ensure the service(s) are accessible <only> by other services and VMs on the local machine with access to that address space and won’t pollute remote machine configurations. It can also be useful mapped to virtual websites which are not to be viewed anywhere but on the local machine.

So, returning to apps like Postfix I have <not> yet seen any problem if “localhost” is mapped <only> to 127.0.0.1. I hadn’t thought to experiment with assigning “localhost” to 127.0.0.2 or something else and can see how it might cause problems.

127.0.0.2 can still exist in the Hosts file, but it should be mapped to some other name than “localhost” or the machine’s assigned name and if it’s empty should be listed <after> 127.0.0.1.

IMO,
TSU