Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
net.wlan0 has started, but is inactive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 552
Location: Cracow, Poland

PostPosted: Fri Nov 04, 2011 5:55 pm    Post subject: net.wlan0 has started, but is inactive Reply with quote

I did:
https://forums.gentoo.org/viewtopic-t-900156-highlight-.html

But still during boot i got problems:
Code:
 * Bringing up interface wlan0
 *   Starting wpa_supplicant on wlan0 ...
 [ ok ]
 *   Starting wpa_cli on wlan0 ...
 [ ok ]
 *   Backgrounding ... ...
 * WARNING: net.wlan0 has started, but is inactive
 * Setting clock via the NTP client 'ntpdate' ...
Error resolving 0.gentoo.pool.ntp.org: Name or service not known (-2)
Error resolving 1.gentoo.pool.ntp.org: Name or service not known (-2)
Error resolving 2.gentoo.pool.ntp.org: Name or service not known (-2)
Error resolving 3.gentoo.pool.ntp.org: Name or service not known (-2)
 * Failed to set clock
 [ !! ]
 * ERROR: ntp-client failed to start
 * Starting rpcbind ...
 [ ok ]
 * Starting NFS statd ...
 [ ok ]
 * Starting NFS sm-notify ...
 [ ok ]
 * Mounting NFS filesystems ...
mount.nfs: Failed to resolve server flap: Temporary failure in name resolution
mount.nfs: Failed to resolve server flap: Temporary failure in name resolution
mount.nfs: Failed to resolve server flap: Temporary failure in name resolution
 [ !! ]
 * ERROR: nfsmount failed to start
 * Mounting network filesystems ...
mount.nfs: Failed to resolve server flap: Temporary failure in name resolution
mount.nfs: Failed to resolve server flap: Temporary failure in name resolution
mount.nfs: Failed to resolve server flap: Temporary failure in name resolution
 [ ok ]
 * Starting gpm ...


After booting I can start all services without problem:
Code:
/etc/init.d/nfsmount start
 * Starting NFS sm-notify ...   [ ok ]
 * Mounting NFS filesystems ...   [ ok ]

meee ~ # /etc/init.d/ntp-client start
 * Setting clock via the NTP client 'ntpdate' ...   [ ok ]

Even when:
Code:
meee ~ # rc-status | grep wlan0
 net.wlan0                                                         [ inactive  ]


Why it happend? My wifi network isn't running during boot, it take longer to start or what? Probably answer is to easy?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46700
Location: 56N 3W

PostPosted: Fri Nov 04, 2011 7:58 pm    Post subject: Reply with quote

emc,

The errors point either to no network or no nameserver entries in /etc/resolv.conf but its resolved wgen you can log in and start the services by habd.

What do you have in /etc/rc.conf
and what does rc-update show --verbose produce ?

Lastly, do you have an unused wired Ethernet interface ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 552
Location: Cracow, Poland

PostPosted: Fri Nov 04, 2011 10:36 pm    Post subject: Reply with quote

My rc.conf

My rc-update

Sometimes I connect wired but not offen. what you really mean, how to check it? ;) When I connect cable it came up.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46700
Location: 56N 3W

PostPosted: Fri Nov 04, 2011 11:18 pm    Post subject: Reply with quote

emc,

rc-update:
wicd |         boot
looks a bit odd.

Isn't wicd a network manager of some sort?
If so, it should probably be in the default and battery runlevels, not boot. as you don't want to force networking to start in the boot runlevel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 552
Location: Cracow, Poland

PostPosted: Sat Nov 05, 2011 9:00 pm    Post subject: Reply with quote

I've change wicd run in battery and default runlevel but it didn't help. Any way it look like wps_supplicat problem or sort of, after boot I got
Code:
meee ~ # /etc/init.d/net.wlan0 restart
 * Bringing down interface wlan0
 *   Stopping dhcpcd on wlan0 ...                                                                                     [ ok ]
 *   Removing addresses
 * Bringing up interface wlan0
 *   Starting wpa_supplicant on wlan0 ...                                                                             [ ok ]
 *   Starting wpa_cli on wlan0 ...                                                                                    [ ok ]
 *   Backgrounding ... ...
 * WARNING: net.wlan0 has started, but is inactive


And I see similar massages during booting. It's inactive but I get connected.

Any suggestions??
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46700
Location: 56N 3W

PostPosted: Sun Nov 06, 2011 6:36 pm    Post subject: Reply with quote

emc,

I get that too - but it works, so I just ignore the warning.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 552
Location: Cracow, Poland

PostPosted: Mon Nov 07, 2011 10:14 am    Post subject: Reply with quote

NeddySeagoon:
OK, but the point is I can't mount NFS shares during boot or run NTP to update system clock, it sounds insane to me :|
Back to top
View user's profile Send private message
mr.sande
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2010
Posts: 82
Location: Norway

PostPosted: Mon Nov 07, 2011 2:35 pm    Post subject: Reply with quote

emc wrote:
NeddySeagoon:
OK, but the point is I can't mount NFS shares during boot or run NTP to update system clock, it sounds insane to me :|


Mounting NFS over WiFi on boot has a tendency to make you unhappy, everytime you get disconnected you get trouble from NFS.
WiFi just isn't reliable enough to do NTP or NFS over at boot :( One problem is that when the net.wlan0 script is done, as in when
it says
Code:
 *   Backgrounding ... ...
 * WARNING: net.wlan0 has started, but is inactive

there is no guarantee that the connection is actually ready. And when the network services start they assume that the connection
is up, and they fail because the link isn't ready yet.
Back to top
View user's profile Send private message
greyspoke
Tux's lil' helper
Tux's lil' helper


Joined: 08 Jan 2010
Posts: 148

PostPosted: Mon Nov 07, 2011 9:01 pm    Post subject: Reply with quote

I noticed this issue when I went wireless. RC doesn't wait for net.wlan0 to finish before moving on (probably as it is unreliable as mr.sande said above), which is where that message comes from.

To give NTP a reasonable chance of starting, don't run the NTP init script, start the daemon using the postup function in your conf.d/net (I found that on this forum somewhere but can''t find it now). Here's mine, which just runs a quick and dirty one-off clock check. At least I think it does - /etc/conf.d/net snippet:
Code:
postup() {
   if [ ${IFVAR} != "lo" ]; then
# (long wait if you do this with net.lo)
      sntp -s -p ntp.plus.net
   fi
}

that's my ISPs time server there, would be different for you. I guess you could do the same with network mounts.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46700
Location: 56N 3W

PostPosted: Mon Nov 07, 2011 9:05 pm    Post subject: Reply with quote

emc,

You can try to background your nfs mounts. Add the bg option to /etc/fstab.
I have a horrible feeling that this won't work for root over nfs as /etc/fstab is not used to mount root.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
new_item
n00b
n00b


Joined: 10 Jun 2011
Posts: 20
Location: Poland

PostPosted: Tue Nov 08, 2011 1:01 am    Post subject: Reply with quote

Maybe changing (in /etc/init.d/nfsmount) this:

Code:

mount -a -t nfs,nfs4


into something like that:

Code:

start() {

(...)

        ebegin "Mounting NFS filesystems"
        $( $( if [ x"`ping -c1 192.168.1.9 | grep -w Unreachable`" == x"0" ]
        then mount -a -t nfs,nfs4 && exit
        else sleep 3
        fi ) & )
        eend $?
}


will help you. Please remember to change IP in scritpt into your nfs server IP. It have to be IP number not name of the host. I didn't check if script works, but it looks reasonably.
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 552
Location: Cracow, Poland

PostPosted: Thu Aug 01, 2013 11:34 am    Post subject: Reply with quote

I did something like:
Code:
start() {
        ebegin "Starting..."
        #start-stop-daemon --start --quiet --background --exec
        PING=`ping -W1 -c1 89.16.167.13 | grep "received" | cut -d" " -f4`
        if [ $PING -eq 1 ]; then
                <COMMANDS HERE> &>/dev/null
                return 0
        else
        #if [ $PING -eq 0 ]; then
                for i in {1..3}
                do
                        sleep 1
                        PING=`ping -W1 -c1 89.16.167.134 | grep "received" | cut -d" " -f4`
                        if [ $PING -eq 1 ]; then
                                <COMMANDS HERE> &>/dev/null
                                return 0
                        fi
                done
                eerror "Failed to contact internet"
                return 1
        fi
        eend $?

}


*EDIT - I corrected script a bit


Last edited by emc on Thu Aug 01, 2013 11:50 am; edited 2 times in total
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 552
Location: Cracow, Poland

PostPosted: Thu Aug 01, 2013 11:40 am    Post subject: Reply with quote

greyspoke wrote:

Code:
postup() {
   if [ ${IFVAR} != "lo" ]; then
# (long wait if you do this with net.lo)
      sntp -s -p ntp.plus.net
   fi
}

that's my ISPs time server there, would be different for you. I guess you could do the same with network mounts.

Should I add it to /etc/conf.d/net file or somewhere in /etc/init.d/?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum