[SOLVED] I can't manage NetworkManager via /etc/rc.d/rc.networkmanager script
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Thanks for reply. I found this in /var/log/messages
Code:
Mar 20 16:15:23 darkstar NetworkManager[1428]: <info> [1521558923.3778] bus-manager:
could not connect to the system bus (Timeout was reached);
only the private D-Bus socket will be available
I am guessing that all tools to manage NetworkManager communicate with demon via D-Bus. But I still don't understand: the script works during system startup - because it is how NetworkManager is being run - simply by executing this script.
Sorry I should post this at beginning - 14.2 64 bit - full install with AlienBob multlib. But I never touched NetworkManager or anything related to D-Bus.
The log message implies a permissions issue or perhaps a stale socket or pid file that needs to be deleted. Check /var/run/dbus. If d-bus is not running then the rc.networkmanager script should have spewed something about that ("D-BUS must be running to start NetworkManager"). Ensure rc.messagebus is executable. The rc.messagebus script supports a restart and reload option. Restart or reload and manually start rc.networkmanager. Check the output spew and logs thereafter.
You can manually start NM without the rc script, which would provide more output spew if using the --debug option.
Another thought: ensure /etc/rc.d/rc.inet1.conf is not configured -- empty entries and no gateway.
Sorry for delay was little busy: restarting D-Bus simply killed SeaMonkey window. But it is true restarting D-Bus and then starting NetworkManager allows to connect to demon. But such solution seems to be disaster for many desktop applications like SeaMonkey I mentioned. So as now procedure should be to logout, then go to ttys login, and there from command line reactivate NetworkManager by stopping NetworkManager, restarting D-Bus and starting again NetworkManager. But this means that one cannot in real world manage NetworkManager via this script - it is simply far too complex. If I am right then this script should be removed. And as it is now - demon for NetworkManager - once started cannot be stopped.
Yes they both executable. What do you mean by reboot system? There is no need for reboot - I restarted NetworManager - it works - but for me the script /etc/rc.d/rc.networkmanager is not of much use - it seems tha one cannot restart MetworkManager by simply
Quote:
# /etc/rc.d/rc.networkmanager restart
Quote:
Originally Posted by upnort
FYI as English is not your native language: daemon rather than demon.
I prefer
Quote:
# kill demon
Edit: maybe there is misunderstanding. I am not complaining that NetworkManager doesn't start or run. I complain that one cannot manage it via /etc/rc.d/rc.networkmanger script. Such command
If you do not want to reboot then drop to run level 1 and then return to run level 3 or 4.
Close all apps. As root run init 1. Login as root and run init 3 or init 4.
Please @upnort be more specific. First the issue I am reporting exists quite a long time. So I think I rebooted computer dozen of times since I first noticed it. Reboot does not help. Did you tried the command
Many people are loathe to reboot a computer to fix problems. uptime and all that. My suggestion to reboot was based on a hunch that somehow d-bus got mangled on your computer. Although possible to often fix things without rebooting, a reboot usually clears the slate to provide remedy.
Quote:
Did you tried the command
# /etc/rc.d/rc.networkmanager restart
on your own computer?
Works fine here.
At this point, if the problem persists and you have indeed rebooted many times without success, inspecting the logs is the only way others are going to be able to help.
One nice trick is to open a terminal window or console and use tail -f /var/log/messages to watch the log in real-time while restarting rc.networkmanager.
Ok I don't like to feel stupid. This is pattern I repeated three times
Code:
1* boot the system
2* nmcli -p g # it shows NetworkManager is running
3* /etc/rc.d/rc.networkmanager restart
4* nmlcli -p g # now it shows Error: NetworkManager is not running
5* /etc/rc.d/rc.messagebus restart
6* /etc/rc.d/rc.networkmanager restart
7* nmcli -p g # it shows NetworkManager is running
8* /etc/rc.d/rc.networkmanager restart
9* nmcli -p g # again it shows NetworkManager is running
from now on I can repeat the steps 8* and 9* and result is the same. Conclusion is that
Code:
# /etc/rc.d/rc.networkmanager restart
fails only being issued the first time after the system boot.
Edit: now it seems for me that restarting D-Bus fixes the problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.