greiginsydney / New-OoklaSpeedTest.ps1

GNU General Public License v3.0
8 stars 2 forks source link

XML PE233/PE231 Error #7

Closed timracer closed 2 years ago

timracer commented 2 years ago

Hi! I got XML: The returned XML does not match the expected schema. (code: PE233) — JSON: The returned JSON does not match the expected structure (No mapping for the Unicode character exists in the target multi-byte code page). (code: PE231)"" error. All group policies are been edited. What could be wrong?

greiginsydney commented 2 years ago

Hi Tim,

I've not seen that error before.

Can you dig a little further into PRTG's sensor logs and see if there's a file there with some more useful debugging info?

Check out the folder C:\ProgramData\Paessler\PRTG Network Monitor\Logs\sensors & sort by date modified.

 

- Greig.

timracer commented 2 years ago

Sorry, that i didn't mention before but there's no Logs folder. I've enabled Write result to disk in case of error but no any Logs folder, then I tried using "-debug" parameter but still no “New-OoklaSpeedTest-yyyyMMM.log” file in the same folder

timracer commented 2 years ago

In C:\ProgramData\Paessler\PRTG Network Monitor\Logs\sensors just MomoCore.log MomoCore.log

timracer commented 2 years ago

this file is obsolete

timracer commented 2 years ago

Should I use any Windows credentials in the sensor settings?

timracer commented 2 years ago

I'm using prtg 22.3 on windows server 2012

greiginsydney commented 2 years ago

OK, apparently there's a switch we need to throw first. Under Devices and the Sensor, in the Sensor's Settings, change "Result Handling" to "Store Result":

image

THAT will hopefully create a log file with a useful error message.

(I referenced that in the more detailed blog post, although it looks like the wording of the Sensor options has changed slightly since that was written. Have you seen that or are you just going on the ReadMe here on GitHub?)


In the meantime, what happens if you run the script from a PowerShell Window first? Whatever output that spits should better help us understand what's going wrong.

.\New-OoklaSpeedTest.ps1

Add the -AcceptGdpr switch if that's relevant to you.

timracer commented 2 years ago

Here is some log by prtg Result of Sensor 4286.Data.txt

timracer commented 2 years ago

Here's one more file Result of Sensor 4286.log

greiginsydney commented 2 years ago

Ahhh. Bingo.

You don't have a clean version of the script. You have what looks like an HTML scrape of it.

greiginsydney commented 2 years ago

Check this out: https://github.com/greiginsydney/New-OoklaSpeedTest.ps1/issues/4#issuecomment-745606893

Your other option is to use the "raw" button, which WILL give you a clean version to scrape.

image

- G.

timracer commented 2 years ago

I've created a new sensor with proper script file and now it returns just "error" Result of Sensor 4288.txt Result of Sensor 4288.log

timracer commented 2 years ago

Logfile New-OoklaSpeedTest-2022сен.log

greiginsydney commented 2 years ago

"Cannot read from socket" suggests a network problem. There's no response from Speedtest?

Navigate to "C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\" and run SpeedTest.exe

timracer commented 2 years ago

I don't know what happen, image

Thank you for helping. If I wanna use server id 6386 where should I define this? In the sensor setting "Parameter" input like -ServerID=6386?

greiginsydney commented 2 years ago

The correct syntax for that is -ServerId nnnn.

timracer commented 2 years ago

Thank you!