Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output is not a valid XML document #6

Open
jorensanbar opened this issue Mar 4, 2024 · 2 comments
Open

output is not a valid XML document #6

jorensanbar opened this issue Mar 4, 2024 · 2 comments

Comments

@jorensanbar
Copy link

jorensanbar commented Mar 4, 2024

ERROR *** EXECUTABLE PLUGIN => Executable plugin <C:\Program Files\OCS Inventory Agent\plugins\lastpublic.ps1> output is not a valid XML document.

AGENT => Running OCS Inventory Agent Version 2.10.1.0
AGENT => Using OCS Inventory FrameWork Version 2.10.1.0

XML Document:

Invoke-RestMethod : { "status": 429, "error": { "title": "Rate limit exceeded", "message": "You've hit the daily limit for the unauthenticated API. Create an API access token by signing up to get 50k req/month." }}En C:\Program Files\OCS Inventory Agent\plugins\lastpublic.ps1: 5 Car cter: 11+ $myjson = Invoke-RestMethod -Uri https://www.ipinfo.io/json+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc eption + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

@gillesdubois
Copy link
Member

Hi,

We use https://www.ipinfo.io/json to get the public IP.
It seems there is a API call limit that you have reached for your IP.

How many agents are using this script ?

Regards,
Gilles DUBOIS.

@jorensanbar
Copy link
Author

Hello!

Only 1 agent, since it is the first configuration we made of OCS.

But we already detected what the error is.

If the WWW is included in the URI, then the IP output is made from Google servers, so this is the IP Limit Reached.
imagen

For the local ISP exit to be used, the URI does not have to contain the WWW:

imagen

With just that small change, there is no more crash and 429 error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants