card285 Posted November 28, 2015 Share Posted November 28, 2015 Hi, I have a server module for WHMCS 6 that works great it connects to my server and disables vpn users that pay late etc. Only problem is that sometimes its not able to run commands because it failed to connect to a server via ssh, now when I press the suspend button manually it fails again but if I press it again a couple times it runs the command succesfully. Which leads me to believe the ssh connection is being blocked or something by the server perhaps a firewall issue or security setting causing the problem. Any idea what could be causing this, all my servers are running CentOS 6.7, again it connects eventually and works but sometimes takes 3-5 tries Any ideas/suggestions if anyone knows some commands I can run on my server to troubleshoot it or turn some security settings off that would be great thanks! 0 Quote Link to comment Share on other sites More sharing options...
el_makong Posted November 29, 2015 Share Posted November 29, 2015 try using do-while maybe? for example: $retries = 0; do{ //try to connect $retries += 1; }while((!$connection) && ($retries !=5)); 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.