Bug 592929 - RFE: better error message when HTTP transaction fails due to problems on server (HTTP errors 500, 502,503,504)
Summary: RFE: better error message when HTTP transaction fails due to problems on serv...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: xmlrpc-c
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Igor Gnatenko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 589511 (view as bug list)
Depends On:
Blocks: ABRTF17
TreeView+ depends on / blocked
 
Reported: 2010-05-17 12:02 UTC by k.t.
Modified: 2017-06-21 15:01 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-06-21 15:01:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
screenshot (597.46 KB, image/png)
2010-05-17 12:02 UTC, k.t.
no flags Details
what I see in terminal (24.82 KB, text/plain)
2010-05-17 13:23 UTC, k.t.
no flags Details
an example reading the status line (tested on HTTP only) (1.20 KB, text/plain)
2012-04-02 14:23 UTC, Kamil Dudka
no flags Details

Description k.t. 2010-05-17 12:02:09 UTC
Created attachment 414529 [details]
screenshot

Description of problem:
Automatic bug reporting tool offered to report a bug.
The bug description did get uploaded to red hat bugzilla, but ABRT thought it did not.

Version-Release number of selected component (if applicable):
Fedora 13 beta

How reproducible:
I do not know

Steps to Reproduce:
1. get crash?
2. report bug?
3. 
  
Actual results:
false error?

Expected results:
no false errors

Additional info:


Unable to finish current task!
org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.


Logging into bugzilla...
Checking for duplicates...
Creating new bug...
New bug id: 592927
Reporting via 'Bugzilla' was not successful: XML-RPC Fault(-504): HTTP response code is 502, not 200

Comment 1 Nikola Pajkovsky 2010-05-17 12:09:47 UTC
Thank you for report bug. Run please under root:

service abrtd stop
abrtd -dvvv

try to reproduce bug again and if you success send me whole output from abrtd -dvvv

Comment 2 k.t. 2010-05-17 12:38:26 UTC
I can't reply directly with gmail in bugzilla?

This is what I sent, I don't know where that reply went, but it appears to be not here:



>try to reproduce bug again


How would I do that? Make something crash?

Comment 3 Nikola Pajkovsky 2010-05-17 12:53:02 UTC
(In reply to comment #2)
> I can't reply directly with gmail in bugzilla?
> 
> This is what I sent, I don't know where that reply went, but it appears to be
> not here:
> 
> 
> 
> >try to reproduce bug again
> 
> 
> How would I do that? Make something crash?    

No, this bug in abrt shows up when you tried to report bug. So just do what I said in comment 1 and try to again report bug through abrt.

abrt -dvvv show a lot of debuging information.

Comment 4 k.t. 2010-05-17 13:23:24 UTC
Created attachment 414545 [details]
what I see in terminal

Is this what you want?

Or did you need to add the comment that it added to already existing bug report?

Comment 5 Nikola Pajkovsky 2010-05-17 14:18:54 UTC
Yes that's it. Unfortunately this will be tough to reproduce :-/. What I see right now is that you filled a bug correctly, but with unknown reason bugzilla server responses with bad code. 

Here is your bug
https://bugzilla.redhat.com/show_bug.cgi?id=592927

Comment 6 k.t. 2010-05-17 14:47:09 UTC
I could give it another try. Then this bug first appeared I did not know that you had to enter your email and password.

Comment 7 k.t. 2010-05-17 15:19:31 UTC
I ran it one more time, but I can't find the option to "forget" my account details. Any suggestions?

Comment 8 Nikola Pajkovsky 2010-05-17 16:09:30 UTC
Login and password are stored in gnome-keyring, so install *seahorse* and look into folder called password in seahorse and there you will see abrt:Bugzilla. Erase it and abrt should you ask for a new login and passwd.

Comment 9 k.t. 2010-05-17 16:48:18 UTC
I deleted the password and run everything one more time. I could not reproduce the crash without giving it my account details like I did the first time.

Comment 10 Denys Vlasenko 2010-05-20 18:03:05 UTC
*** Bug 589511 has been marked as a duplicate of this bug. ***

Comment 11 Denys Vlasenko 2010-05-20 18:11:30 UTC
Apparently "XML-RPC Fault(-504): HTTP response code is 502, not 200" thing happens here:

void throw_xml_fault(xmlrpc_env *env)
{
    std::string errmsg = ssprintf("XML-RPC Fault(%d): %s", env->fault_code, env->fault_string);
    xmlrpc_env_clean(env); // this is needed ONLY if fault_occurred
    xmlrpc_env_init(env); // just in case user catches ex and _continues_ to use env
    error_msg("%s", errmsg.c_str()); // show error in daemon log
    throw CABRTException(EXCEP_PLUGIN, errmsg.c_str());
}

One thing we can do here is to look at HTTP code and if it's 502 Bad Gateway, 503 Service Unavailable, or 504 Gateway Timeout, then instead of rude message like:

Reporting via 'Bugzilla' was not successful: XML-RPC Fault(-504): HTTP response
code is 502, not 200

we can say something like:

Reporting via 'Bugzilla' was not successful: server is down or overloaded (HTTP response code: 502)

which is much more clear.

Comment 12 Denys Vlasenko 2010-05-20 18:14:39 UTC
Adding to the last comment: apart from 502,503,504 codes, "500 Internal Server Error" also looks likely to indicate purely server-side problem.
"501 Not Implemented" and "505 HTTP Version Not Supported" indicate not a server problem, but a bug in server/client interaction, and should not be treated as "server down".

Comment 13 Mads Kiilerich 2010-05-20 23:19:50 UTC
This sounds like a fine solution.

I think it would be fine even if it just told clearly what was wrong:
Reporting via 'Bugzilla' was not successful: Server responded 502 Bad Gateway

Comment 14 Bug Zapper 2011-06-02 13:55:24 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 15 Bug Zapper 2011-06-27 16:25:54 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 16 Mads Kiilerich 2011-06-27 16:32:59 UTC
reopening - there is no indication this has been fixed

Comment 17 Fedora Admin XMLRPC Client 2011-12-19 17:43:18 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 18 Fedora Admin XMLRPC Client 2011-12-19 17:45:36 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 19 Jiri Moskovcak 2012-02-28 12:00:21 UTC
The part: "HTTP response code is 502, not 200" comes from xmlrpc-c, ABRT just shows whatever error msg it gets from it. It seems like this is the only error path where xmlrpc-c doesn't use the pre-formatted error messages, maybe it should be fixed to use the same approach even in this case?

from xmlrpc-c - /lib/curl_transport/curltransaction.c: 840

if (res != CURLE_OK)
            xmlrpc_env_set_fault_formatted(
                envP, XMLRPC_INTERNAL_ERROR,.
                "Curl performed the HTTP POST request, but was "
                "unable to say what the HTTP result code was.  "
                "curl_easy_getinfo(CURLINFO_HTTP_CODE) says: %s",.
                curlTransactionP->curlError);
        else {
            if (http_result != 200)
                xmlrpc_env_set_fault_formatted(
                    envP, XMLRPC_NETWORK_ERROR,
                    "HTTP response code is %ld, not 200",
                    http_result);
        }


-> reassigning to xmlrpc-c

Comment 20 Enrico Scholz 2012-03-26 11:04:21 UTC
any ideas how this information can be retrieved from curl? xmlrpc-c uses curl_easy_getinfo() to get status information but I do not see a CURLINFO_* option which returns the textual status message.

Comment 21 Kamil Dudka 2012-04-02 13:38:23 UTC
There is no such information stored in the curl easy handle.  You need to use CURLOPT_HEADERFUNCTION to catch the status line sent by server.  Alternatively, you can translate the integral status codes to human-readable messages.

Comment 22 Kamil Dudka 2012-04-02 14:23:23 UTC
Created attachment 574522 [details]
an example reading the status line (tested on HTTP only)

Comment 23 Kamil Dudka 2013-01-21 12:18:35 UTC
libcurl now puts the reason phrase from HTTP status line directly into the error buffer in most of the cases:

http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTERRORBUFFER

See bug 676596 for details.

Comment 24 Fedora Admin XMLRPC Client 2013-02-28 06:29:25 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 25 Fedora Admin XMLRPC Client 2016-06-13 09:43:15 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 26 Igor Gnatenko 2017-06-21 15:01:55 UTC
Please report this to upstream.


Note You need to log in before you can comment on or make changes to this bug.