WHMCS技巧:Connection Timed Out

2024年1月21日 | 分类: 【技术】

【问题】

当配置 WHMCS 的 CoCCA 模块时,报错:Connection Timed Out

实际方案:不设置证书

【参考】

参考:https://www.hostpoco.com/blog/whmcs-connection-timed-out-issues/

How to Fix WHMCS Connection Timed Out Issues!

By pocoadmin / August 4, 2021

Most of the Webmasters, Support admins, and web hosts who use WHMCS would have seen this issue: WHMCS Connection Timed Out Issues. It is a very common issue and is usually caused by firewall restrictions or after enabling Cloudflare for your website. Generally, there are multiple reasons behind such errors which we found earlier of fixing them.
WHMCS Connection Timed Out Issues

Today, we will discuss the possible causes and fixes for the WHMCS Connection Timed Out Issues.
When such WHMCS connection timed out issues occur?

Connection time-out error itself gives the idea that a connection request sent to a particular server was not processed within the timeout limit set by the particular device. It generally happens while accessing websites from the browser or performing a script etc.

WHMCS regular users would have seen such issues or errors. Different processes can trigger this issue in WHMCS. This varies from creating an account to adding servers.
Firewall restrictions and DNS issues can be possible reasons

RegisterDomain/EPP: Error connecting to tls://epp.xxx.xxx:700 – Connection timed out

The above commands can give an idea about the server ports which are able to listen to inbound and outbound connections. We can add the config file by editing it, in case they are not opened.

We recently received multiple support requests where the client was unable to access the domain registrar panel. It gave the error –

Firewall restriction is the common reason for the connection time-out issues. The first step in the troubleshooting part is to ensure that the port through which connection attempts occur is open and able to make the connection. Our case was for whm based client, our techs have instantly cross-checked that the CSF configuration file to confirm if port 700 is able to listen to the connection.

root#grep TCP_IN /etc/csf/csf.conf

root#grep TCP_OUT /etc/csf/csf.conf

root#nano /etc/csf/csf.conf

Make sure to add the port number to the list of open ports. Restart CSF firewall after adding and saving changes under config file.

root#csf -r (restart firewall)

If you are having Iptables, then Add the commands below will help to fix the error:

root#iptables -L //to list the rules

root#iptables -A INPUT -p tcp –dport xxxx -j ACCEPT //to open port xxx

root#service iptables save

Also, initiate a test connection to a server under whmcs or make a telnet connection to ensure that the IP address of the server is not blocked in the receiver end.

Delay In DNS propagation triggers WHMCS connection timed out issues

We received connection time-out issues in different cases while adding a server to WHMCS. The error observed was :

Curl error: [7] Failed to connect to xxxxxx.com port xxx: Connection timed out.

This scenario is a little different from regular firewall blocks. Here, xxxxxx.com was the hostname of the server. The A record entry of the hostname was still under propagation as it was added recently. Hence, there was an issue with the identification of IP address by WHMCS and found a connection. You can allow sufficient time for the propagation to get finish or can reduce the TTL value of the record.
Connection Time Out Issues After Enabling Cloudflare

This has been a regular issue noticed after enabling Cloudflare for the particular website. Missing a particular WHMCS associated subdomain or domain can cause such errors. Also, SSL redirection can play a role in it.

Further, Cloudflare allows 100 seconds with a basic plan for sessions. You will find regular time-out issues after enabling Cloudflare. You can either finish tasks within this limit or can upgrade Cloudflare to a higher plan.

Apart from this, sometimes WHMCS Store Bug or outdated WHMCS version can cause such errors.
Conclusion

Firewall restrictions or recent activities related to the domain can cause such WHMCS connection timed out issues. Cloudflare can also trigger such scenarios. We discussed different possibilities for time-out-related issues and how our techs fix them.