Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unable to login due to hanging motd #7753

Closed
1 of 2 tasks
WiseLord opened this issue Jan 27, 2025 · 5 comments
Closed
1 of 2 tasks

[Bug]: Unable to login due to hanging motd #7753

WiseLord opened this issue Jan 27, 2025 · 5 comments
Labels
Bug Something isn't working as it should Good first issue Feel free to contribute :)

Comments

@WiseLord
Copy link
Contributor

WiseLord commented Jan 27, 2025

What happened?

Recently I experience some issues with accessing whatismyip.akamai.com (some kind of issues from ISP). This results in hanging motd inside of get_wan_address() in https://github.com/armbian/build/blob/main/packages/bsp/common/etc/update-motd.d/10-armbian-header.

It seems passing --connect-timeout 2 to curl is not enough to guarantee fast return when some network problems happen.

I strongly recommend adding one more curl option, i.e. --max-time 2 - this 100% works in my case.

BTW, FYI in my own scripts for finding WAN IP I use curl ifconfig.me - this is shorter.

How to reproduce?

It's actually hard to reproduce. For me curl call works when I use some VPN server, but hangs when I use my ISP network It worked two days before...)

SSH access was completely unavailable for me, but I managed to get root access over UART - it allowed me to enter the shell after pressing Ctrl-C while login was hanging.

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Ubuntu 24.04 Noble

Are you building on Windows WSL2?

  • Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@WiseLord WiseLord added the Bug Something isn't working as it should label Jan 27, 2025
Copy link
Contributor

Hey @WiseLord !

Looks like it's your first time interacting with Armbian here on GitHub.

Welcome and thank you for taking the time to report an issue ❤️.

Don't forget to star ⭐ the repo.

@github-actions github-actions bot added the Good first issue Feel free to contribute :) label Jan 27, 2025
Copy link
Contributor

github-actions bot commented Jan 27, 2025

Jira ticket: AR-2593

@igorpecovnik
Copy link
Member

It's actually hard to reproduce.

Yeah, I can understand this. If you got few more minutes, make a PR with those changes. Most of things people recommend, especially on forums, we are unable to integrate :(

Thank you for finding this one and ideas for solving it.

WiseLord added a commit to WiseLord/armbian-build that referenced this issue Jan 27, 2025
Option "--connect-timeout" used to determine external IP covers only
connection phase. Curl may "hans" in a different phase and this makes
login to the system impossible if MOTD "header" module enabled.

Using "--max-time" is more reliable and prevents hanging for hours.

Fixes issue armbian#7753

Signed-off-by: Uladzimir Bely <[email protected]>
@WiseLord
Copy link
Contributor Author

Please see #7755

igorpecovnik pushed a commit that referenced this issue Jan 27, 2025
Option "--connect-timeout" used to determine external IP covers only
connection phase. Curl may "hans" in a different phase and this makes
login to the system impossible if MOTD "header" module enabled.

Using "--max-time" is more reliable and prevents hanging for hours.

Fixes issue #7753

Signed-off-by: Uladzimir Bely <[email protected]>
@igorpecovnik
Copy link
Member

Done, closing. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as it should Good first issue Feel free to contribute :)
Development

No branches or pull requests

2 participants