LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-11-2020, 06:13 AM   #1
kartheek1610
LQ Newbie
 
Registered: Jul 2020
Posts: 2

Rep: Reputation: Disabled
Post CentOS 7.3.1611 ssh client hangs on remote reboot


Hi,

I am trying to run "ssh root@x.x.x.x reboot" from one of my primary blade to reboot secondary blade. I am executing this command from a perl script using system function.

I see ssh client getting hanged until secondary blade comes up.
From Journal logs i see sshd client sessions not getting SIGTERM to exit on reboot in secondary blade. Interfaces are getting closed first and sshd service is getting stopped by systemd.

Centos details i am using:
uname -r => 3.10.0-862.14.4.el7.x86_64
cat /etc/redhat-release => CentOS Linux release 7.3.1611 (Core)

I could see similar issue which got fixed in Redhat and Debian. But not able to get details for centos.
https://bugzilla.redhat.com/show_bug.cgi?id=626477
https://bugs.debian.org/cgi-bin/bugrepo ... bug=751636
https://bugzilla.redhat.com/show_bug.cgi?id=1047614

Can some one through some light on this and help me in identifying the root cause. Any help you could provide would be much appreciated.

Thanks,
Karthik
 
Old 07-11-2020, 08:46 PM   #2
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 231

Rep: Reputation: Disabled
You've gotta add killall sshd somewhere but I don't use systemd that much so I'm not sure where that'd go.
On the other hand, why does that bother you so much? Do you reboot so many times everyday? You have two options of either running ssh with "timeout" prepended or simply press "shift + ~ + ."(3 keys), that'll terminate ssh.
 
Old 07-12-2020, 04:56 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,959
Blog Entries: 9

Rep: Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232
One really shouldn't allow root to log in directly.
Additionally, it might be better to use systemctl commands instead of systemd-sysvcompat commands. probably doesn't matter, but can't hurt to try.

Assuming sudo is configured, why don't you try
Code:
ssh user@x.x.x.x sudo systemctl reboot
(edit: on my system, that doesn't even require sudo)
 
Old 07-12-2020, 05:18 AM   #4
kartheek1610
LQ Newbie
 
Registered: Jul 2020
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi,

Thanks for the replies.
Actually this issue is coming for me only when i try to run this from a perl script but not when executed from console.Not sure what is really making the difference.

Yeah there can be different options to avoid this situation, but i am more interested in knowing if this is really fixed in centos 7.3 or not. I could see some fix in Redhat as i mentioned in my previous post.

Ofcourse if it is a known issue and not fixed, i can try work around as suggested, if not i can upgrade to centos OS version in which it is fixed.

Thanks,
Karthik
 
Old 07-12-2020, 06:27 AM   #5
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 231

Rep: Reputation: Disabled
If you're not being bound by any particular restrictions you should always upgrade redhat forks first as they're much more thoroughly tested than many other distros.
 
Old 07-16-2020, 02:59 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,959
Blog Entries: 9

Rep: Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232Reputation: 4232
Isn't CentOS 8 or 9 out already?
 
Old 07-16-2020, 03:44 AM   #7
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 1,140

Rep: Reputation: Disabled
@ondoho. Yes, CentOS 8 is out for almost a year now. Nevertheless, there may be sound reasons to stay with CentOS 7 for the time being. E.g. EPEL 8 is still a far cry from EPEL 7 in terms of available software.

@OP. But staying on CentOS 7.3 when 7.8 is available is not reasonable at all.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How do I copy files from CentOS 7.3.1611 (Core) to a Windows NFS Share SecGuy Linux - Newbie 6 05-24-2017 06:47 PM
LXer: CentOS 7.3 (1611) Linux Distro Officially Released for ARM64/AArch64 Machines LXer Syndicated Linux News 0 01-05-2017 12:43 AM
[SOLVED] Unable to install New CentOS 7.3-1611 codyngr Linux - Newbie 5 12-14-2016 05:03 AM
LXer: CentOS Linux 7 (1611) Released, It's Derived from Red Hat Enterprise Linux 7.3 LXer Syndicated Linux News 0 12-13-2016 12:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration