I am having issues returning any data from the Information Service via Powershell or REST API, from any machine other than the actual Solarwinds server itself.
On the solarwinds server, this works:
Import-Module SwisPowerShell
$creds = Get-Credential '(DOMAIN)\(Username)'
$swis = Connect-Swis -Credential $creds -Hostname (solarwinds Hostname)
Get-SwisData $swis 'SELECT NodeID, Caption FROM Orion.Nodes'
Using a local Orion account (non ActiveDirectory user account) on the solarwinds server, also works:
Import-Module SwisPowerShell
$swis = Connect-Swis -UserName (local orion username) -Password (password) -Hostname (solarwinds Hostname)
Get-SwisData $swis 'SELECT NodeID, Caption FROM Orion.Nodes'
on any remote host I get this:
Import-Module SwisPowerShell
$creds = Get-Credential '(DOMAIN)\(Username)'
$swis = Connect-Swis -Credential $creds -Hostname (Orion Hostname)
Get-SwisData $swis 'SELECT NodeID, Caption FROM Orion.Nodes'
Get-SwisData : The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was
'00:00:59.9934985'.
At line:2 char:1
+ Get-SwisData $swis 'SELECT NodeID, Caption FROM Orion.Nodes'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-SwisData], CommunicationException
+ FullyQualifiedErrorId : System.ServiceModel.CommunicationException,SwisPowerShell.GetSwisData
I can see Ports 17777 and 17778 are bound to the Network card and listening
C:\> netstat -an
Active Connections
Proto Local Address Foreign Address State
TCP 0.0.0.0:17777 0.0.0.0:0 LISTENING
TCP 0.0.0.0:17778 0.0.0.0:0 LISTENING
I can see a TCP reset happening at the Solarwinds server itself immediately when I run Get-SwisData ....
So I know it's not a firewall between the remote hosts and the Solarwinds server.
I've tried using Postman to send a call to the REST service as per this:
https://loop1.com/swblog/using-the-rest-api-to-get-the-most-out-of-solarwinds-part-1/
I get back:
Could not get any responseThere was an error connecting to https://(solarwinds server hostname):17778/SolarWinds/InformationService/v3/Json?query=SELECT%20Caption,%20IPAddress%20FROM%20Orion.Nodes%20WHERE%20Vendor%20=%20'Cisco;.
It acts like the SolarWinds server isn't listening for anything other than connections to Localhost, but netstat confirms that's not the case.