aaqib752
Posts: 16
Joined: Sat Sep 19, 2015 9:58 pm

/etc/init.d/networking

Fri Oct 23, 2015 8:45 pm

Hey fellows,

When I changed my Raspberry pi's IP to static, I need to restart the networking to make it applicable. But sometime it shows me the following error.

I do install the raspbian again to get rid of this error, but there would be some proper way to get rid of this....
I need help.

Regards,
Attachments
networking error.PNG
networking error.PNG (3.31 KiB) Viewed 2976 times

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: /etc/init.d/networking

Fri Oct 23, 2015 9:42 pm

What happens if you try it using the /etc/init.d script?

sudo /etc/init.d/networking stop
sudo /etc/init.d/networking start
sudo /etc/init.d/networking status
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

aaqib752
Posts: 16
Joined: Sat Sep 19, 2015 9:58 pm

Re: /etc/init.d/networking

Fri Oct 23, 2015 10:11 pm

sudo /etc/init.d/networking stop
sudo /etc/init.d/networking start
sudo /etc/init.d/networking status

Same error...!

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: /etc/init.d/networking

Fri Oct 23, 2015 10:24 pm

Run it with
sudo bash -x /etc/init.d/networking status and you should get lots of stuff on the screen

On my working Jessie system I get

Code: Select all

root@saturn / # bash -x /etc/init.d/networking status
+ PATH=/sbin:/bin
+ RUN_DIR=/run/network
+ IFSTATE=/run/network/ifstate
+ STATEDIR=/run/network/state
+ '[' -x /sbin/ifup ']'
+ '[' -x /sbin/ifdown ']'
+ . /lib/lsb/init-functions
+++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']'
++ . /lib/lsb/init-functions.d/20-left-info-blocks
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
++ . /lib/lsb/init-functions.d/40-systemd
+++ _use_systemctl=0
+++ '[' -d /run/systemd/system ']'
+++ '[' -n '' ']'
+++ '[' 15747 -ne 1 ']'
+++ '[' -z '' ']'
+++ '[' -z '' ']'
+++ case $(readlink -f "$0") in
++++ readlink -f /etc/init.d/networking
+++ _use_systemctl=1
+++ prog=networking
+++ service=networking.service
++++ systemctl -p CanReload show networking.service
+++ '[' CanReload=yes = CanReload=no ']'
+++ '[' 1 = 1 ']'
+++ set +e
+++ set +u
+++ '[' xstatus = xstart -o xstatus = xstop -o xstatus = xrestart -o xstatus = xreload -o xstatus = xforce-reload -o xstatus = xstatus ']'
+++ systemctl_redirect /etc/init.d/networking status
+++ local s
+++ local rc
+++ local prog=networking
+++ local command=status
+++ case "$command" in
+++ service=networking.service
++++ systemctl -p LoadState show networking.service
+++ state=LoadState=loaded
+++ '[' LoadState=loaded = LoadState=masked ']'
+++ '[' status = status ']'
+++ /bin/systemctl status networking.service
● networking.service - LSB: Raise network interfaces.
   Loaded: loaded (/etc/init.d/networking)
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
        /lib/systemd/system/networking.service.d
           └─network-pre.conf
   Active: active (exited) since Thu 2015-10-22 02:00:18 BST; 1 day 21h ago

Oct 22 02:00:17 saturn networking[207]: Failed to bring up wlan0.
Oct 22 02:00:17 saturn wpa_supplicant[449]: Successfully initialized wpa_sup...t
Oct 22 02:00:17 saturn wpa_supplicant[449]: Could not read interface wlan1 f...e
Oct 22 02:00:17 saturn wpa_supplicant[449]: nl80211: Driver does not support...s
Oct 22 02:00:17 saturn wpa_supplicant[449]: Could not read interface wlan1 f...e
Oct 22 02:00:17 saturn networking[207]: /etc/network/if-pre-up.d/wpasupplica...s
Oct 22 02:00:17 saturn networking[207]: run-parts: /etc/network/if-pre-up.d/...1
Oct 22 02:00:17 saturn networking[207]: Failed to bring up wlan1.
Oct 22 02:00:18 saturn networking[207]: done.
Oct 22 02:00:18 saturn systemd[1]: Started LSB: Raise network interfaces..
Hint: Some lines were ellipsized, use -l to show in full.
+++ rc=0
+++ '[' status = status ']'
+++ return 0
+++ exit 0
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

aaqib752
Posts: 16
Joined: Sat Sep 19, 2015 9:58 pm

Re: /etc/init.d/networking

Fri Oct 23, 2015 10:50 pm

Run it with
sudo bash -x /etc/init.d/networking status and you should get lots of stuff on the screen
Same error... :(
Attachments
networking error2.PNG
networking error2.PNG (3.55 KiB) Viewed 2853 times

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: /etc/init.d/networking

Fri Oct 23, 2015 11:30 pm

There's something drastically wrong with your root filesystem. Have you rebooted recently? Is the root fs on a USB device (/dev/sda or suchlike)?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

aaqib752
Posts: 16
Joined: Sat Sep 19, 2015 9:58 pm

Re: /etc/init.d/networking

Fri Oct 23, 2015 11:40 pm

I didn't see anything like that as I am using SSH via my PC. Maybe that thing happened but this is not for the first time. Can you suggest me solution whateher it is (/dev/sda or suchlike)???
I am don't understand what this error really means and hot to get rid of.

aaqib752
Posts: 16
Joined: Sat Sep 19, 2015 9:58 pm

Re: /etc/init.d/networking

Sun Oct 25, 2015 4:03 pm

Can you tell me the cause of this problem? I will be carefull for next time...

Thanks and Regards

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: /etc/init.d/networking

Sun Oct 25, 2015 4:14 pm

aaqib752 wrote:Can you tell me the cause of this problem? I will be carefull for next time...

Thanks and Regards
It is usually a cause of not shutting down properly (pulling the plug) or fiddling with settings and accidentally deleting it. You probably have to start afresh.
There are 10 types of people: those who understand binary and those who don't.

aaqib752
Posts: 16
Joined: Sat Sep 19, 2015 9:58 pm

Re: /etc/init.d/networking

Mon Oct 26, 2015 11:37 am

kusti8 wrote:
aaqib752 wrote: It is usually a cause of not shutting down properly (pulling the plug) or fiddling with settings and accidentally deleting it. You probably have to start afresh.
As far I remember most of the time I properly shut it down from CLI. What do you mean by fiddling with settings?? I am practicing MQTT and VoIP on it so I need to install some softwares and run some codes......
Sometimes some commands don't work and after some break same commands works properly. I am confused.

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: /etc/init.d/networking

Mon Oct 26, 2015 11:49 am

There's two ways to corrupt SDCards
1. Pull the power while the system is writing.
2. Run the system with a power supply (or USB-A to microUSB cable) that isn't capable of delivering a steady 5V0 @ 700mA (or better)

#2 can also be a symptom of running too many high current USB devices without having a stronger power supply to support them.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

aaqib752
Posts: 16
Joined: Sat Sep 19, 2015 9:58 pm

Re: /etc/init.d/networking

Mon Nov 09, 2015 4:42 pm

DougieLawson wrote:Run it with
sudo bash -x /etc/init.d/networking status and you should get lots of stuff on the screen

On my working Jessie system I get

Code: Select all

root@saturn / # bash -x /etc/init.d/networking status
+ PATH=/sbin:/bin
+ RUN_DIR=/run/network
+ IFSTATE=/run/network/ifstate
+ STATEDIR=/run/network/state
+ '[' -x /sbin/ifup ']'
+ '[' -x /sbin/ifdown ']'
+ . /lib/lsb/init-functions
+++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']'
++ . /lib/lsb/init-functions.d/20-left-info-blocks
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
++ . /lib/lsb/init-functions.d/40-systemd
+++ _use_systemctl=0
+++ '[' -d /run/systemd/system ']'
+++ '[' -n '' ']'
+++ '[' 15747 -ne 1 ']'
+++ '[' -z '' ']'
+++ '[' -z '' ']'
+++ case $(readlink -f "$0") in
++++ readlink -f /etc/init.d/networking
+++ _use_systemctl=1
+++ prog=networking
+++ service=networking.service
++++ systemctl -p CanReload show networking.service
+++ '[' CanReload=yes = CanReload=no ']'
+++ '[' 1 = 1 ']'
+++ set +e
+++ set +u
+++ '[' xstatus = xstart -o xstatus = xstop -o xstatus = xrestart -o xstatus = xreload -o xstatus = xforce-reload -o xstatus = xstatus ']'
+++ systemctl_redirect /etc/init.d/networking status
+++ local s
+++ local rc
+++ local prog=networking
+++ local command=status
+++ case "$command" in
+++ service=networking.service
++++ systemctl -p LoadState show networking.service
+++ state=LoadState=loaded
+++ '[' LoadState=loaded = LoadState=masked ']'
+++ '[' status = status ']'
+++ /bin/systemctl status networking.service
● networking.service - LSB: Raise network interfaces.
   Loaded: loaded (/etc/init.d/networking)
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
        /lib/systemd/system/networking.service.d
           └─network-pre.conf
   Active: active (exited) since Thu 2015-10-22 02:00:18 BST; 1 day 21h ago

Oct 22 02:00:17 saturn networking[207]: Failed to bring up wlan0.
Oct 22 02:00:17 saturn wpa_supplicant[449]: Successfully initialized wpa_sup...t
Oct 22 02:00:17 saturn wpa_supplicant[449]: Could not read interface wlan1 f...e
Oct 22 02:00:17 saturn wpa_supplicant[449]: nl80211: Driver does not support...s
Oct 22 02:00:17 saturn wpa_supplicant[449]: Could not read interface wlan1 f...e
Oct 22 02:00:17 saturn networking[207]: /etc/network/if-pre-up.d/wpasupplica...s
Oct 22 02:00:17 saturn networking[207]: run-parts: /etc/network/if-pre-up.d/...1
Oct 22 02:00:17 saturn networking[207]: Failed to bring up wlan1.
Oct 22 02:00:18 saturn networking[207]: done.
Oct 22 02:00:18 saturn systemd[1]: Started LSB: Raise network interfaces..
Hint: Some lines were ellipsized, use -l to show in full.
+++ rc=0
+++ '[' status = status ']'
+++ return 0
+++ exit 0

Using command "bash -x /etc/init.d/networking status" I got this......
It is quite different from yours.
Attachments
networking error3.PNG
networking error3.PNG (21.03 KiB) Viewed 2485 times

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: /etc/init.d/networking

Mon Nov 09, 2015 7:45 pm

In that case your Jessie upgrade has failed to install the latest /etc/init.d/networking script.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

aaqib752
Posts: 16
Joined: Sat Sep 19, 2015 9:58 pm

Re: /etc/init.d/networking

Tue Nov 10, 2015 1:16 pm

DougieLawson wrote:In that case your Jessie upgrade has failed to install the latest /etc/init.d/networking script.
Am I supposed to upgrade it??
That will work or I have to install the new OS....

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: /etc/init.d/networking

Tue Nov 10, 2015 3:52 pm

I'd build a new Jessie card and lift the /etc/init.d files from there and drop them on your old card.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

aaqib752
Posts: 16
Joined: Sat Sep 19, 2015 9:58 pm

Re: /etc/init.d/networking

Tue Nov 10, 2015 6:42 pm

DougieLawson wrote:I'd build a new Jessie card and lift the /etc/init.d files from there and drop them on your old card.
Making backup of "networking" file will also work or it is essential to copy the whole directory (init.d)...
I am using 2-3 raspberry so I can manage that.

There is also an issue that when I connect these together for socket communication it shows some other Ip address e.g.,(Connected to 192.168.2.53) where as Ip of my connected PI is (192.168.2.208)....
Sometime this clash may occur. For ifconfig it shows "208" and I can also SSH @ "53" using "PiFinder".
Thats very strange.

Return to “Troubleshooting”