check_fritz icon indicating copy to clipboard operation
check_fritz copied to clipboard

UNKNOWN - Unexpected response status code: 500

Open liquidbase opened this issue 3 years ago • 7 comments

Since the update of Fritz! OS to version 7.25, the error mentioned in the title appears under Icinga2 or the command line. Settings in the monitoring or the Fritzbox were not made. The data of the version of the check command used are:

  • Version 1.2.2
  • Architecture: Linux AMD64
  • Fritz!OS 7.25
  • No settings changed

Output debug informations:

---
Frist SOAP Response:
---
<?xml version="1.0"?>
 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:dslforum-org:control-1-0">
<errorCode>401</errorCode>
<errorDescription>invalid action</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
---
UNKNOWN - Unexpected response status code: 500

liquidbase avatar Mar 01 '21 07:03 liquidbase

Hi,

thanks for letting me know. Unfortunately I can't reproduce the issue since my Fritz!Box won't update to Fritz!OS 7.25 (yet), I think the update for my model will be released later.

I'll try to figure out what is happening here, the debug information indicates that some action is not found or got invalid with the update. The API documentation doesn't indicate that there was a change to API actions.

  • https://avm.de/service/schnittstellen/

I found one detail in the update documentation:

Änderung Wenn für die Anmeldung an der Bedienoberfläche "nur mit dem FRITZ!Box-Kennwort" eingestellt war, wird ein FRITZ!Box-Benutzer mit dem Namen "fritz" und einer zufälligen vierstelligen Zahl sowie dem FRITZ!Box-Kennwort automatisch angelegt. Zur Anmeldung an der Bedienoberfläche im Heimnetz reicht dennoch weiterhin die Angabe des FRITZ!Box-Kennworts aus. *2

[2] Automatische Generierung eines Benutzers nach dem Namensschema fritz und einer zufälligen vierselligen Zahl, wenn die Anmeldung vor dem Update nur mit FRITZ!Box-Kennwort erfolgte. Wichtige Informationen für App-Entwickler, deren App sich an FRITZ!Box anmelden möchte, finden sich unter https://avm.de/schnittstellen/

  • https://avm.de/service/downloads/update-news/

Did you use the authentication with "password only"? Please check if there is a new user on your Fritz!Box with the name fritz followed by 4 digits, if so please use this user and your password to run the check plugin. You can set the user with the parameter --user (or short -u). Please let me know if this is the culprit here, than we can prepare a PR to enhance the documentation.

Please provide the following details:

  • Which check method did you use
  • Which Fritz!Box are you using
  • Which connection type are you on (V/DSL, cable, fiber, etc.)

Thanks!

Best regards Michael

mcktr avatar Mar 01 '21 19:03 mcktr

Thanks for your feedback. And yes, currently I only use one password for the checks, since the Fritzbox is in the internal network. But I will test here whether it works again with the user / password and then report back accordingly.

@edit The combination of user and password works. AVM presupposes then probably from v7.25 the combination in the internal network.

liquidbase avatar Mar 02 '21 07:03 liquidbase

Thanks for testing! :+1: I'll add a note to the documentation.

Best regards Michael

mcktr avatar Mar 04 '21 20:03 mcktr

Hi,

i've got the same problem after upgrade to FRITZ!OS version 7.25. In the WebUI at System -> FRITZ!Box-Users i recognized a automatic newly created user. If i use this user with the parameter --username it doesn't work, with the short version -u it works.

# '/usr/lib/nagios/plugins/check_fritz' '--method' 'connection_uptime' '--password' 'MySecretPa$$w0rD' '--timeout' '7' '--username' 'fritz1234'
UNKNOWN - Unexpected response status code: 500
# '/usr/lib/nagios/plugins/check_fritz' '--method' 'connection_uptime' '--password' 'MySecretPa$$w0rD' '--timeout' '7' '-u' 'fritz1234'
OK - Connection Uptime: 60906 seconds (0d 16h 55m 6s) | 'uptime'=60906.000000s;;;;

Best regards Marcel

Marci24h avatar Mar 15 '21 19:03 Marci24h

Hi,

@Marci24h I've tried --username, and also -u (specifying no method, and also connection_uptime method). Every combination just gives a positive feedback. Still running v1.2.2 here.

Thanks for all the comments here ❤️. After updating my Fritzbox the checks stopped working. After updating my Fritzbox, it sent me a mail with the automatically created user. Setting this user name in vars.fritz_username, everything is working like before.

Kind regards, Bernd

wopfel avatar Jun 14 '21 18:06 wopfel

Hi,

many thanks for your tests. i've retried the test (same commands from history), currently it works. Meanwhile i've done some OS upgrades. (Maybe there was a problem with a library)

same plugin version:

# /usr/lib/nagios/plugins/check_fritz -V
check_fritz version v1.2.2

Best regards, Marcel

Marci24h avatar Jun 14 '21 19:06 Marci24h

Hi Marcel,

check_fritz does not work for me. Get UNKNOWN - Unexpected response status code: 500 error. I have checked out check_tr64_fritz with similar result. However my Munin sensor works! My monitoring boxes (munin and icinga) are fresh at highest ubuntu version. Any help appreciated! Cheers, Bernd

pulurili avatar Mar 25 '22 11:03 pulurili