Bug 23675

Summary: HOSTNAME changes to linux.local instead of localhost.localdomain
Product: Mageia Reporter: andré blais <andr999>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Normal CC: basesystem, ftg, lewyssmith
Version: 6   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: unknown CVE:
Status comment:
Attachments: output of journalctl -e

Description andré blais 2018-10-12 23:24:39 CEST
Description of problem:

From time to time, HOSTNAME changes to linux.local instead of localhost.localdomain

This causes problems for applications only executable by an non-root user, such as rpmdrake and mcc.  They are no longer executable.
Sometimes various applications give messages approximately "unable to connect to non-local linux.local"

A workaround :
Close the current user session, and reopen.
HOSTNAME returns to localhost.localdomain


Version-Release number of selected component (if applicable):
unknown

How reproducible:
Unknown.  Occurs sporatically.
Usually after more than a day after a clean reboot or connection to a user account.

The desktop is Maté, mga 6.
Other desktops have not been tried.  Did not occur before mga 6.

The kernel is kernel-desktop-4.14.70-2.mga6
Occurred with previous versions of the same kernel.
Only kernel-desktop has been used.
Comment 1 Marja Van Waes 2018-10-13 09:07:09 CEST
Do you see those "unable to connect to non-local linux.local" messages in the journalctl logs (as user? as root?), too?

If so, is there a preceding message that sheds some light on what causes it?

CC'ing the Base System Maintainers, because I suspect they can help debug this :-)

CC: (none) => basesystem, marja11

Comment 2 andré blais 2018-10-13 16:36:53 CEST
Created attachment 10402 [details]
output of journalctl -e
Comment 3 andré blais 2018-10-13 17:25:11 CEST
(In reply to Marja Van Waes from comment #1)
> Do you see those "unable to connect to non-local linux.local" messages in
> the journalctl logs (as user? as root?), too?

After reporting problem, I installed and rebooted to
 kernel-linus-4.14.69-1.mga6.x86_64
(planning to reactivate sleep/hibernate, but not yet done.)

journalctl -e (see attachment) shows that HOSTNAME is linux.local,
but rpmdrake and mcc execute without problem.

So no "unable to connect to non-local linux.local" message.

However numerous pam-related error messages about already running session.
Note that I had several console sessions running, one of which was root.

Let me know if more journalctl lines would be useful.

(In passing, the display with kernel-linus is unchanged.)
Comment 4 Lewis Smith 2020-01-30 20:43:42 CET
Sorry to have left you on this one.
If you are still with us, do you still have the problem (Mageia 7)?

CC: marja11 => lewyssmith

Comment 5 Frank Griffin 2020-01-30 22:21:02 CET
This smacks of Windows Exchange.  When I started at my current employer, I found that all of the intranet stations had DNS entries using a ".local" domain, rather than a subdomain of the main "xxx.com", e. g. ".local.xxx.com" or just using a private internal DNS server with entries for the internal stations using ".xxx.com" and passing all other ".xxx.com" to an external server.  Exchange doesn't seem to like multiple or layered servers.

As to what could be setting such a hostname, all I can think of is that your hosts are obtaining their hostnames from DHCP by passing the MAC addresses of their NICs, and that it's an Exchange DHCP that is (sometimes) intercepting the requests.  DHCP requests are broadcast to anybody listening to port 67, and if multiple DHCP servers are, the first to answer provides the hostname associated in its configuration for that MAC address.

If there's a possibility of this, you can verify it by running wireshark on a different workstation monitoring port 67 and boot your first workstation until you have a trace for both a localhost.localdomain result and a linux.local result.  Then see which DHCP server responded in each case.

CC: (none) => ftg

Comment 6 andré blais 2020-01-31 05:01:13 CET
(In reply to Lewis Smith from comment #4)

I haven't noticed that recently, although it was happening fairly often when I reported the error.
Maybe the cause was that suggested in comment 5 ?
Comment 7 Lewis Smith 2020-01-31 20:01:38 CET
@Frank : many thanks for the learned discourse.

@André
1. Are you now using Mageia 7?

2.
> I haven't noticed that recently
> it was happening fairly often when I reported the error.
The first line is vague. You reported it 15 months ago. Do you consider that the problem has 'gone away'? And if so, can you identify a change (like M6->M7) when you think it disappeared?

3. Can you not say whether you are in a situation like Frank describes? Is your system stand-alone, or networked with a Windows server?

The last paragraph of comment 5 describes how you can explore the situation if you need to. I was going to suggest doing
 # journalctl -ab > journal.txt
as soon as you notice the change in hostname; then attaching the *compressed* file to this bug.
But it would be nice to close it.
Comment 8 andré blais 2020-02-01 01:22:15 CET
(In reply to Lewis Smith from comment #7)
> @André
> 1. Are you now using Mageia 7?

Yes.  Since not long after it was first published.

> 2.
> > I haven't noticed that recently
> > it was happening fairly often when I reported the error.
> The first line is vague. You reported it 15 months ago. Do you consider that
> the problem has 'gone away'? And if so, can you identify a change (like
> M6->M7) when you think it disappeared?

I haven't noticed the problem since updating to M7.
It may have disappeared while still using M6, since it was intermittant.
Previous internet suppliers were very microsoft-oriented, so although my system is stand-alone, I thought that maybe the problem could have been caused by the DHCP server of my internet supplier.

> 3. Can you not say whether you are in a situation like Frank describes? Is
> your system stand-alone, or networked with a Windows server?
> 
> The last paragraph of comment 5 describes how you can explore the situation
> if you need to. I was going to suggest doing
>  # journalctl -ab > journal.txt
> as soon as you notice the change in hostname; then attaching the
> *compressed* file to this bug.
> But it would be nice to close it.

Probably a good idea to close the bug.
If someone else is still impacted by the bug, they can always reopen.
Comment 9 Lewis Smith 2020-02-01 21:22:38 CET
> I haven't noticed the problem since updating to M7.
> Probably a good idea to close the bug.
Thanks.

Resolution: (none) => WORKSFORME
Status: NEW => RESOLVED