Skip to content

Error 500 while reading daemon's response #11

Description

@davidebaldini

From jsonRPCClient.php, line 132:

                if ($fp = fopen($this->url, 'r', false, $context)) {                                                                           
                        $response = '';                                                                                                        
                        while($row = fgets($fp)) {                                                                                             
                                $response.= trim($row)."\n";                                                                                   
                        }                                                                                                                      
                        $this->debug && $this->debug.='***** Server response *****'."\n".$response.'***** End of server response *****'."\n";  
                        $response = json_decode($response,true);                                                                               
                } else {                                                                                                                       
                        throw new Exception('Unable to connect to '.$this->url);                                                               
                } 

the exception is thrown by simply invoking $ php5 index.php from the console.
The output I get is;

$ php5  index.php
PHP Warning:  fopen(http://...@localhost:8332): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error
 in /var/www/pluscoin/jsonRPCClient.php on line 132
<!DOCTYPE html>
<html lang='en'>
<head>
        <meta charset='utf-8'>
... /* etcetera */

The credentials are set and the daemon is running. Fore reference, with curl I get:

$ curl http://...@localhost:8332
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

The getbalance lines from index.php are modified as suggested here.

Activity

  1. Someguy123 commented on Jan 27, 2016

    @Someguy123
    Owner

    I'll investigate this problem later when I have bitcoindset up to test. I'm not sure what has changed recently in Bitcoin to break this, as the JSONRPC should still be the same.

  2. Someguy123 commented on Jan 27, 2016

    @Someguy123
    Owner

    Update: Today I discovered Bitcoin has reached 60GB. That makes it expensive to spin up a server. Do you know if this affects other coins (ones with a less ridiculous sized blockchain?) such as Litecoin, Dogecoin or Namecoin?

  3. davidebaldini commented on Jan 28, 2016

    @davidebaldini
    Author

    After minimal debugging I found that this error 500 is simply due to header.php calling $nmc->walletlock() with an unencrypted wallet. AFAIK this is not supported by bitcoind and causes the error response. Apart from this, no actual disruption seems to occur at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions