You are not logged in.
Hello forums,
I'm having some problems with networkmanager. Networkmanager seems to need dbus for starting up, so placing it too early in the rc.conf results in a start failure. Before, dbus starting time could be configured via rc.conf, now dbus is started automatically and unfortunately quite late. So networkmanager has to be started late, too. But starting it late is a problem, too, because other daemons (ntp, cups, samba) need a network connection for starting up. Is there a way to control, when dbus is started? Or maybe a way to start networkmanager without dbus having started?
Thanks,
PhotonX
Last edited by PhotonX (2010-02-22 13:00:26)
Desktop: http://www.sysprofile.de/id15562, Arch Linux | Notebook: Thinkpad L13 Yoga Gen2, Manjaro
The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work. - Tuomas Lukka
Offline
post DAEMONS from rc.conf
Give what you have. To someone, it may be better than you dare to think.
Offline
I've had similar problems myself, resolved it using the method described at http://wiki.archlinux.org/index.php/Net … k_services. If you are using hal make sure that networkmanager appears after this as the hal daemon should start dbus if it is not already running.
My DAEMONS from /etc/rc.conf now reads
DAEMONS=(syslog-ng crond alsa hal networkmanager gdm)All of the other daemons are now started using a series of scripts in /etc/NetworkManager/dispatcher.d/ for NFS, LAMP etc.
Hope this helps.
Last edited by penguin.powered (2010-02-18 12:44:17)
Offline
After some playing with the daemons order it now looks like this:
DAEMONS=(syslog-ng !network crond fam hal networkmanager alsa ntpdate ntpd samba cups)Now networkmanager starts up correctly and ntpdate sometimes does, too; but sometimes it doesn't - seems to depend on how fast my rooter establishes a connection. As you see, networkmanager is placed directly after hal; all the daemons that need a network connection are placed at last. It looks like fam has to be started before hal (otherwise I get many errors from fam). Maybe I could place crond after networkmanager to win some time?
edit: penguin.powered, sorry, didn't read your post carefully, I think this HowTo is exactly what I'm searching for! I'll give it a try, thanks! ![]()
edit2: Hmm, now I removed the network dependent daemons from rc.conf and copied their scripts from /etc/rc.d/ to /etc/NetworkManager/dispatcher.d/ but they weren't started up. The rights seem to be ok:
photon@photon-desktop:/etc/NetworkManager/dispatcher.d$ ls -l
insgesamt 16
-rwxr-xr-x 1 root root 692 19. Feb 10:21 cups
-rwxr-xr-x 1 root root 740 19. Feb 10:21 ntpd
-rwxr-xr-x 1 root root 540 19. Feb 10:21 ntpdate
-rwxr-xr-x 1 root root 944 19. Feb 10:21 sambaMaybe this dispatcher has to be activated somehow?
Last edited by PhotonX (2010-02-19 09:30:42)
Desktop: http://www.sysprofile.de/id15562, Arch Linux | Notebook: Thinkpad L13 Yoga Gen2, Manjaro
The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work. - Tuomas Lukka
Offline
The dispatcher doesn't need enabling as far as I know, I just created the scripts and made sure to do a chmod +x
Here is the contents of my /etc/NetworkManager/dispatcher.d/
[jay@edmund ~]$ ls -l /etc/NetworkManager/dispatcher.d/
total 8
-rwxr-xr-x 1 root root 338 Feb 16 14:36 a_NFS.sh
-rwxr-xr-x 1 root root 79 Feb 18 13:06 b_LAMP.sh
[jay@edmund ~]$And the contents of the b_LAMP.sh
#!/bin/bash
rm -rf /srv/http/*
/etc/rc.d/mysqld start
/etc/rc.d/httpd startThis method has always worked for me so not sure why it wouldn't for you, what do you have in the scripts?
Offline
Oh well, I just copied them over from /etc/rc.d... ![]()
edit: Now I created scripts that look like this:
#!/bin/bash
/etc/rc.d/[DAEMON] startFor samba and cups it works, but for ntpd and ntpdate it doesn't. They simply don't start up (no process running, no entries in the logs).
Last edited by PhotonX (2010-02-19 17:38:42)
Desktop: http://www.sysprofile.de/id15562, Arch Linux | Notebook: Thinkpad L13 Yoga Gen2, Manjaro
The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work. - Tuomas Lukka
Offline
OK, so some improvement then
Does your machine use a static or dynamic IP address? If it is dynamic then it could be that the daemon won't start as the network is not up when the script is executed.
There is an example of a script here http://wiki.archlinux.org/index.php/NTP … dispatcher for OpenNTPD. The troubleshooting section above it suggests adding in a delay before the daemon is started.
It may be worth experimenting to see if the same applies in your case.
Offline
Hi,
as I know dispatcher scripts got the interface as the first parameter, and the up/down/etc parameter as second.
You have to modify your scripts (change the cases from %1 to %2).
I am totaly dumb for scripting, so it is only a tip.
Offline
Isn't it the task of the dispatcher to start the scripts such that they wait until a network connection is established? Adding a delay wouldn't need a dispatcher at all...
Desktop: http://www.sysprofile.de/id15562, Arch Linux | Notebook: Thinkpad L13 Yoga Gen2, Manjaro
The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work. - Tuomas Lukka
Offline
It's not a problem I have come across myself so i'm just going by what I have seen on the wiki. Best guess is that the scripts are called once the networkmanager daemon is started successfully, without waiting until the interface is fully configured. I suppose someone with more experience may be able to offer a better explanation, as my knowledge of the internal workings of networkmanager is at an end i'm afraid.
Offline
ok, well i didn't read the whole thing, but yes place crond after networkmanager. You can even background crond with the @ symbol: @cond. Mine works fine.
From the "NetworkManager" page in the ArchWiki (make sure you read it carefully):
Note: If you happen to specify the fam daemon in your array, it must appear after networkmanager. The same also applies to portmap and netfs if specified.
Here's my setup:
DAEMONS=(syslog-ng !network alsa hal networkmanager netfs @crond)
The alsa daemon doesn't have to go after hal and networkmanager because it has nothing to do with them, but if you put it after, still just fine.
Make sure you adjust all the settings as stated in that ArchWiki-NetworkManager page, and also, check the HAL page in the ArchWiki and also the FAM page and follow the instructions carefully. This is important! I had problems untill i followed the instructions. Also check the ArchWiki for the other apps you have too. Often times, you have to add certain settings, you can't just install the apps and expect them to work. The wiki pages will often tell you what to add or change in various .conf files, etc. ![]()
Also, please not from the ArchWiki-FAM page:
Warning: FAM is obsolete; use Gamin instead, if possible. Gamin is a re-implementation of the FAM specification. It is newer and more actively maintained, and also simpler to configure.
That's why i don't have fam, because i am using gamin. If you follow the Beginner's Guide, it will tell you this too.
If you are using FAM for a particular app, it is likely that the app will work with gamin instead. If not, consider not using that app since FAM is obsolete.
I'm guessing you are using Gnome, correct? (Because if you were using KDEmod for Arch, it would have all these things set up without installing FAM)
Directly from the Gnome installation section of the Beginner's Guide:
Warning: The FAM (File Alteration Monitor) daemon is obsolete; use Gamin instead, if possible. Gamin is a re-implementation of the FAM specification. It is newer and more actively maintained, and also simpler to configure:
# pacman -S gamin
I hope this helps!
Remove FAM (install gamin with pacman -S gamin) and follow all the setup instructions in all the wiki pages for each daemon and/or app you have installed, starting from the beginner's guide with Gnome.
Last edited by trusktr (2010-02-21 20:34:07)
joe@trusktr.io - joe at true skater dot io.
Offline
Ok, that's a typical case of PEBKAC... Sorry guys, my mistake. I forgot to make a "chmod +x" for the ntp scripts...
So now on start everything is perfect. A little strange thing on shutdown is still happening - networkmanager gives a "FAIL" with following log entry:
Feb 22 13:44:59 photon-desktop NetworkManager: no sender
Feb 22 13:44:59 photon-desktop console-kit-daemon[4878]: WARNING: no senderBut this seems to be just a warning, so it's no big deal. ![]()
Big thanks for your help!
PhotonX
P.S.: @trusktr: I changed to gamin though it has nothing to do with this problem, thanks for the hint!
Last edited by PhotonX (2010-02-22 12:59:57)
Desktop: http://www.sysprofile.de/id15562, Arch Linux | Notebook: Thinkpad L13 Yoga Gen2, Manjaro
The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work. - Tuomas Lukka
Offline