Bitcoin Forum
May 08, 2024, 12:16:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin JSON RPC Connection gets reset by client...  (Read 1909 times)
Chick (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
July 04, 2011, 12:19:37 AM
Last edit: July 04, 2011, 02:22:51 AM by Chick
 #1

Occasionally, PHP returns an error similar to this: "ErrorException [ Warning ]: fgets(): SSL: Connection reset by peer" when sending api commands to the bitcoin server. What can I do to resolve this issue?

1715127399
Hero Member
*
Offline Offline

Posts: 1715127399

View Profile Personal Message (Offline)

Ignore
1715127399
Reply with quote  #2

1715127399
Report to moderator
1715127399
Hero Member
*
Offline Offline

Posts: 1715127399

View Profile Personal Message (Offline)

Ignore
1715127399
Reply with quote  #2

1715127399
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715127399
Hero Member
*
Offline Offline

Posts: 1715127399

View Profile Personal Message (Offline)

Ignore
1715127399
Reply with quote  #2

1715127399
Report to moderator
1715127399
Hero Member
*
Offline Offline

Posts: 1715127399

View Profile Personal Message (Offline)

Ignore
1715127399
Reply with quote  #2

1715127399
Report to moderator
1715127399
Hero Member
*
Offline Offline

Posts: 1715127399

View Profile Personal Message (Offline)

Ignore
1715127399
Reply with quote  #2

1715127399
Report to moderator
Chick (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
July 04, 2011, 04:03:35 AM
 #2

Bump.

JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
July 04, 2011, 04:30:01 AM
 #3

This is legal behavior, and if it confuses some other code, that code is broken. See section 8.1.4.4 of the HTTP 1.1 specification: "A client, server, or proxy MAY close the transport connection at any time. ... This means that clients, servers, and proxies MUST be able to recover from asynchronous close events."

That said, the bitcoin client hopelessly bungles persistent and concurrent connections. A fix for this is one of the fixes in my '3diff' patch set. http://davids.webmaster.com/~davids/bitcoin-3diff.txt

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
Chick (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
July 04, 2011, 05:29:19 AM
Last edit: July 05, 2011, 06:33:35 AM by Chick
 #4

This is legal behavior, and if it confuses some other code, that code is broken. See section 8.1.4.4 of the HTTP 1.1 specification: "A client, server, or proxy MAY close the transport connection at any time. ... This means that clients, servers, and proxies MUST be able to recover from asynchronous close events."

That said, the bitcoin client hopelessly bungles persistent and concurrent connections. A fix for this is one of the fixes in my '3diff' patch set. http://davids.webmaster.com/~davids/bitcoin-3diff.txt


Thanks for clearing that up! The code isn't broken, but it's just a warning. It shouldn't interfere with anything in production.

JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
July 04, 2011, 05:35:58 AM
 #5

Well, the code is broken, it mishandles persistent connections. But its breakage is manifesting in a way that is permitted by the standard. So if it affects other code, that code is broken too. Smiley

Thanks.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
Chick (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
July 04, 2011, 05:44:45 AM
 #6

Well, the code is broken, it mishandles persistent connections. But its breakage is manifesting in a way that is permitted by the standard. So if it affects other code, that code is broken too. Smiley

Thanks.


Well, in that case, PHP is broken. Tongue

I think I'll be adding in your patch and recompiling the code.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!