Author

Topic: Intermittent access issue with RPC client (Read 750 times)

full member
Activity: 173
Merit: 105
March 15, 2017, 02:42:35 AM
#6
If you're running any network threat protection services from anti-malware or anti-virus packages, it might be blocking the traffic. It could also be something in the code that leaves the port session open without properly closing the session, so you can't start a new rpc session. Try using wireshark on one of your endpoints and see if the channel is being closed correctly. If you're not already doing so, whitelist your src/dest ip addresses in your firewall(s).

I just realized the issue: I completely forgot I was running TOR browser. I don't have time to play with TOR browser settings right now, so just closing it out resolves the issue.  Grin
legendary
Activity: 1512
Merit: 1054
SpacePirate.io
If you're running any network threat protection services from anti-malware or anti-virus packages, it might be blocking the traffic. It could also be something in the code that leaves the port session open without properly closing the session, so you can't start a new rpc session. Try using wireshark on one of your endpoints and see if the channel is being closed correctly. If you're not already doing so, whitelist your src/dest ip addresses in your firewall(s).
full member
Activity: 173
Merit: 105
Did you try to increase the rpc threads, i.e. something like:

Code:
rpcthreads=30

in your .conf file ?

HTH

I'm going to try it, thanks! Restarted the server, so now I have to wait for it to verify the last 288 blocks...
legendary
Activity: 1604
Merit: 1564
精神分析的爸
Did you try to increase the rpc threads, i.e. something like:

Code:
rpcthreads=30

in your .conf file ?

HTH
full member
Activity: 173
Merit: 105
Also, "success" looks like this I think:

Code:
2017-03-14 06:45:06 connect() to [2002:6dc4:bb6e::6dc4:bb6e]:8333 failed: No route to host (65)
2017-03-14 06:47:08 keypool added key 544, size=101
2017-03-14 06:47:08 keypool reserve 444
2017-03-14 06:47:08 keypool keep 444
2017-03-14 06:47:09 keypool added key 545, size=101
2017-03-14 06:47:09 keypool reserve 445
2017-03-14 06:47:10 keypool keep 445
full member
Activity: 173
Merit: 105
I wrote up a script that uses this repo: https://github.com/laanwj/bitcoin-python

I know it's an older repo but I like it. Anyway, it works great most of the time. But sometimes my script just can't connect to my bitcoind -server for some inexplicable reason. Does anyone have a guess as to what that reason might be? I just upgraded to the latest version of core but the seemingly random issue persists.

Code:
class BitcoinConnection(object):
    """
    A BitcoinConnection object defines a connection to a bitcoin server.
    It is a thin wrapper around a JSON-RPC API connection.

    Arguments to constructor:

    - *user* -- Authenticate as user.
    - *password* -- Authentication password.
    - *host* -- Bitcoin JSON-RPC host.
    - *port* -- Bitcoin JSON-RPC port.
    """
    def __init__(self, user, password, host='localhost', port=8332,
                 use_https=False):
        """
        Create a new bitcoin server connection.
        """
        url = 'http{s}://{user}:{password}@{host}:{port}/'.format(
            s='s' if use_https else '',
            user=user, password=password, host=host, port=port)
        self.url = url
        self.proxy = AuthServiceProxy(url, exception_wrapper=wrap_exception)

And I am using this method:

Code:
    def getrawchangeaddress(self, account=None):
        """
        Returns a new bitcoin raw change address for properly handling change.

        """
        return self.proxy.getrawchangeaddress()

Bitcoind shows this in the log:
Code:
2017-03-14 08:33:36 connect() to 71.239.98.166:8333 failed after select(): Connection refused (61)

 Huh
Jump to: