Last Comment Bug 600810 - XML-RPC fails with SOAP::Lite 0.711 and 0.712
: XML-RPC fails with SOAP::Lite 0.711 and 0.712
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: WebService (show other bugs)
: unspecified
: x86 Linux
: -- major (vote)
: Bugzilla 4.0
Assigned To: Teemu Mannermaa (:wicked)
: default-qa
Mentors:
: 569385 (view as bug list)
Depends on: 490417
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-30 02:30 PDT by marek.hobler
Modified: 2014-03-17 10:59 PDT (History)
10 users (show)
mkanat: approval4.2+
mkanat: blocking4.2+
mkanat: approval4.0+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Use different XMLRPC base class in mod_perl vs. mod_cgi, V1 (644 bytes, patch)
2011-07-04 08:34 PDT, Teemu Mannermaa (:wicked)
mkanat: review+
Details | Diff | Review

Description marek.hobler 2010-09-30 02:30:20 PDT
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0b5) Gecko/20100907 Iceweasel/4.0b5
Build Identifier: * This is Bugzilla 3.6.2 on perl 5.8.8 * Running on Linux 2.6.9-42.0.2.ELsmp #1 SMP Wed Aug 23 00:17:26 CDT 2006

After bugzilla upgrade we  have issues with bugzilla RPC
remote method calls. We use it in GRUCHA tool, but it also doesn't work with contrib/bz_webservice_demo.pl


Reproducible: Always

Steps to Reproduce:
1. run ./bz_webservice_demo.pl

Actual Results:  
neutrinus@marvin:~/tmp/bugzilla-3.6.2/contrib$ ./bz_webservice_demo.pl --uri http://10.10.10.110/xmlrpc.cgi 
Client Application failed during request deserialization: 
no element found at line 1, column 0, byte -1 at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/Parser.pm line 187
 in SOAP call near ./bz_webservice_demo.pl line 189.
neutrinus@marvin:~/tmp/bugzilla-3.6.2/contrib$ ./bz_webservice_demo.pl --uri http://10.10.10.129/xmlrpc.cgi 
Connecting to a Bugzilla of version 3.2.5.
Bugzilla's timezone is +0200.
neutrinus@marvin:~/tmp/bugzilla-3.6.2/contrib$ 


(10.10.10.129 its old bugzilla instance v3.2.5; 10.10.10.110 is new,upgraded instance v3.6.2)


./checksetup.pl --check-modules
* This is Bugzilla 3.6.2 on perl 5.8.8
* Running on Linux 2.6.9-42.0.2.ELsmp #1 SMP Wed Aug 23 00:17:26 CDT 2006

Checking perl modules...
Checking for              CGI.pm (v3.21)   ok: found v3.49 
Checking for          Digest-SHA (any)     ok: found v5.48 
Checking for            TimeDate (v2.21)   ok: found v2.22 
Checking for            DateTime (v0.28)   ok: found v0.61 
Checking for   DateTime-TimeZone (v0.71)   ok: found v1.21 
Checking for                 DBI (v1.41)   ok: found v1.604 
Checking for    Template-Toolkit (v2.22)   ok: found v2.22 
Checking for          Email-Send (v2.00)   ok: found v2.192 
Checking for          Email-MIME (v1.861)  ok: found v1.861 
Checking for Email-MIME-Encodings (v1.313)  ok: found v1.313 
Checking for Email-MIME-Modifier (v1.442)  ok: found v1.442 
Checking for                 URI (any)     ok: found v1.30 

Checking available perl DBD modules...
Checking for              DBD-Pg (v1.45)    not found 
Checking for           DBD-mysql (v4.00)   ok: found v4.010                                                                   
Checking for          DBD-Oracle (v1.19)    not found 
                                                                                                                              
The following Perl modules are optional:
Checking for                  GD (v1.20)   ok: found v2.44 
Checking for               Chart (v2.1)    ok: found v2.4.1 
Checking for         Template-GD (any)     ok: found v1.56 
Checking for          GDTextUtil (any)     ok: found v0.86 
Checking for             GDGraph (any)     ok: found v1.44 
Checking for            XML-Twig (any)     ok: found v3.13 
Checking for          MIME-tools (v5.406)  ok: found v5.428 
Checking for         libwww-perl (any)     ok: found v5.810 
Checking for         PatchReader (v0.9.4)  ok: found v0.9.5 
Checking for           perl-ldap (any)     ok: found v0.36 
Checking for         Authen-SASL (any)     ok: found v2.15 
Checking for          RadiusPerl (any)     ok: found v0.17 
Checking for           SOAP-Lite (v0.710.06) ok: found v0.712 
Checking for            JSON-RPC (any)     ok: found v0.96 
Checking for          Test-Taint (any)     ok: found v1.04 
Checking for         HTML-Parser (v3.40)   ok: found v3.56 
Checking for       HTML-Scrubber (any)     ok: found v0.08 
Checking for Email-MIME-Attachment-Stripper (any)     ok: found v1.314 
Checking for         Email-Reply (any)     ok: found v1.202 
Checking for         TheSchwartz (any)     ok: found v1.10 
Checking for      Daemon-Generic (any)     ok: found v0.71 
Checking for            mod_perl (v1.999022) ok: found v2.000004 



data stream sniffed using wireshark:
POST /xmlrpc.cgi HTTP/1.1

TE: deflate,gzip;q=0.3

Connection: TE, close

Accept: text/xml

Accept: multipart/*

Accept: application/soap

Host: bugzilla.axit.pl

User-Agent: SOAP::Lite/Perl/0.712

Content-Length: 114

Content-Type: text/xml



<?xml version="1.0"
encoding="UTF-8"?><methodCall><methodName>Bugzilla.version</methodName><params
/></methodCall>HTTP/1.1 200 OK

Date: Thu, 30 Sep 2010 08:51:24 GMT

Server: Apache/2.0.52 (CentOS)

SOAPServer: SOAP::Lite/Perl/0.712

Content-Length: 449

Vary: Accept-Encoding,User-Agent

Connection: close

Content-Type: text/xml



<?xml version="1.0"
encoding="UTF-8"?><methodResponse><fault><value><struct><member><name>faultString</name><value><string>Application
failed during request deserialization: 
no element found at line 1, column 0, byte -1 at
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/Parser.pm line 187
</string></value></member><member><name>faultCode</name><value><string>Client</string></value></member></struct></value></fault></methodResponse>



there are no errors in apache error.log
Comment 1 Max Kanat-Alexander 2010-09-30 02:55:39 PDT
I'm pretty sure this is a bug in SOAP::Lite?
Comment 2 marek.hobler 2010-09-30 03:24:08 PDT
(In reply to comment #1)
> I'm pretty sure this is a bug in SOAP::Lite?
do you mean:
https://rt.cpan.org/Public/Bug/Display.html?id=45611

?
Comment 3 marek.hobler 2010-09-30 03:26:44 PDT
or better:
https://rt.cpan.org/Public/Bug/Display.html?id=58538
?
Comment 4 marek.hobler 2010-10-08 01:42:26 PDT
can somebody confirm which bug in SOAP::Lite is responsible for this issue? Its quite important for us to solve this..
Comment 5 Max Kanat-Alexander 2010-10-08 05:26:58 PDT
Yes, it's https://rt.cpan.org/Public/Bug/Display.html?id=58538
Comment 6 Teemu Mannermaa (:wicked) 2011-02-27 21:58:29 PST
I can see this happening on our Bugzilla Tinderbox server. Downgrading back to SOAP::Lite 0.711 seems to have fixed the problem for mod_cgi. But for mod_perl I had to also change Bugzilla::WebService::Server::XMLRPC to subclass XMLRPC::Transport::HTTP::Apache (mod_perl specific) instead of the ::CGI that's only usable for mod_cgi.
Comment 7 Max Kanat-Alexander 2011-03-03 08:44:39 PST
*** Bug 569385 has been marked as a duplicate of this bug. ***
Comment 8 Max Kanat-Alexander 2011-06-06 16:07:01 PDT
We should do something about this one way or another. Originally the solution was going to be RPC::Any, but I suppose that's not making 4.2.
Comment 9 Clahrc 2011-06-20 04:45:57 PDT
Is there any progress on this issue ?

I have a similar problem reported as:
"
Application failed during request deserialization: no element found at line 1, column 0, byte -1 at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/XML/Parser.pm line 153
"

when a Java client attempts to login trough 'xmlrpc.cgi'. It happened with bugzilla 3.6.4 and now with 4.0.1.
I've already tried downgrading SOAP::Lite to 0.711 and 0.710.

Are there any other workarounds I might try - the issue is a show stopper for the rest of my app delelopment.

thanks
Clahrc.
Comment 10 Max Kanat-Alexander 2011-06-20 15:39:32 PDT
When you downgrade you must make sure there isn't a later version in Bugzilla's lib/ directory. Also, if you are running under mod_perl, you must restart your web server.
Comment 11 Clahrc 2011-06-21 03:23:50 PDT
No there wasn't any later versions in the bugzilla lib and yes I was restarting the web server.
I was capturing the HTTP traffic between the client and the server and I could see the SOAP::Lite version number in the HTTP headers - it changed every time I downgraded.

However, your comment made me look into the various perl mods I have on the machine.
I noticed that while the SOAP::Lite module used changed, the error was always coming from the same place:
"
. . .at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/XML/Parser.pm line 153
"

The Bugzilla 'checksetup.pl' output didn't mention XML::Parser module. So the one that ended up being used was an old installation, ver. 2.23, I had on the machine. Upgrading XML::Parser to 2.41 (after upgrading the expat and expat-devel RPMs) seems to have fixed the problem as I now can run the app with SOAP::Lite 0.712.

Thanks again.
Comment 12 Teemu Mannermaa (:wicked) 2011-07-04 08:34:14 PDT
Created attachment 543783 [details] [diff] [review]
Use different XMLRPC base class in mod_perl vs. mod_cgi, V1

Here's the patch to use correct base class from XMLRPC when running under mod_perl. This seems to fix the problem and still work under mod_cgi.
Comment 13 Max Kanat-Alexander 2011-07-19 14:35:08 PDT
Comment on attachment 543783 [details] [diff] [review]
Use different XMLRPC base class in mod_perl vs. mod_cgi, V1

Looks good and fixes the problem! :-)
Comment 14 Teemu Mannermaa (:wicked) 2011-07-20 09:49:42 PDT
Committing to: bzr+ssh://wicked%40sci.fi@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/WebService/Server/XMLRPC.pm
Committed revision 7862.

Committing to: bzr+ssh://wicked%40sci.fi@bzr.mozilla.org/bugzilla/4.0/
modified Bugzilla/WebService/Server/XMLRPC.pm
Committed revision 7618.

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