Project

General

Profile

Actions

Bug #8634

closed

When API fails, Apache is overriding the error message with a generic one

Added by Nicolas CHARLES almost 8 years ago. Updated about 7 years ago.

Status:
Rejected
Priority:
3
Category:
Web - Maintenance
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

Consider the following API call:

 curl -s -k -H "X-API-Token: MY-TOKEN" "https://localhost/rudder/api/latest/changeRequests" 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Server Error</title>
</head><body>
<h1>Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
 webmaster@localhost and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.2.22 (Debian) Server at localhost Port 443</address>
</body></html>

The error 500 answer doesn't tell me WHY it failed (in this case, changerequests are disabled). But it should not fail like that, and there are cases where it fails AND changerequests are enabled.
Logs are not helping:

/var/log/rudder/apache2/access.log
192.168.90.35 - - [06/Jul/2016:11:21:30 +0200] "GET /rudder/api/latest/changeRequests HTTP/1.1" 500 2144 "-" "curl/7.43.0" 

and no other log are returning anything :(


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #10295: Log an error when Rest API fails ReleasedFrançois ARMANDActions
Actions #1

Updated by François ARMAND almost 8 years ago

  • Subject changed from When API fails, there are no logs explaining WHY it fails :( to When API fails, Apache is overriding the error message with a generic one
  • Assignee changed from Vincent MEMBRÉ to Alexis Mousset
  • Priority changed from 1 to 3
Actions #2

Updated by François ARMAND almost 8 years ago

The URLs that should not be overriden are:

/rudder/api/*
Actions #3

Updated by Alexis Mousset over 7 years ago

  • Status changed from New to In progress
Actions #4

Updated by Alexis Mousset over 7 years ago

The ProxyErrorOverride configuration is done at global or virtualhost level, so we need a separate virtual host for API to fix this.

Actions #5

Updated by Alexis Mousset over 7 years ago

  • Status changed from In progress to Discussion
Actions #7

Updated by Benoît PECCATTE over 7 years ago

In apache 2.4, ProxyErrorOverride has a directory context and this can be done without a new vhost.

And it is also possible with a double proxy, a vhost that redirects to an override vhost or a nooverride vhost depending on the URL.

Actions #8

Updated by Jonathan CLARKE over 7 years ago

  • Translation missing: en.field_tag_list set to Quick and important, Ease of use
Actions #9

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 2.11.23 to 2.11.24
Actions #10

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 2.11.24 to 308
Actions #11

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 308 to 3.1.14
Actions #12

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.14 to 3.1.15
Actions #13

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.15 to 3.1.16
Actions #14

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.16 to 3.1.17
Actions #15

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.17 to 3.1.18
Actions #16

Updated by Alexis Mousset about 7 years ago

This has been fixed for apache 2.4 in #7134, but the same method cannot be used on apache 2.2.

Actions #17

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.18 to 3.1.19
Actions #18

Updated by François ARMAND about 7 years ago

  • Related to Bug #10295: Log an error when Rest API fails added
Actions #19

Updated by Benoît PECCATTE about 7 years ago

  • Status changed from Discussion to Rejected

This has been fixed for apache 2.4 in #7134, but it cannot be fixed for apache 2.2.

Actions

Also available in: Atom PDF