Connect to backend failed: connect to lsphp failed: 110

On a CloudLinux Server, websites stopped working with the error message “Service Unavailable”. On checking error_log in /usr/local/apache/logs, found following error message

[Fri Jul 09 15:32:37.884950 2021] [lsapi:error] [pid 1639593:tid 47853204383488] [client 207.46.13.54:46915] mod_lsapi: [host ronnie.serverok.in] [req GET / HTTP/1.1] Connect to backend failed: connect to lsphp failed: 110

The problem was due to the server got booted using the default CentOS kernel instead of CloudLinux Kernel.

[root@server ~]# uname -a
Linux server.serverok.in 3.10.0-1062.9.1.el7.x86_64 #1 SMP Thu May 27 10:10:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@server ~]#

If you were using Cloudlinux kernel, “uname -a” command will show kernel with “lve” in the name. Example 3.10.0-962.3.2.lve1.5.56.el7.x86_64

To see the list of kernels available, run

awk -F\' '$1=="menuentry " {print i++ " =  "$2}' /etc/grub2.cfg

Example

[root@server ~]#  awk -F\' '$1=="menuentry " {print i++ " =  "$2}' /etc/grub2.cfg
0 =  CloudLinux (3.10.0-962.3.2.lve1.5.56.el7.x86_64) 7.9 (Boris Yegorov)
1 =  CloudLinux (3.10.0-1062.9.1.el7.x86_64) 7.9 (Boris Yegorov)
2 =  CloudLinux (3.10.0-962.3.2.lve1.5.27.el7.x86_64) 7.9 (Boris Yegorov)
3 =  CloudLinux (0-rescue-21361cf887984f57a840ce7ea6a3f75c) 7.9 (Boris Yegorov)
[root@server ~]#

To set default kernel, run

grub2-set-default 0

This will set kernel entry to the first entry.

Verify default kernel with

grub2-editenv list

Example

[root@server ~]# grub2-editenv list
saved_entry=0
[root@server ~]#

Reboot the server with

reboot

Once rebooted, verify the server is booted with CloudLinux kernel.

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *