I have this error : 32300 - transport error

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

I have this error : 32300 - transport error

Postby Julien » Tue Apr 13, 2010 7:45 am

Hi,

I use TestLink 1.8.5.

When I try to launch clientReportTCResult.php I have this error:

"something went wrong - -32300 - transport error - HTTP status code was not 200"

I see this error in the file class-IXR.php line 522 but I don't understand how resolve this problem.

Can you help me?

Thanks.
Julien
TestLink user
 
Posts: 14
Joined: Tue Apr 13, 2010 7:38 am

Postby austvik » Tue Apr 13, 2010 6:21 pm

Hi, it looks like IXR-Client has bad error reporting (hides information) :(

Code: Select all
        while (!feof($fp)) {
            $line = fgets($fp, 4096);
            if (!$gotFirstLine) {
                // Check line for '200'
                if (strstr($line, '200') === false) {
                    $this->error = new IXR_Error(-32300, 'transport error - HTTP status code was not 200');
                    return false;
                }
                $gotFirstLine = true;
            }


It would be so much better if the error message from the server could be included in the error message to the user of the client. I have looked at the IXR home pages, but have not found a way to report bugs/feature requests, if you find one - please do.

There are at least four ways to debug your problem, though:
1. Change the error reporting line to also include the $line variable, e.g. to something like this:
Code: Select all
$this->error = new IXR_Error(-32300, 'transport error - HTTP status code was not 200, line: ' . $line);

2. Use tpcdump or similar to see what is going over the network. On OS-X I use
Code: Select all
sudo tcpdump -i lo0 -A "port http"
when I debug problems like this.
3. Take a look in the server logs, maybe they include the real reason for the problem.
4. Use another XML-RPC library than IXR. I use Java, and get the full error message when I have server side errors.

Hope this helps :)

-J
austvik
Advanced user
 
Posts: 24
Joined: Thu Mar 25, 2010 7:25 am

Postby Julien » Wed Apr 14, 2010 2:54 pm

Thanks for your help.

I have resolved the problem but I don't know really how.

I think it's a link "problem" with this ligne:
$server_url=$prefix . $dummy[0] . "xmlrpc.php";

If I launch clientReportTCResult.php in an other repertory that "\lib\api\sample_clients\php" I have this error:
"something went wrong - -32300 - transport error - HTTP status code was not 200, line: HTTP/1.1 404 Not Found "
(I have change the ligne like this $server_url=$prefix . $dummy[0] . "\lib\api\xmlrpc.php"; but no change)

Now it's ok for me I can save the results in testlink.
Julien
TestLink user
 
Posts: 14
Joined: Tue Apr 13, 2010 7:38 am

Postby austvik » Wed Apr 14, 2010 5:05 pm

Hi, thanks for the tip!

-J
austvik
Advanced user
 
Posts: 24
Joined: Thu Mar 25, 2010 7:25 am


Return to XML-RPC API



Who is online

Users browsing this forum: No registered users and 2 guests