When changing the Central Management Server (CMS) name or other settings the following message appears in LanGuard console: Connecting to server ... failed with error: 'An error occurred while sending the request'. Possible reasons: wrong address, wrong port or a firewall is blocking the connection.
When you change the Central Management Server name or other settings you have to adjust CMS configuration in the LanGuard console. In the process, it is possible to get the above connection error due to incorrect configuration or environment changes.
Follow the steps below to solve the issue:
- Launch the Central Management Server GUI to ensure that it is running without errors. Write down the address and port (see screenshot below). The default CMS port is 1077.
- Launch the LanGuard console and go to Configurations > Central Management Server.
- In the Configuration tab, click Configure GFI LanGuard Central Management Server.
- Enter the correct server address and port from Step 1. Click Ok.
- If the error persists, test the connection from the LanGuard server to the address and port you've used on a previous step.
This can be done from the command prompt by running the telnet address port. If your version of Windows does not have telnet installed, launch the PowerShell console and type the following command (adjust the address and the port, if you are using non-default CMS port):
New-Object System.Net.Sockets.TcpClient("address", 1077)
On the screenshot below are three examples of the results. If you get the Connected: True property this means the connection to the server is successful. False, or an error means that the LanGuard server is not able to connect to a specified address and port. Errors are usually self-explanatory.
- If the test above returned an error:
- "No such host is known" - Windows cannot resolve the address you enter. Remedy this with the help of your systems administrator.
- Other errors - a firewall might be blocking the port. On the CMS machine open the Windows Firewall inbound rules and verify that inbound connections to the port 1077 are not blocked. If you have other firewalls in place check their settings too.
- Repeat the telnet or PowerShell test from Step 5. If you are still getting an error with it this might be a network connectivity problem, troubleshoot this with your network administrator.
- Once the telnet or PowerShell test succeeds, repeat Steps 2-4 to configure the CMS connection.
If the issue persists, you may want to uninstall the Central Management Server from the control panel and reinstall it since this will also recreate the IIS website.
Once the LanGuard console accepts the address and port without an error the issue is resolved. If the problem persists, contact the Support Team.