Documentation forServer & Application Monitor

Troubleshoot API pollers in SAM

This topic describes issues you may encounter when using the API Poller feature. For more troubleshooting tips, check the Success Center and the SolarWinds online IT community, THWACK.

Here are some general tips to resolve API poller issues:

To check logs, search for ApiPoller or polled URLs in files stored in the following Orion server locations:

  • ProgramData\SolarWinds\Logs\Cortex
  • ProgramData\SolarWinds\Logs\Cortex\Plugins\SolarWinds.CortexPlugin.Orion.ApiPoller.log
  • ProgramData\SolarWinds\Logs\Orion\ApolloWebApi.log
  • ProgramData\SolarWinds\Logs\Orion\OrionWeb.Log
  • ProgramData\SolarWinds\Logs\SolarWinds.Credentials\SolarWinds.Credentials\SolarWinds.Credentials.log
  • ProgramData\SolarWinds.Orion.ApiPoller\SolarWinds.Orion.ApiPoller.Service\ SolarWinds.Orion.ApiPoller.Service.log

Issue: Save errors when creating an API poller

Review the following logs located at ProgramData\SolarWinds\Logs\Orion\ where polling occurs — either on the Main Polling Engine (usually, the Orion server) or an Additional Polling Engine.

  • ApolloWebApi.log
  • OrionWeb.Log

Issue: API Poller send request returns errors

When you add an API poller, the Send request is routed to a Website or Additional Website. Make sure the endpoint is accessible from the URL.

Open Developer Tools in a web browser and examine the results of the send connection on the Network tab. If errors occur in a header, try removing the header. If a remote API is unstable, you may be able to drill down into the response data to display exception messages.

If you see the following message in an API poller response, check the SSL certificate verification setting: "The remote certificate is invalid according to the validation procedure."

Issue: An API poller stopped after the node was moved to a different polling engine.

API pollers are not updated when you change a node's polling engine. Edit the API poller and save it again.

Issue: API poller responses are returned but metrics are not updated in the Orion Web Console.

Verify that responses use valid JSON code. The API Poller feature does not currently support XML.

Issue: An API poller cannot maintain the API connection.

Run the following PowerShell script on the server that hosts the polling engine:

$uri = "Request-URL"
$method = "Get | Post"
$headers = - the same as User defined @{ 'userId' = 'UserIDValue' 'token' = 'TokenValue' }

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.

If firewall rules block remote connections, API pollers cannot connect.

If a request uses basic authentication, adjust the script as follows:

  1. Create a string like username:password
  2. Use a site like Base64 encode to encode the string. (© 2019, available at, link obtained on September 16, 2019)
  3. Define $headers as @{ 'Authorization' = ' Basic ENCODEDString' }
  4. Execute the command. Here is an example:

    Invoke-RestMethod -Uri $uri -Method Post -Headers $headers

  5. Confirm that the return message is in JSON format.

If this method returns an error, check the client network configuration.

Issue: An API poller times out repeatedly.

By default, API poller requests timeout in 60 seconds. You can change that value in Advanced Configuration settings.

  1. Log into the Orion server as an administrator.
  2. Use the Orion Service Manager to stop services.
  3. To access Advanced Configuration Settings, copy the following text: /Admin/AdvancedConfiguration/Global.aspx.
  4. Paste text into your browser address bar, after /Orion, as shown in this example, and press Enter.

    <your production server>/Orion/Admin/AdvancedConfiguration/Global.aspx

  5. On the Global tab, scroll to RequestTimeout, adjust the default value (60), and then click Save.
  6. Restart services.

Issue: API polling occurs too frequently

Polling occurs every two minutes, by default. You can change that interval on the Advanced Configuration Settings page in the Orion Web Console, accessible by following the steps above.

Note that the Advanced Configuration Settings page includes two tabs: Global and Server-specific:

  • <your production server>/Orion/Admin/AdvancedConfiguration/Global.aspx
  • <your production server>/Orion/Admin/AdvancedConfiguration/ServerSpecific.aspx

Issue: API response is "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."

This response appears if the default SSL certificate verification option was disabled for an API poller.

Issue: When assigning an API poller template to a node, the following message appears: API poller cannot be created. Could not load template.

Check your internet connection.

Issue: Pollers based on Microsoft 365 and Azure API Poller templates don't work. InvalidAuthenticationToken error codes appear and this message: Access token validation failure. Invalid audience.

Navigate to the API poller and click Configure to check API Settings.

To determine requirements for API pollers, see the SAM API Poller Template Guide.

Issue: "Internal server error" messages appear.

In Task Manager, determine if the Solarwinds.Orion.ApiPoller.Service.exe process is running.

If that process is not running, restart the SolarWinds Orion Module Engine service:

  1. Create a separate backup of the following folder: C:\Windows\Temp\.net\SolarWinds.Credentials.Orion.WebApi

  2. Use the Orion Service Manager to stop the SolarWinds Orion Module Engine service.

  3. Remove data from the C:\Windows\Temp\.net\SolarWinds.Credentials.Orion.WebApi folder.

  4. Start the SolarWinds Orion Module Engine service.

Issue: The API Poller page appears blank after upgrading SAM in a Windows Server 2012 R2 environment.

In Windows Server 2012 R2 environments running SAM 2020.2.4 or earlier, ports for the API Poller feature (49157) and credentials (49156) may conflict with ports used by other Orion Platform modules. The API Poller page doesn't load data and errors similar to the following examples occur in API poller log files:

[Warning] Unable to bind to "https://localhost:49157" on the "IPv4 loopback" interface: '"An attempt was made to access a socket in a way forbidden by its access permissions."'
[Fatal] Unable to start Kestrel.

If this occurs, upgrade to SAM 2020.2.5 or later. Alternatively, update ports in related files, as described next.

  • Change the API poller ports from 49157 to 38010 in the following files:
    • Update the SolarWindsApiPollerWebApiUrl property in $(Orion.WebDirectory)\SolarWinds\api2\bin\SolarWinds.Orion.ApiPoller.WebApi.dll.config
    • Update the SolarWindsApiPollerWebApiUrl property in $(Orion.InstallDirectory)\SolarWinds.Orion.ApiPoller\SolarWinds.Orion.ApiPoller.BusinessLayer.dll.config
    • Update the Url property in $(Orion.InstallDirectory)\SolarWinds.Orion.ApiPoller\SolarWinds.Orion.ApiPoller.Service\appsettings.json
  • Change the SolarWinds.Credentials port from 49156 to 38008 in the following files:

    • Update the Url property in$(Orion.InstallDirectory)\SolarWinds.Credentials\SolarWinds.Credentials\appsettings.json
    • Update the SolarWindsCredentialsWebApiUrl property in $(Orion.WebDirectory)\api2\bin\SolarWinds.Orion.Credentials.WebApi.dll.config -
    • Update the SolarWindsCredentialsEndpoint property in$(Orion.InstallDirectory)\Orion\SolarWinds.Orion.ApiPoller\SolarWinds.Orion.ApiPoller.Service\appsettings.json