When upgrading to Exadata software 19c (release 18.104.22.168.0 and above) the compute nodes (database servers) upgrade to Oracle Linux 7. As part of this upgrade the sshd ServerAliveInterval settings are changed to a value of 600 for STIG (Security Technical Implementation Guide) purposes as detailed in the My Oracle Support Note below:
Changed sshd setting “Clientaliveinterval” after updating Exadata Database Nodes (domU, dom0 and physical) (Doc ID 2501968.1)
“When updating Exadata Database nodes (dom0, domu and physical) running either Oracle Linux 6 or Oracle Linux 7, “sshd Clientaliveinterval” settings are changed to a value of 600 for STIG purposes via unpublished bug 28204681.
This will result in your ssh connection being closed after being idle for 600 seconds while before this would not happen before 86400 seconds passed. While for the same security reasons, it’s not recommended to undo this change, it will be the choice of the operator and he/she is free to do so.”
This means your connections to the Exadata Machines disconnect after 10 minutes of inactivity 😦 :
[AnwarZ@v1proxy1 ~]$ date;ssh oracle@v1ex1dbadm01;date Thu May 21 15:27:31 IST 2020 oracle@v1ex1dbadm01's password: Last login: Thu May 21 15:27:31 IST 2020 from x.x.x.x on pts/0 Last login: Thu May 21 15:27:40 2020 from x.x.x.x [oracle@v1ex1dbadm01 ~]$ Connection to x.x.x.x closed by remote host. Connection to x.x.x.x closed. [AnwarZ@v1proxy1 ~]$date Thu May 21 15:37:40 IST 2020 [AnwarZ@v1proxy1 ~]$
As per the MOS note, the recommendation is to not change ClientAliveInterval on the compute nodes but to use the flags options ServerAliveInterval and ServerAliveCountMax on the ssh connection as shown below:
[AnwarZ@v1proxy1 ~]$ date;ssh -o ServerAliveInterval=550 -o ServerAliveCountMax=157 oracle@v1ex1dbadm01;date Thu May 21 15:41:29 IST 2020 oracle@v1ex1dbadm01's password: Last login: Thu May 21 15:27:40 IST 2020 from x.x.x.x on pts/0 Last login: Thu May 21 15:41:37 2020 from x.x.x.x [oracle@v1ex1dbadm01 ~]$ date Thu May 21 15:55:10 IST 2020 [oracle@v1ex1dbadm01 ~]$
This session didn’t disconnect and a manual ‘date‘ show it’s greater then 10 minutes 🙂
This is because the ServerAliveInterval=550 ensure that a null packet is sent every 550 seconds from the client side, this ensures the server will not disconnect the session as this is less then the ClientAliveInterval=600 on the compute nodes. The ServerAliveCountMax is multiplied with the ServerAliveInterval value to determine the maximum amount of time the session can be idle before disconnecting the session back in line with the previous standard of 86400.
Alternatively if you are using program like putty you can set in the settings to the same affect:
It also appears from the MOS note, that this can affect OL6 on higher Exadata releases when the STIG recommendations were implemented. In which case same workaround can be used.
If you found this blog post useful, please like as well as follow me through my various Social Media avenues available on the sidebar and/or subscribe to this oracle blog via WordPress/e-mail.
Zed DBA (Zahid Anwar)
2 thoughts on “Exadata OL7 session disconnects after 10 minutes”
Pingback: Server-Side SSH Timeout Settings with host_access_control – Andy Colvin's Oracle Blog
Thanks for the mention Andy. Great blog post.