View previous topic :: View next topic |
Author |
Message |
greanie n00b
Joined: 13 Nov 2007 Posts: 42
|
Posted: Sun Nov 12, 2017 8:38 pm Post subject: Network on headless goes to sleep |
|
|
I completed an install of Gentoo a few weeks ago running as a cloud server in headless configuration. Everything works fine except after 24 of no activity on the cloud clients, the server is no longer reachable via the network. I have to connect a keyboard and display to the server, and log in. I expect I set the kernel config to have ACPI without realizing. I have tried to figure out how to stop it from going to sleep but can't quite figure out where the config file is. It seems pm-utils and hibernate-script-2.0-r6 are installed but again, not sure if that is what is putting the server in freeze mode. Can someone help me figure out how to either turn off the suspend feature or set it to a really long timeout? |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Sun Nov 12, 2017 8:51 pm Post subject: |
|
|
If you're running a display manager, that configuration would be specific to that software.
For instance if you're running gdm/Gnome you'd have to configure Gnome to stop shutting down, perhaps just not running gdm is sufficient.
On modern machines you must have ACPI set up anyway so that's fine. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
greanie n00b
Joined: 13 Nov 2007 Posts: 42
|
Posted: Sun Nov 12, 2017 9:05 pm Post subject: |
|
|
I'm not running a display manager, none installed. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Sun Nov 12, 2017 9:27 pm Post subject: |
|
|
You may be looking at something else and not it sleeping then, possibly hardware or software failure. The default is for it to never sleep if you didn't install a desktop environment.
So what *is* it doing? Going into S3 through S5 should be quite noticeable, power drops off to almost nothing. S4 is extremely slow, so you should know when it's trying to restore from S4; even S3 takes a few seconds or so to wake up from. (S5 is complete power off, which is probably not what's happening...) If it's just hanging there instead, it may be something else and not sleep mode. Did DPMS modes kick in on the display? Can you just press a button on the keyboard to restore operation, without logging in - as usually that is sufficient as a wake event? _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sun Nov 12, 2017 11:57 pm Post subject: |
|
|
How is your network configured? It sounds like it's expiring a DHCP lease and failing to renew it in time. |
|
Back to top |
|
|
greanie n00b
Joined: 13 Nov 2007 Posts: 42
|
Posted: Mon Nov 13, 2017 11:53 am Post subject: |
|
|
Thank you for the quick feedback!
I am away from the server for a few days without remote access. I'll check more in the log files. I didn't find anything related to pm, suspend or hibernate in the dmesg or syslog. So it may not be the pm putting the network to sleep. I'll have to check if just hitting a key is enough or if I have to log in. Right now, I have a session open in the terminal and one key stroke in that session is enough to make the server accessible again by an outside machine (i.e. respond to a ping command).
The network is configured without DHCP, with a fixed IP address. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Mon Nov 13, 2017 5:42 pm Post subject: |
|
|
BIOS/Firmware may have timeouts listed, but the kernel does not as far as I know. Then again even newer firmware do not have timeouts listed.
Need to know what exactly your kernel is doing at the time of it stopping responding. I've had bad network cards.
So you are running X11 or using console?
What happens if you have a console constantly pinging another device like your router? _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
greanie n00b
Joined: 13 Nov 2007 Posts: 42
|
Posted: Thu Nov 16, 2017 1:39 pm Post subject: |
|
|
I'm just logging in through console.
I'm now starting to doubt a time out. In the past, the network would drop out over the weekend. But this week, it dropped out over night, so perhaps 3 - 4h without communication to the server.
As to the ping, are you suggesting I have one of my other servers ping continuously (ping command) the server that is dropping? I guess I can try that. |
|
Back to top |
|
|
P.Kosunen Guru
Joined: 21 Nov 2005 Posts: 309 Location: Finland
|
Posted: Thu Nov 16, 2017 4:42 pm Post subject: |
|
|
If it has Realtek NIC, try with Realteks proprietary network driver. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
greanie n00b
Joined: 13 Nov 2007 Posts: 42
|
Posted: Mon Nov 20, 2017 12:22 pm Post subject: |
|
|
The PCI ID is (from lcpci):
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 02)
The spec for the Fit PC2 is 'Realtek RTL8111F-CG GbE controller (RJ-45)'. I've got another hardware working but with an older install (1 year or so older) and the device is always available, no network issues. |
|
Back to top |
|
|
greanie n00b
Joined: 13 Nov 2007 Posts: 42
|
Posted: Mon Nov 20, 2017 12:26 pm Post subject: |
|
|
Below is the network setup as stored in /etc/net
# For static IP using netmask notation
config_enp2s0="192.168.1.212 netmask 255.255.255.0"
routes_enp2s0="default via 192.168.1.1"
dns_servers_enp2s0="192.168.1.1 8.8.8.8"
So not a dhcp issue. |
|
Back to top |
|
|
greanie n00b
Joined: 13 Nov 2007 Posts: 42
|
Posted: Mon Nov 20, 2017 12:51 pm Post subject: |
|
|
I've set up a ping command through a screen session to ping another server on the network once a minute. We'll see if the network still goes to sleep with that. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Mon Nov 20, 2017 6:00 pm Post subject: |
|
|
If you write a script to log that and know exactly if/when it stops working, that would be interesting too! _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Mon Nov 20, 2017 6:28 pm Post subject: |
|
|
Code: | 00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-V [8086:15b8] (rev 31) |
8086:15b8 - this is PCI ID.
I asked because you said you use out of kernel driver. For instance Realtek 8168 works also with in-kernel 8169 module. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
greanie n00b
Joined: 13 Nov 2007 Posts: 42
|
Posted: Sat Dec 09, 2017 12:58 pm Post subject: |
|
|
It seems that as long as the server is receiving a ping, the network stays up. That's after a week or so of testing.
@Jaglover: As stated above, I have the same network driver working reliably on the same hardware for 2 years so I expect it is either a setup issue or a difference in Gentoo between the two installes.
Obviously, running a ping command is not a very good longterm solution.
Any ideas on where to look for what might be causing the network to go to sleep? |
|
Back to top |
|
|
P.Kosunen Guru
Joined: 21 Nov 2005 Posts: 309 Location: Finland
|
Posted: Sun Dec 10, 2017 2:01 pm Post subject: |
|
|
Enable wake on lan and see if it helps to keep it always on. |
|
Back to top |
|
|
|