procurve: 'maximum number of telnet sessions' and an HTML REST answer are both reported as 'Authentication failed' #13

Closed
opened 2026-10-15 14:28:02 +00:00 by christianmanivong · 0 comments
Owner

On 2026-10-15 every connection to a telnet-only ProCurve (swt-l0-3-40, 172.22.8.40) failed for polls and device actions alike, with:

Authentication failed for 172.22.8.40 via telnet: Login failed: 172.22.8.40 (earlier: api: REST API login failed (HTTP 200) for 172.22.8.40; ssh: timed out; ssh_legacy: timed out)

That reads as a wrong password. It is not one: the credentials had not changed since May. Two things are actually going on:

  1. Telnet. Before any login the switch prints Sorry, the maximum number of telnet sessions are active. Try again later. and netmiko's hp_procurve_telnet turns that into NetmikoAuthenticationException: Login failed. _try_telnet passes it to _auth_failure, so it is reported as an authentication failure.
  2. REST. POST /rest/v7/login-sessions answers HTTP 200 with the web UI's HTML "session timed out" page, for any user (also for a made-up one), and so does GET /rest/v7/system. ProcurveApiClient.connect reports this as "REST API login failed (HTTP 200)". An HTML answer is not a login result; it should say the REST interface did not answer as REST.
  3. Minor: ssh: timed out is recorded where paramiko actually raised IncompatiblePeer: no acceptable kex algorithm.

Proposal

  • Telnet: read the greeting before handing over to netmiko (or catch the exception and check the buffer). Report Telnet: the switch has no free session (maximum number of telnet sessions active) as a connection error, not an authentication error.
  • REST: a 200 with text/html → REST API on <host> answered with a web page instead of JSON (HTTP 200).
  • Record the SSH failure reason instead of "timed out" when it is not a timeout.

Hanging sessions probably came from worker restarts during deploys, which killed polls mid-session. The switch only frees them at its inactivity timer, if one is set.

Prio: P2. It blocks every poll and action on the device, and the message sends the operator after the password instead of the session table.

On 2026-10-15 every connection to a telnet-only ProCurve (`swt-l0-3-40`, 172.22.8.40) failed for polls and device actions alike, with: ``` Authentication failed for 172.22.8.40 via telnet: Login failed: 172.22.8.40 (earlier: api: REST API login failed (HTTP 200) for 172.22.8.40; ssh: timed out; ssh_legacy: timed out) ``` That reads as a wrong password. It is not one: the credentials had not changed since May. Two things are actually going on: 1. **Telnet.** Before any login the switch prints `Sorry, the maximum number of telnet sessions are active. Try again later.` and netmiko's `hp_procurve_telnet` turns that into `NetmikoAuthenticationException: Login failed`. `_try_telnet` passes it to `_auth_failure`, so it is reported as an authentication failure. 2. **REST.** `POST /rest/v7/login-sessions` answers HTTP 200 with the web UI's HTML "session timed out" page, for any user (also for a made-up one), and so does `GET /rest/v7/system`. `ProcurveApiClient.connect` reports this as "REST API login failed (HTTP 200)". An HTML answer is not a login result; it should say the REST interface did not answer as REST. 3. Minor: `ssh: timed out` is recorded where paramiko actually raised `IncompatiblePeer: no acceptable kex algorithm`. **Proposal** - Telnet: read the greeting before handing over to netmiko (or catch the exception and check the buffer). Report `Telnet: the switch has no free session (maximum number of telnet sessions active)` as a connection error, not an authentication error. - REST: a 200 with `text/html` → `REST API on <host> answered with a web page instead of JSON (HTTP 200)`. - Record the SSH failure reason instead of "timed out" when it is not a timeout. Hanging sessions probably came from worker restarts during deploys, which killed polls mid-session. The switch only frees them at its inactivity timer, if one is set. Prio: P2. It blocks every poll and action on the device, and the message sends the operator after the password instead of the session table.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-hpe-aruba-procurve#13