Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 while reading daemon's response #11

Open
davidebaldini opened this issue Jan 26, 2016 · 3 comments
Open

Error 500 while reading daemon's response #11

davidebaldini opened this issue Jan 26, 2016 · 3 comments

Comments

@davidebaldini
Copy link

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.

@Someguy123
Copy link
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.

@Someguy123
Copy link
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?

@davidebaldini
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants