Bitcoin Forum
September 27, 2018, 10:37:59 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: bitcoind API sendrawtransaction error 500  (Read 945 times)
antonimasso
Member
**
Offline Offline

Activity: 73
Merit: 10


View Profile
August 24, 2013, 09:11:54 AM
 #1

Hello,

I'm getting an error 500 from my web server when I try to send a raw transaction through the RPC API.

PHP message: PHP Warning:  fopen(http://...@IP:8332/): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error
 in /usr/share/nginx/html/common/jsonRPCClient.php on line 132
PHP message: PHP Fatal error:  Uncaught exception 'Exception' with message 'Unable to connect to http://bitcoinrpc:PASSWORD@IP:8332/' in /usr/share/nginx/html/common/jsonRPCClient.php:140
Stack trace:
#0 /usr/share/nginx/html/tools/do_sendBTC.php(131): jsonRPCClient->__call('sendrawtransact...', Array)
#1 /usr/share/nginx/html/tools/do_sendBTC.php(131): jsonRPCClient->sendrawtransaction('010000000115d34...')
#2 {main}


This is the line that crashes: $result = $bitcoin->sendrawtransaction($tx_data);

Every other API call works, for example validateaddress.

Any idea why this fails? The same raw transaction works if sent through the bitcoind command line.

Thanks
1538087879
Hero Member
*
Offline Offline

Posts: 1538087879

View Profile Personal Message (Offline)

Ignore
1538087879
Reply with quote  #2

1538087879
Report to moderator
1538087879
Hero Member
*
Offline Offline

Posts: 1538087879

View Profile Personal Message (Offline)

Ignore
1538087879
Reply with quote  #2

1538087879
Report to moderator
1538087879
Hero Member
*
Offline Offline

Posts: 1538087879

View Profile Personal Message (Offline)

Ignore
1538087879
Reply with quote  #2

1538087879
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
antonimasso
Member
**
Offline Offline

Activity: 73
Merit: 10


View Profile
August 25, 2013, 03:45:32 PM
 #2

My raw TX had an \n at the end which returned the error 500.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!