SSH connection killed by eth_speed script [natty]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
powernap (Ubuntu) |
Fix Released
|
High
|
Andres Rodriguez |
Bug Description
Binary package hint: powernap
On my machine,
upon changing the ethernet connection speed (as done by the /etc/pm/
This cause, among other things, remote SSH session to be immediately lost.
This is extra nasty if, as I did, you put:
[TCPMonitor]
ssh = 22
in /etc/powernap/
Then the following events occurs:
* a user open a remote SSH session
* powernap reacts by running action.d scripts
* eth_speed script change ethernet speed setting
* the SSH connection is lost and thus the opening of the remote session fails.
The workaround is to attempt a reconnect very quickly before another power transition occurs
The NIC is a standard RTL8111/8168B
Changed in powernap (Ubuntu): | |
status: | New → Incomplete |
Changed in powernap (Ubuntu): | |
importance: | Low → High |
status: | Incomplete → Confirmed |
Hi Mathiu,
Thank you for taking the time to report bugs and trying to make PowerNap better.
Now, I don't quite seem to understand your scenario. So just let me get this straight.
1. You configured PowerNap to listen to a TCP Monitor. pm-utils/ power.d/ to reduce power consumption while running the machine.
2. You started powernap and it became idled and after 300 seconds of inactivity it performed the action.
2. The action is *powersave* that run all the scripts in /etc/pm/power.d/ and /usr/lib/
3. You SSH into the machine and PowerNap takes recover action by running the scripts again, *but* your SSH session failed?
Please specify your scenario. Please also enable DEBUG=3 in the config, try to reproduce the bug and attach the following: config powernap. log powernap. err
- /etc/powernap/
- /var/log/
- /var/log/
Now, if you configure a TCP monitor for port 22 and you SSH into that machine *before* PowerNap put the machine into powersave mode (ACTION_METHOD=0), then the machine will *never* enter into PowerSave monitor until the SSH session is lost and the machine is detected as being inactive after the desired time.
Now, if you have the TCPMonitor configured for ssh, and the machine *is* in PowerSave mode, whenever you SSH in, the machine should take recover action by running the scripts. And you should be able to continue to use your machine without any issue, even with SSH.
I've tested this again (and has been tested in various machines previously):
1. Configure PowerNap for TCPMonitor.
2. Wait till PowerNap enters into PowerSave Mode.
3. SSH into machine
4. PowerNap takes recover action after detection of SSH connection.
5. SSH Connection continue as normal (without the issues you are mentioning above).
Now, try to reproduce the issue again and run 'watch ethtool eth0' in a different terminal and observe the behavior.
When PowerNap enters into PowerSave mode (2), you should see something like:
Supported ports: [ TP MII ]
100baseT/ Half 100baseT/Full
1000baseT/ Half 1000baseT/Full
Supported link modes: 10baseT/Half 10baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: Not reported
When you SSH into machine after machine is in PowerSave mode (3) you should see something like:
Supported ports: [ TP MII ]
100baseT/ Half 100baseT/Full
1000baseT/ Half 1000baseT/Full
100baseT/ Half 100baseT/Full
1000baseT/ Half 1000baseT/Full
Supported link modes: 10baseT/Half 10baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
I'm marking this bug as incomplete after the required information is provided!