Troubleshooting Bad Request and Internal Server error

Troubleshooting Bad Request and Internal Server error

Bad Request & Internal Server error

When the server of URL cannot understand the request it has received it responds with a Bad request or a malformed syntax error message. If there is an error in processing the request received by the server, it responds with an Internal Server error message. Common reasons for this are, incorrectly formatted POST data, incorrect URL format and unexpected User Agent. 

Incorrectly formatted POST data

If the URL is HTTP method "POST", then ensure that the POST data type configured is correct. You can verify this by cross checking any documentation of the URL or by making a request with POST data to the URL using cURL/Wget, if the response code is 400 or 500, then the POST data sent to the URL is of the wrong format

For Internal Server error, check the URL's server logs to see what exception is occurring while processing the request. At times, bugs in the server may lead to error while processing requests.

Incorrect URL format

URLs added in Applications Manager will be URL encoded when a request is made to them. Hence if you have added an already encoded URL for monitoring, then there will be double encoding while making the request. This can cause an issue in connecting to the URL successfully. Hence, you don't need to encode a URL while creating a monitor for it. 

For GET URLs, avoid giving request params in URL field i.e., if a URL is of the format http://www.example.com/sampleURI?key1=value1&key2=value2, then while creating the monitor, give URL as " http://www.example.com/sampleURI%22 and in the "Request Parameters (if any) " field, give the value "key1=value1&key2=value2"

Unexpected User Agent

Certain servers are designed to reject requests originating from sources other than browsers. In such cases, edit the User Agent of the URL monitor. You can get your User-Agent's value from https://www.whatismybrowser.com/detect/what-is-my-user-agent. After entering the value in the edit monitor screen, update the URL monitor and poll the monitor a couple of times and check. 

                  New to ADSelfService Plus?

                    • Related Articles

                    • Troubleshooting Server error responses

                      Server error responses Internal Server Error, Bad Gateway, Service Unavailable and Gateway Timeout are the most common server error messages. Seeing any one among these errors generally indicates an issue with the URL's server. Troubleshooting for ...
                    • Real User Monitor (RUM) - Troubleshooting

                      If the monitor has not polled data for a long time, follow the steps below for troubleshooting: Step 1: Check prerequisites to be done Real User Monitor requires the RUM Agent to be installed and mapped to the Applications Manager. Refer the help ...
                    • Troubleshooting URL Monitor

                      Here are few of the common errors you may come across in URL monitor, we have mentioned the steps you can follow to troubleshoot them. General troubleshooting for URL monitor Ensure that the URL is accessible from the server in which Applications ...
                    • Troubleshooting SSL Handshake Error

                      SSL Handshake Error SSL Handshake error occurs when a secure connection cannot be established to the URL added for monitoring. Common reasons for it are wrong SSL protocol version, incompatible ciphers, and invalid/missing client-side certificate.  ...
                    • Troubleshooting WinRM errors

                      This KB serves as a guide for troubleshooting errors when using the WinRM mode of data collection. First, ensure that all the following conditions are met: Refer to the below link and check if all the WinRM prerequisites have been completed properly ...