You are not logged in.

#1 2010-11-23 09:00:20

Caspian
Member
Registered: 2007-05-22
Posts: 263

[SOLVED]Problems with the last networkmanager upgrade

Since the last networkmanager upgrade my host name gets changed automatically. This, of course, causes the whole gnome desktop to malfunction. Did anyone else experience this? Is it a bug or what?

P.S.
Forgot to mention that this problem doesn't occure after downgrading of the packages (nm and nm-applet). There are two possibilities:
* Something is wrong with the new version
* Something has changed in the configuration for the new version and it by default automatically changes the host name.

Last edited by Caspian (2010-11-23 12:06:56)

Offline

#2 2010-11-23 10:16:58

Halcyon22
Member
Registered: 2010-07-30
Posts: 33

Re: [SOLVED]Problems with the last networkmanager upgrade

Perhaps its a new patch,

 http://repos.archlinux.org/wsvn/packages?op=comp&compare[]=%2Fnetworkmanager%2Ftrunk@100255&compare[]=%2Fnetworkmanager%2Ftrunk@100288 

Last edited by Halcyon22 (2010-11-23 10:20:09)

Offline

#3 2010-11-23 10:26:48

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED]Problems with the last networkmanager upgrade

@Halcyon22 neah.

this is why i hate sentences like "since last update". we need to have our magic ball to guess what last update means.

i assume that he means an update from 0.8.1 to 0.8.2 and this is happening because we dropped the patch that we made for not modifying the /etc/hosts, mostly because in 0.8.2 they have ab etter handling of /etc/hosts and preservation of custom hostnames.(so  they say)

paste your /etc/hosts and lets see what damage did it do


Give what you have. To someone, it may be better than you dare to think.

Offline

#4 2010-11-23 10:34:10

Caspian
Member
Registered: 2007-05-22
Posts: 263

Re: [SOLVED]Problems with the last networkmanager upgrade

@wonder: Calm your horses will you?! Why do you behave like that? Of course that by the last update I didn't mean on the update which occured in the August. If the post was added today I think that it's more than obvious that the last update means the last available version of package in the repository.

Anyways, here's mine /etc/hosts:

127.0.0.1    nebula    localhost.localdomain    localhost
::1    dhcppc0    localhost6.localdomain6    localhost6

The second line was added by new version of networkmanager. It wasn't there before it.

Offline

#5 2010-11-23 10:49:01

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED]Problems with the last networkmanager upgrade

last update can mean two things today. 0.8.2-2 -> 0.8.2-3 or 0.8.1-1->0.8.2-3 and this is a bit confusing, like Halcyon22 did. you know that we had it for like 2 weeks in testing no?

i don't see anything wrong in that /etc/hosts. is your hostname still nebula? type hostname in terminal

Last edited by wonder (2010-11-23 10:50:31)


Give what you have. To someone, it may be better than you dare to think.

Offline

#6 2010-11-23 10:53:43

Caspian
Member
Registered: 2007-05-22
Posts: 263

Re: [SOLVED]Problems with the last networkmanager upgrade

No. While I was using the newest nm version my hostname eas changed to dhcppc0.

Offline

#7 2010-11-23 11:50:29

mxr
Member
Registered: 2009-07-08
Posts: 7

Re: [SOLVED]Problems with the last networkmanager upgrade

This worked for me

https://bbs.archlinux.org/viewtopic.php?pid=684936

try to put your hostname in the /etc/NetworkManager/nm-system-settings.conf file

[main]
plugins=keyfile

[keyfile]
hostname=<your-host>

Offline

#8 2010-11-23 12:06:32

Caspian
Member
Registered: 2007-05-22
Posts: 263

Re: [SOLVED]Problems with the last networkmanager upgrade

That solved my problem. Thank you mxr. Some kind of announcement should be made for this. In this way other users will know what do to on this nm upgrade.

Offline

#9 2010-11-25 01:53:25

jvalecillos
Member
Registered: 2009-02-25
Posts: 24

Re: [SOLVED]Problems with the last networkmanager upgrade

I have the same issue too. But was fixed in networkmanager 0.8.2-5 without need change anything.

Offline

#10 2010-11-25 16:57:14

jvalecillos
Member
Registered: 2009-02-25
Posts: 24

Re: [SOLVED]Problems with the last networkmanager upgrade

First at all, This is the same problem that here  here and the same bug here FS#17742. That issue is repeated in the forum several times.

I previously posted that the problem was fixed with networkmanager 0.8.2-5 but wasn't. As well as i posted in the other thread is seems only a partial workaround. Networkmanager keeps changing /etc/hosts file and now you can get your hostname in gdm or slim, but other programs will fail (mysql for example).

Networkmanager write in /etc/hosts this:

#<ip-address>    <hostname.domain.org>    <hostname>
your-ip-address    your-hostname    # Added by NetworkManager

And should be (in my test):

#<ip-address>    <hostname.domain.org>    <hostname>
your-ip-address    your-hostname.localdomain   localhost your-hostname # Line fixed

Please not mark this problem as SOLVED because is NOT SOLVED (at least in time that i wrote this post).

PS: Editing /etc/NetworkManager/nm-system-settings.conf don't fix the problem.

Last edited by jvalecillos (2010-11-25 17:00:33)

Offline

#11 2010-11-25 17:01:45

Caspian
Member
Registered: 2007-05-22
Posts: 263

Re: [SOLVED]Problems with the last networkmanager upgrade

The mxr post helped me and I will leave this topic marked as solved.

Offline

#12 2010-11-26 10:57:14

Evilandi666
Member
Registered: 2010-10-28
Posts: 105

Re: [SOLVED]Problems with the last networkmanager upgrade

I got two Pcs, both nearly same config, one with only lan, the other with lan,wlan,wwan.

The one with lan,wlan,wwan has the problem that networkmanager changes the hosts file (like jvalecillos described).

The other one does not.

The /etc/NetworkManager/nm-system-settings.conf File is total ignored i think - you can have it, delete it, nm-applet won't recognize.

--- up to here i used 0.8.2-5!

Today Version 0.8.2-6 came .. maybe it works with that one - i will see.

Offline

#13 2010-11-26 15:15:35

jvalecillos
Member
Registered: 2009-02-25
Posts: 24

Re: [SOLVED]Problems with the last networkmanager upgrade

Don't work with 0.8.2-6. I send a request to open the bug but wonder denied the request (thank you for drop the request without test it).

Step to reproduce the bug:

1. Create a mysql user.
2. Give him the permissions to connect from everywhere (% wildcard).
3. Try to connect with that account, you will notice the follow:

You can connect from another pc using the ip address (of your local network for example) of machine with archlinux.
You can connect from your own machine if you use localhost or 127.0.0.1 in the host address, But (and here is the problem) if you use your ip address (of your local network for example) in the host address, you will not connect.

In conlusion: you cannot connect from your own machine using your own ip address (local in my case). Mysql will denied to you the access.

I was testing this thing for days before even posted, i'm not writing without a good reason.

Now, wonder can you please check the bug?. BTW, networkmanager keeps changing /etc/hosts file, you just need run cat /etc/hosts to see that. No matter if your write the correct config (like i write in my other post), when you restart networkmanager it changes the file again.

Offline

#14 2010-11-26 16:09:20

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED]Problems with the last networkmanager upgrade

changing /etc/hosts is intended by upstream. there are three solutions to this "issue".

1) nuke the feature out like i did for changing hostname, which sucks and i don' t want to do it anymore
2) write a correct /etc/hosts
3) write a plugin for archlinux. right now networkmanager is using a generic plugin called keyfile.

best solution is to implement 3 and push it upstream, the ugliest is 1. patches welcomed


P.S a correct /etc/hosts conform nm code

 /* We need the following in /etc/hosts:
         *
         * 1) current hostname mapped to current IPv4 addresses if IPv4 is active
         * 2) current hostname mapped to current IPv6 addresses if IPv6 is active
         * 3) 'localhost' mapped to 127.0.0.1
         * 4) 'localhost6' mapped to ::1
         *
         * If all these things exist we don't need to bother updating the file.
         */

it seems that the standard is to map hostname to your active ipv4 and therefor is your problem. you need to start mysql after nm is connected.

P.S patch here. http://pkgbuild.com/~ioni/disable_etc_hosts.patch try it yourself. But i still think is wrong

Last edited by wonder (2010-11-26 17:09:14)


Give what you have. To someone, it may be better than you dare to think.

Offline

#15 2010-12-02 14:01:42

jvalecillos
Member
Registered: 2009-02-25
Posts: 24

Re: [SOLVED]Problems with the last networkmanager upgrade

Seems to be fixed in networkmanager 0.8.3-0.20101130. But you must write the correct configuration in /etc/hosts and then restart networkmanager, just to be sure that the file have the right hostname.

Offline

Board footer

Powered by FluxBB