cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

403 with rest api call

I;ve seen a few other people with this issue, and some where resolved, but nowhere is a solution to be found.

The code:

$VLANNAAM = "Somevlan"

$cred = get-credential

$invoked = Invoke-RestMethod -Uri ("https://"+$Hostname+":17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT GroupId,VLAN_Naam FROM IPAM.GroupNodeAttr WHERE (VLAN_Naam='$VLANNAAM')") -method Get -credential $cred

For the credentials I've used a windows account, local account, database user.

Nothing works, Always the 403 error.

2015-08-27 07_33_58-Pool 06 - ICT Services Windows 8 Werkplek.png

0 Kudos
34 Replies
Level 8

We *just* had that problem:  403 no matter what we CURLed  from the server.

We bounced the winbox hosting it, to fix another issue, and it just came up.

In our case, it was the standard Windows solution, but if you haven't tried it, just bounce the thing overnight and test it again. 

Intermittent problems fixed by a bounce?  Yeah, sucks to be us.  Check if you're one of us.






0 Kudos
Level 8

Nevermind.  It's back to 403. 

I'm advised not to open a ticket, but has anyone else got a fresh idea on this thing?

0 Kudos
Level 8

We are back to this problem again, and now event the reboots isnt fixing it.

And the support isnt helping on this.

any resolution for this yet?

0 Kudos
Level 19

bishopolis​, mnchetz​ - there are many possible causes of 403 responses. Please start new, separate threads in this forum to work through this.

0 Kudos

Has this been resolved -- this Just started doing this in our environment (CASE#1360037)

I'll try it with WCF debugging turned on if you need more output, but in our environment there are a lot of users...

Richard

0 Kudos

Were you able to find a resolution for this?

0 Kudos
Level 19

Richard, there are multiple possible causes for this problem. Let's work on diagnosing it and then find the most appropriate resolution for your environment.

If you have an additional web server that you can take out of service briefly, that would help reduce the noise in the WCF trace.

0 Kudos

OK, it'll be a day or two as we've heavy weather and a lot of stuff happening all the time right now.

0 Kudos
Level 7

Hello All,

I am also started getting the same forbidden 403 issue as described above. Could someone please help us. When I spoke to SW support team they said I can get help here. Need help urgently to fix this issue.

Thanks

ZM

0 Kudos
Level 19

Please follow the same steps I just posted for rjordan to generate a WCF trace log and send it to me.

0 Kudos
Level 8

I am seeing the exact same issue in my environment. the 403: forbidden error appears to be sporadic and occurs only when I try to connect to Main poller, making rest calls to additional webserver works fine. Have anyone found a resolution for this issue?

0 Kudos
Level 19

Could you provide some more details about what exactly you are seeing? Please include product version, screenshots, type of credentials used, etc.

0 Kudos
Level 9

I'm not sure if anyone has provided the requested details, but I'm having the same issue, so here goes:

Orion Platform: 2017.1

NCM: 7.6

NPM: 12.1

I initially started testing the API via the query_test.py sample found in orionsdk-python github. After entering my server and credentials, I get the following error: 403 Client Error: Forbidden for url: https://<IPAddress>:17778/SolarWinds/InformationService/v3/Json/Query. I tested using the IP address as well as the DNS name of my Orion server. I also tested authentication using the Orion admin credentials as well as my AD credentials. I get the same 403 error even with a bad password. I get the same error if I try hitting that URL in IE, FF, and Chrome.orion-403-error.PNG

0 Kudos
Level 19

The next place to look would be in the SWISv3 log file on the Orion server: C:\ProgramData\SolarWinds\InformationService\v3.0\Orion.InformationService.log. Reproduce the error again and check that log for any details.

0 Kudos
Level 9

Reproducing the 403 error does not log anything to that file. The only notable thing I found in that log file was an error that occurred earlier today when the API was actually working. My custom script had a bad type and it logged an exception running the query. I am stumped as to why the sample query script provided in the Python SDK works for a period of time then throws 403 errors for several hours. Once it starts to throw 403 errors nothing seems to help. I tried restarting SW services and restarting the server to no avail. When I check the next day, the same sample query script works fine.

0 Kudos
Level 19

The next step to investigate this will be to use WCF tracing. This logging method is extremely verbose, so to avoid generating an unmanagable log file it is best to stop all Orion services, start "SolarWinds Information Service V3" only, reproduce the problem (generate the 403 error), and then immediately stop SWISv3.

The steps:

1. Make a backup copy of "C:\Program Files (x86)\SolarWinds\Orion\Information Service\3.0\SolarWinds.InformationService.Service.exe.config" and then edit it. Add these lines at the end of the file, right before the closing </configuration> line:

    <system.diagnostics> 

        <sources> 

            <source name="System.ServiceModel"  

                    switchValue="Information, ActivityTracing" 

                    propagateActivity="true"> 

                <listeners> 

                    <add name="xml" /> 

                </listeners> 

            </source> 

            <source name="System.IdentityModel"> 

                <listeners> 

                    <add name="xml" /> 

                </listeners> 

            </source> 

        </sources> 

        <sharedListeners> 

            <add name="xml" 

                 type="System.Diagnostics.XmlWriterTraceListener" 

                 initializeData="c:\log\SWISv3.svclog" /> 

        </sharedListeners> 

    </system.diagnostics> 

2. Create the "c:\log" directory.

3. Stop all Orion services.

4. Start only SolarWinds Information Service V3.

5. Reproduce the problem.

6. Stop SolarWinds Information Service V3.

7. Undo the edit to SolarWinds.InformationService.Service.exe.config.

8. Start all Orion services again.

9. Zip up c:\log\SWISv3.svclog and email it to me: tim.danner@solarwinds.com.

0 Kudos
Level 9

Hey Tim,

I just sent you an email with the details. Please note that my first API call returned a 'Max retries exceeded' error which I always see immediately after restarting services. The second API call returned the 403 error.

0 Kudos
Level 19

Got it. Let's continue by email.

0 Kudos
Level 11

can you try using IP address instead of the hostname?

or, can you try FQDN instead of the hostname?

0 Kudos
Level 7

We are experiencing the exact issue was this ever resolved?  I do not see a resolution for this API connection issue?

0 Kudos