Learn How to Troubleshoot QuerySurge Base Rest API Issues
The QuerySurge Base Rest API is a lightweight execution API, which allows users to drive QuerySurge execution from an external source such as Windows Powershell or HTTP tool like PostMan. However, depending on your system configuration and your environment, there are issues that you may encounter. This troubleshooting guide helps you work through common problems that you might encounter when you set up the API.
Note: The QuerySurge Base Rest API is part of the core QuerySurge release and requires no additional licensing. The QuerySurge DevOps Rest API is licensed separately. To arrange for licensing, contact info@querysurge.com or your QuerySurge Business Development representative.
Issue 1: After Upgrade to version 8.0+, Scripts Fail to Execute
If you have recently upgraded to QuerySurge 8.0+, your API scripts will fail with the following error:
Issue 2: "The remote name could not be resolved" or "Unable to connect to the remote server"
These type of errors can be triggered by a number of configuration issues or circumstances.
1. Incorrect host name or port
A common configuration mistake is the incorrect use of a host name or port. This typically happens after the migration of a QuerySurge instance and the host name and ports have not been changed within the scripts running Base API commands.
2. Ports are closed / blocked
Typically, QuerySurge instances are setup behind internal and/or external software firewalls. If any firewalls are blocking the QuerySurge App server, a "Unable to connect to the remote server" error message is returned. Assuming that your QuerySurge instance is available, check with your network administrator about whether there are any firewalls that may be interrupting connectivity between your QuerySurge API and the QuerySurge App server.
3. QuerySurge is Down
More often than not, the "Connection Refused" error message will be due to an inaccessible QuerySurge instance. The API cannot interface with QuerySurge without a running application server. Check with your QuerySurge administrator to ensure that QuerySurge is operational, connected to the network, etc.
Issue 3: Windows Powershell Scripts fail to execute
If you are scripting your API calls in Windows Powershell, note that the default Powershell execution policy is Restricted. This means that Powershell cannot execute unless specific conditions are met. See this article for general information as well as options for Powershell execution. Note that your organization may have policies governing script execution.