The WebSocket handshake failed (error) at cPanel Terminal

If you encounter an error message saying "Error: The WebSocket handshake failed" while attempting to use the Terminal feature in cPanel, it is possible that this issue arises when accessing cPanel through a proxy sub-domain, such as https://cpanel.yourdomain.com.

To resolve this problem, we recommend trying the following alternative links to access the cPanel Terminal:

  1. https://$ipaddress:2083
  2. https://$domain.tld/cpanel
  3. https://cpanel.$domain.tld

If none of these links work, consider disconnecting from any proxies or VPNs you may be using and attempt accessing cPanel with different web browsers.

Furthermore, if the server has Imunify360 installed, access the Imunify360 console from the root directory. Navigate to "Settings" and deselect the option for "cPanel account protection," as illustrated in the accompanying screenshot.

In addition to the previously mentioned solutions, there is another potential reason for this issue. If you are running CloudLinux, it's possible that the /bin/cagefs_enter.proxied file no longer has the setuid bit set. To verify this, you can use the following command:

[root@server97 ~]# stat /bin/cagefs_enter.proxied
File: /bin/cagefs_enter.proxied
Size: 16856 Blocks: 40 IO Block: 4096 regular file
Device: 10303h/66307d Inode: 32382934 Links: 1
Access: (0755/-rwsr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2023-07-09 19:16:29.260835027 +0600
Modify: 2023-02-27 19:58:50.000000000 +0600
Change: 2023-07-08 12:36:32.411856717 +0600
Birth: 2023-06-06 18:41:08.513066271 +0600
[root@server97 ~]#

The permissions should be 4755. CloudLinux is aware of this issue and is tracking it under the reference CAG-1082. The solution is to run the following command:

chmod u+s /bin/cagefs_enter.proxied

By executing this command, the setuid bit will be set, resolving the issue and allowing the Terminal to function properly again.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix IP Missing issue on cPanel/WHM

We are here to help you with solving the problem of Missing IP Server in list accounts. The...

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

How to Start/Stop or Restart Apache server

Apache is the HTTP server that is freely available over the internet. It is a kind of software or...

How to install Attracta SEO Tools plugin

RequirementscPanel/WHM needs to be installed on your server. Step 1: SSH into your server and go...

How to Install CpCleaner in cPanel through SSH?

Installation Run the following shell commands as root via SSH: wget -O cpc-1.0.3.tar...