Asus RT-N16 - PTY allocation request failure

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Thu Jul 15, 2021 2:10    Post subject: Asus RT-N16 - PTY allocation request failure Reply with quote
Hi,

I've been observing terminal logon issues (ssh and telnet) with a number of versions of dd-wrt on my Asus RT-N16 access points (currently running DD-WRT v3.0-r46446 big).

The problem

When I tried to log in via SSH it failed with a PTY allocation error:

PTY allocation request failed on channel 0

If I tried to log in via telnet the initial connection failed and telnetd died on the access point.

After a fair amount of googling, I found this thread which indirectly reveals the solution to my "situation".

The solution

During boot up, I had previously identified if the system time needs correction (the N16 boots with an initial date back in 1970 (epoch) so I use ntpdate to correct this to the current date / time). If hotplug2 starts while at this initial 1970 date, then pty (pts) allocation appears to fail - not entirely sure why.

The fix was just to restart hotplug2 after ntpdate successfully corrects the date / time - ssh (and telnet) now appear to function reliably.

Hope this helps others.

_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14102
Location: Texas, USA

PostPosted: Thu Jul 15, 2021 2:31    Post subject: Reply with quote
1) DD-WRT doesn't use busybox init; never has AFAIK.
2) If you can't wait a minimum of 5 full minutes from power-up to boot and let everything stabilize before you login, then you're likely going to see some anomalies. I rarely see this error on any device...

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Thu Jul 15, 2021 10:11    Post subject: Reply with quote
kernel-panic69 wrote:
1) DD-WRT doesn't use busybox init; never has AFAIK.
2) If you can't wait a minimum of 5 full minutes from power-up to boot and let everything stabilize before you login, then you're likely going to see some anomalies. I rarely see this error on any device...


1) I never said it did - hence my use of the word indirectly.
2) It doesn't matter how long I wait "5 full minutes", 5 full hours or 5 full days from boot - dropbear and telnetd will continue to fail to assign a pseudo-tty on the RT-N16 as described - by contrast, using the same release and configuration of dd-wrt, dropbear and telnetd function fine on my RT-AC87U and RT-AC68U C1 devices (don't even need to wait 5 full minutes).

Thanks for your feedback.

_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14102
Location: Texas, USA

PostPosted: Thu Jul 15, 2021 12:43    Post subject: Reply with quote
Now my question is, on this(these) RT-N16U(s), configured as a wired access point(s), do you have the upstream gateway router's IP address in the Gateway (and optionally local DNS) entries on the Setup -> Basic Setup page? Or are you manually overriding anything to set the date? Some further configuration information is likely required here to properly come to a conclusion here.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Thu Jul 15, 2021 13:55    Post subject: Reply with quote
Only using the RT-N16 as an AP and VLAN switch - the WAN port is also assigned as part of the switch (one of the reasons I haven't progressed beyond r46446).

Upstream g/w and local DNS (Setup -> Basic Setup) are both configured.

On further inspection, I don't believe the problem is time related - it only appears related to hotplug2 on the RT-N16 for reasons I give below.

Aside - I'm not using the NTP client included as part of dd-wrt - instead using NTP (4.2.8p15) software from Entware to set and maintain time - however, as I mentioned, I don't believe the issue is time related.

I have both an RT-N16 and an RT-AC68U configured the same way - I have disabled Entware NTP on both routers (so the time just starts at epoch after reboot) - on the N16 I cannot log in using ssh until I restart hotplug2, whereas on the AC68U I can log in immediately using ssh.

Will post configurations when I get the chance.

_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14102
Location: Texas, USA

PostPosted: Thu Jul 15, 2021 14:28    Post subject: Reply with quote
RT-N16 is a single-band device similar to the E4200 save and except for flash space and RAM. Not sure what the configuration differences are for the firmware image, but I do not see this problem on my E4200 running K3.X builds; I have never seen this issue whatsoever. Also, holding onto 46446 is moot AFAIK. Because everything should be configurable in the webUI on Broadcom now, including multiple vlans. Anyhow, we need configuration information and logs before I contact BrainSlayer.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Fri Jul 16, 2021 2:24    Post subject: Reply with quote
Attached:

- Configuration information (output from 'nvram show' with some redaction)
- Copy of /var/log/messages taken > 40 minutes after a reboot of the N16 and after attempting to ssh in - pty fails to allocate (error as expected)
- Output from running ssh client in verbose mode

Regarding releases post-46446 - I have tried releases beyond r46446, however, last time I checked, the ability to 'Assign WAN Port to Switch' was not available, I'll check out the latest release if that's now implemented.



ssh-verbose.txt
 Description:
ssh attempt in verbose mode - key exchange is successful however server (dropbear) fails to allocate pty

Download
 Filename:  ssh-verbose.txt
 Filesize:  2.7 KB
 Downloaded:  94 Time(s)


messages.txt
 Description:
/var/log/messages file taken after about 40 or so minutes from boot

Download
 Filename:  messages.txt
 Filesize:  29.14 KB
 Downloaded:  92 Time(s)


nvram-show-redacted.txt
 Description:
Output from 'nvram show' with password and key redaction

Download
 Filename:  nvram-show-redacted.txt
 Filesize:  31.39 KB
 Downloaded:  105 Time(s)


_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14102
Location: Texas, USA

PostPosted: Sat Jul 17, 2021 14:51    Post subject: Reply with quote
I was told to advise you to upgrade to 47040 and see if the problem persists (or if other problems arise). You are going to have to get into the current releases as BrainSlayer is not going to do a checkout at 46446 and fix an issue there to build a new image for this router. Your vlans should be configurable via the webUI, you should not need any command line voodoo. If you wish to be adamant about not upgrading, then you are stuck with this issue.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
msj100
DD-WRT Novice


Joined: 30 Jul 2007
Posts: 33
Location: Melbourne, Australia

PostPosted: Sun Jul 18, 2021 13:27    Post subject: Reply with quote
OK - fair enough.

For the record, I've delayed my upgrade beyond 46446 because I wanted to have the WAN port part of the switch - which doesn't seem straightforward in later releases (certainly no longer present in the web UI).

I been testing r47040 and although the pty problem does not appear to be present, I have observed a number of other issues, most significantly, problems rebooting after relatively minor configuration changes - the RT-N16 does not appear to reboot successfully (network is not brought up).

It's going to be difficult to get diagnostics off a host that does not bring back its network - I end up having to power cycle to get access back.

Reboot when configuration remains unchanged appears to be successful.

Will continue testing and post what I can to the r47040 release thread.

_________________
Asus RT-AC87U - dd-wrt
Asus RT-AC68U - dd-wrt
Asus RT-N16 - dd-wrt
TP-Link TL-MR3020 - OpenWRT
VAPs / VLANs / PBR / Entware
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
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
You can attach files in this forum
You can download files in this forum