I noticed this morning that network manager is spamming my log with messages repeated every 3 or 4 seconds.
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8297] policy: set-hostname: current hostname was changed outside NetworkManager: fedora
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8299] policy: set-hostname: set hostname to localhost.localdomain (from address lookup)
It repeats these messages every 3 or 4 seconds.
This apparently has been going on for a few days at least.
There is a bug 1894137 - But it was filed last November.
Anyone have any suggestions ?
I've always found NetworkManager intrusive like this, it doesn't like you making changes outside it's domain. I presume you changed the hostname?
Try disabling hostname mode maybe as described below?
https://unix.stackexchange.com/a/513413/452882
On 06/06/2021 17:19, Frank wrote:
I noticed this morning that network manager is spamming my log with messages repeated every 3 or 4 seconds.
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8297] policy: set-hostname: current hostname was changed outside NetworkManager: fedora
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8299] policy: set-hostname: set hostname to localhost.localdomain (from address lookup)
It repeats these messages every 3 or 4 seconds.
This apparently has been going on for a few days at least.
There is a bug 1894137 - But it was filed last November.
Anyone have any suggestions ?
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
On 2021-06-06 9:35 p.m., john quirke wrote:
I've always found NetworkManager intrusive like this, it doesn't like you making changes outside it's domain. I presume you changed the hostname?
Try disabling hostname mode maybe as described below?
https://unix.stackexchange.com/a/513413/452882
On 06/06/2021 17:19, Frank wrote:
I noticed this morning that network manager is spamming my log with messages repeated every 3 or 4 seconds.
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8297] policy: set-hostname: current hostname was changed outside NetworkManager: fedora
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8299] policy: set-hostname: set hostname to localhost.localdomain (from address lookup)
It repeats these messages every 3 or 4 seconds.
This apparently has been going on for a few days at least.
There is a bug 1894137 - But it was filed last November.
Anyone have any suggestions ?
No I didn't change the hostname. I don't know how long netmanager has been doing this...it's at least 3 or 4 days.
I will try disabling hostname mode and we'll see what happens.
Thanks
On Sun, 2021-06-06 at 12:19 -0400, Frank wrote:
I noticed this morning that network manager is spamming my log with messages repeated every 3 or 4 seconds.
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8297] policy: set-hostname: current hostname was changed outside NetworkManager: fedora
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8299] policy: set-hostname: set hostname to localhost.localdomain (from address lookup)
Just out of curiosity, is it only applying localhost.localdomain to your 127.0.0.1 loopback interface (like it should), or is it trying to apply it to an ethernet or wifi interface (which it shouldn't)?
Actual interfaces should get a different name than the loopback interface. Trying to use the same name to multiple interfaces is liable to upset something.
Perhaps related, my /etc/hosts file just looks like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
With only those two lines in it. Network manager is being told what to do by my DHCP server.
On 2021-06-07 1:01 a.m., Tim via users wrote:
On Sun, 2021-06-06 at 12:19 -0400, Frank wrote:
I noticed this morning that network manager is spamming my log with messages repeated every 3 or 4 seconds.
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8297] policy: set-hostname: current hostname was changed outside NetworkManager: fedora
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8299] policy: set-hostname: set hostname to localhost.localdomain (from address lookup)
Just out of curiosity, is it only applying localhost.localdomain to your 127.0.0.1 loopback interface (like it should), or is it trying to apply it to an ethernet or wifi interface (which it shouldn't)?
Actual interfaces should get a different name than the loopback interface. Trying to use the same name to multiple interfaces is liable to upset something.
Perhaps related, my /etc/hosts file just looks like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
With only those two lines in it. Network manager is being told what to do by my DHCP server.
Here's the situation this morning. Following a suggestion from John Quirke
I added a line to /etc/NetManager/NetManager.conf
Added was hostname-mode=none.
That has stopped the repeated logging, but now when I click on
the netmanager icon in the tray it tells me the network has been
disconnected. Actually it hasn't been so I don't know what is up with that.
I also do not understand why the repeated logging started as no changes were
made to anything network-related.
This is now my hosts file in /etc
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
I also do not understand the references to localhost4 and localhost 6 in that
file.
I connect to the internet on a wired connection to my providers router via DHCP. There
is no wireless or other networks involved.
While the log spamming has stopped I feel there is something else going on here.
Thanks
On 2021-06-07 1:01 a.m., Tim via users wrote:
On Sun, 2021-06-06 at 12:19 -0400, Frank wrote:
I noticed this morning that network manager is spamming my log with messages repeated every 3 or 4 seconds.
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8297] policy: set-hostname: current hostname was changed outside NetworkManager: fedora
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8299] policy: set-hostname: set hostname to localhost.localdomain (from address lookup)
Just out of curiosity, is it only applying localhost.localdomain to your 127.0.0.1 loopback interface (like it should), or is it trying to apply it to an ethernet or wifi interface (which it shouldn't)?
Actual interfaces should get a different name than the loopback interface. Trying to use the same name to multiple interfaces is liable to upset something.
Perhaps related, my /etc/hosts file just looks like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
With only those two lines in it. Network manager is being told what to do by my DHCP server.
Here's the situation this morning. Following a suggestion from John Quirke
I added a line to /etc/NetManager/NetManager.conf hostname-mode=none.
That has stopped the repeated logging, but now when I click on
the netmanager icon in the tray it tells me the network has been
disconnected. Actually it hasn't been so I don't know what is up with that.
I also do not understand why the repeated logging started as no changes were
made to anything network-related.
This is now my hosts file in /etc
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
I do not understand the references to localhost4 and localhost6 in that
file.
I connect to the internet on a wired connection to my providers router via DHCP. There
is no wireless or other networks involved.
While the log spamming has stopped I feel there is something else going on here.
Thanks
Tim:
Just out of curiosity, is it only applying localhost.localdomain to your 127.0.0.1 loopback interface (like it should), or is it trying to apply it to an ethernet or wifi interface (which it shouldn't)?
You didn't answer the above query.
Frank:
Here's the situation this morning. Following a suggestion from John Quirke
I added a line to /etc/NetManager/NetManager.conf hostname-mode=none.
That has stopped the repeated logging, but now when I click on the netmanager icon in the tray it tells me the network has been disconnected. Actually it hasn't been so I don't know what is up with that.
I also do not understand why the repeated logging started as no changes were made to anything network-related.
Perhaps you should reboot your router. Maybe it glitched.
Maybe you should remove the connection info network manager has set for your interface, and let it freshly create a new one from your DHCP server.
This is now my hosts file in /etc 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
I do not understand the references to localhost4 and localhost6 in that file.
That looks fine. The localhost 4 and 6 gubbins seems to be some new- fangled stuff that someone thinks is a good idea. I've never heard of anything using it.
The local loopback interface is on 127.0.0.1, and is traditionally given the hostname "localhost". For some reason, Linux adds an extra localhost.localdomain alias to it, perhaps to satisfy some daemons that insist on having at least one dot in a hostname.
The loopback interface is how the computer communicates within itself. If there's any purely internal network traffic inside the computer, it doesn't even go through any of the network hardware. And it uses that IP address, and gives it a "localhost" name. It's like you looking at yourself in the mirror and saying, "that's me," talking inside your head.
Other interfaces (ethernet or wifi) should have their own completely independent IP addresses and hostnames. i.e. They should *NOT* be called localhost. If your DHCP server is working right, it should all this properly for you.
I connect to the internet on a wired connection to my providers router via DHCP. There is no wireless or other networks involved.
A DHCP server should give you an IP, hopefully (for you) the same one each time. And it may also give that interface a hostname. It may not, some routers only do a half-hearted job at it.
The https://unix.stackexchange.com/a/513413/452882 link provided earlier tries to stop your computer listening the DHCP server regarding a hostname. Essentially the idea is that you name the computer yourself, and hope to keep a consistent hostname. That link then goes on about them getting the computer to be localhost and localhost.localdomain, on the non localhost interface which is leading a networking nightmare.
If you can, configure your router to give you an IP and hostname. If you can't, then configure your computer to have its own hostname, and don't call it localhost, nor localhost.localdomain. Normally, I've found Fedora would carry on using your assigned hostname if nothing else changed it. i.e. A DHCP server that only gives you an IP without a name, will give you an IP, and you'll keep using the hostname you manually set.
Try reading "man hostname" about manually setting a hostname (I reckon you'll *need* to "su -" and do this as the root user, or through sudo).
When a computer doesn't have a hostname, and hasn't been given one to use, one thing it can do is a reverse lookup on its assigned IP.
e.g. Your DHCP server says: you are 192.168.1.23 Your computer asks its DNS server, what's the name for 192.168.1.23 Your DNS server says that's: george.example.com Your computer refers to itself as george (the hostname) and george.example.com (as a fully-qualified domain name).
Without a fully functional DHCP server, and a co-operating DNS server (your ISP's won't help, its outside of your DHCP server), you'll have to manage some of that yourself. And that's much easier if your computer always gets given the same IP address. A simple approach is to use the hostname command to name your computer, and put its name into your /etc/hosts file.
e.g. Under the two existing lines, add something like:
192.168.1.23 george
or, like this:
192.168.1.23 george george.example.com
The first info is your IP, use *YOUR* actual IP. The thing next to it (george) is the name you want it known as. It can be followed by aliases (alternative names it can respond to).
Now your computer will consult its hosts file to find its name, rather than try to get an answer from a DNS server that isn't going to give it one.
If your computer is the only thing on your network (after the router), you could just set a manual address and completely ignore DHCP. You can do that through the NetworkManager interface. Pick an IP that's not in use, and in the same range as the router.
On Sun, Jun 6, 2021 at 10:20 AM Frank beacon@videotron.ca wrote:
I noticed this morning that network manager is spamming my log with messages repeated every 3 or 4 seconds.
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8297] policy: set-hostname: current hostname was changed outside NetworkManager: fedora
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8299] policy: set-hostname: set hostname to localhost.localdomain (from address lookup)
It repeats these messages every 3 or 4 seconds.
This apparently has been going on for a few days at least.
There is a bug 1894137 - But it was filed last November.
Also https://bugzilla.redhat.com/show_bug.cgi?id=1893223, filed last October. And see:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/...
For me, running "hostnamectl" showed that the static hostname was "localhost" and the transient hostname was "fedora", apparently because somebody thought the latter was a good idea. The nonmatching hostnames triggered NetworkManager to spam the logs, which is the second bug. Both should be fixed, but the fact that nobody is paying attention to bugs filed last fall is not encouraging.
The workaround I resorted to was to use hostnamectl to make the static and transient hostnames match.
On 2021-06-07 10:30 a.m., Jerry James wrote:
On Sun, Jun 6, 2021 at 10:20 AM Frank beacon@videotron.ca wrote:
I noticed this morning that network manager is spamming my log with messages repeated every 3 or 4 seconds.
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8297] policy: set-hostname: current hostname was changed outside NetworkManager: fedora
Jun 06 11:58:22 localhost.localdomain NetworkManager[787]: <info> [1622995102.8299] policy: set-hostname: set hostname to localhost.localdomain (from address lookup)
It repeats these messages every 3 or 4 seconds.
This apparently has been going on for a few days at least.
There is a bug 1894137 - But it was filed last November.
Also https://bugzilla.redhat.com/show_bug.cgi?id=1893223, filed last October. And see:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/...
For me, running "hostnamectl" showed that the static hostname was "localhost" and the transient hostname was "fedora", apparently because somebody thought the latter was a good idea. The nonmatching hostnames triggered NetworkManager to spam the logs, which is the second bug. Both should be fixed, but the fact that nobody is paying attention to bugs filed last fall is not encouraging.
The workaround I resorted to was to use hostnamectl to make the static and transient hostnames match.
Strange this bug has been around for 6+ months with apparently no action.
Anyway I did as you suggested, but unless I put that extra keyword into /etc/NetworkManager/NetworkManager.conf (hostname-mode=none) the
repetitive logging continues. I used hostnamectl to make all the names match, but it needed that keyword. Is that what you had to do or
was simply making the names match enough ?
Thanks
On 2021-06-07 9:19 a.m., Tim via users wrote:
Tim:
Just out of curiosity, is it only applying localhost.localdomain to your 127.0.0.1 loopback interface (like it should), or is it trying to apply it to an ethernet or wifi interface (which it shouldn't)?
You didn't answer the above query.
I can't tell now as I have changed the hostname.
Frank:
Here's the situation this morning. Following a suggestion from John Quirke
I added a line to /etc/NetManager/NetManager.conf hostname-mode=none.
That has stopped the repeated logging, but now when I click on the netmanager icon in the tray it tells me the network has been disconnected. Actually it hasn't been so I don't know what is up with that.
I also do not understand why the repeated logging started as no changes were made to anything network-related.
Perhaps you should reboot your router. Maybe it glitched.
I did and there was no change
/snip/
I connect to the internet on a wired connection to my providers router via DHCP. There is no wireless or other networks involved.
A DHCP server should give you an IP, hopefully (for you) the same one each time. And it may also give that interface a hostname. It may not, some routers only do a half-hearted job at it.
The https://unix.stackexchange.com/a/513413/452882 link provided earlier tries to stop your computer listening the DHCP server regarding a hostname. Essentially the idea is that you name the computer yourself, and hope to keep a consistent hostname. That link then goes on about them getting the computer to be localhost and localhost.localdomain, on the non localhost interface which is leading a networking nightmare.
On he advice of another user I used hostnamectl to change
the permanent and transient names to the same thing. With
the addition of the hostname-mode=none to networkmanager.conf
the spamming has stopped.
/snip/
Without a fully functional DHCP server, and a co-operating DNS server (your ISP's won't help, its outside of your DHCP server), you'll have to manage some of that yourself. And that's much easier if your computer always gets given the same IP address. A simple approach is to use the hostname command to name your computer, and put its name into your /etc/hosts file.
e.g. Under the two existing lines, add something like:
192.168.1.23 george
or, like this:
192.168.1.23 george george.example.com
The first info is your IP, use *YOUR* actual IP. The thing next to it (george) is the name you want it known as. It can be followed by aliases (alternative names it can respond to).
Now your computer will consult its hosts file to find its name, rather than try to get an answer from a DNS server that isn't going to give it one.
If your computer is the only thing on your network (after the router), you could just set a manual address and completely ignore DHCP. You can do that through the NetworkManager interface. Pick an IP that's not in use, and in the same range as the router.
That is basically what I did. There have been several bugs filed
on this problem but so far there has been no action??
These network problems are far above my pay grade!
Thanks very much.
On Mon, Jun 7, 2021 at 8:59 AM Frank beacon@videotron.ca wrote:
Anyway I did as you suggested, but unless I put that extra keyword into /etc/NetworkManager/NetworkManager.conf (hostname-mode=none) the
repetitive logging continues. I used hostnamectl to make all the names match, but it needed that keyword. Is that what you had to do or
was simply making the names match enough ?
For me it was enough, yes.
I've got a machine with a fresh Fedora 34 installation on it. On that one, hostnamectl says:
Static hostname: n/a Transient hostname: fedora
And I'm not seeing the log spam.