LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-20-2018, 11:11 AM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
I can't manage NetworkManager via /etc/rc.d/rc.networkmanager script


Hi, I got such error
Code:
root@darkstar:# /etc/rc.d/rc.networkmanager restart
Stopping NetworkManager: stopped
Starting NetworkManager daemon:  /usr/sbin/NetworkManager
root@darkstar:# nmcli -p g 
Error: NetworkManager is not running.
any idea why this happens?
 
Old 03-20-2018, 11:18 AM   #2
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
igadoter --

I just now looked at my /var/log/messages file ( and dmesg too ) on Slackware64 Current and they're chock-full of NetworkManager entries.

Are there any interesting messages from NetworkManager in your /var/log/{messages,syslog} files ?

HTH.

-- kjh

Last edited by kjhambrick; 03-20-2018 at 11:19 AM.
 
Old 03-20-2018, 01:43 PM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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.
 
Old 03-20-2018, 02:37 PM   #4
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
igadoter --

What version of Slackware are you running ... and ... I assume it is a full install ?

-- kjh
 
Old 03-20-2018, 03:14 PM   #5
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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.
 
Old 03-20-2018, 03:29 PM   #6
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Quote:
I found this in /var/log/messages
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.
 
1 members found this post helpful.
Old 03-20-2018, 04:45 PM   #7
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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.
 
Old 03-20-2018, 06:14 PM   #8
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Ensure rc.messagebus and rc.networkmanager are executable (chmod +x). Reboot.

FYI as English is not your native language: daemon rather than demon.

Last edited by upnort; 03-20-2018 at 06:16 PM.
 
Old 03-20-2018, 06:59 PM   #9
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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 View Post
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
Code:
# /etc/rc.d/rc.networkmanager restart
doesn't work as expected.

Last edited by igadoter; 03-20-2018 at 07:42 PM.
 
Old 03-20-2018, 07:33 PM   #10
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
I suspect your system is not running correctly. A reboot often resolves such issues. Been there done that for more than 3 decades.

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.
 
Old 03-20-2018, 07:55 PM   #11
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Quote:
Originally Posted by upnort View Post

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
Code:
# /etc/rc.d/rc.networkmanager restart
on your own computer?
 
Old 03-20-2018, 09:27 PM   #12
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,504

Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
Quote:
Originally Posted by igadoter View Post
Did you tried the command
Code:
# /etc/rc.d/rc.networkmanager restart
on your own computer?
Works fine here.
 
Old 03-20-2018, 10:00 PM   #13
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
For me also works fine here. I mean now it works fine. I just tried.
 
Old 03-20-2018, 10:20 PM   #14
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Quote:
Please @upnort be more specific.
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.
 
1 members found this post helpful.
Old 03-20-2018, 10:46 PM   #15
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
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.

Last edited by igadoter; 03-20-2018 at 10:54 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NetworkManager setup networks from bash script Droa Linux - Networking 6 09-11-2012 04:04 AM
NetworkManager Rory Glenn Pascua Linux - Software 3 06-15-2012 12:18 PM
[SOLVED] When using NetworkManager in KDE 4.7.4, how do you manage iptables? allend Slackware 2 01-20-2012 08:14 AM
Script using cnetworkmanager to start a NetworkManager connection from a terminal. PTrenholme Linux - Networking 0 09-07-2009 07:34 PM
NetworkManager baparekh Linux - Networking 1 07-28-2005 04:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration