vindimy / altcointip

Reddit ALTcointip bot gives users ability to tip each other using various cryptocurrency coins, such as Bitcoins, Litecoins, Peercoins, Namecoins, and others.
http://www.reddit.com/r/ALTcointip/wiki/index
GNU General Public License v2.0
106 stars 143 forks source link

Bug when trying to run on custom coind #32

Closed francismitchell closed 10 years ago

francismitchell commented 10 years ago

I am trying to run the altcointipbot on 'Gabencoin'. However, whenever I run it I come across this error:

DEBUG:bitcoin:Starting "walletpassphrase" JSON-RPC request
ERROR:bitcoin:500 (Internal Server Error) response from bitcoind
ERROR:cointipbot:CtbCoin::getnewaddr(gabencointipbot): BitcoindException: 500 (Internal Server Error) response from bitcoind
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "cointipbot.py", line 533, in __init__
    self.self_checks()
  File "cointipbot.py", line 138, in self_checks
    b.register()
  File "ctb/ctb_user.py", line 230, in register
    new_addrs[c] = self.ctb.coins[c].getnewaddr(_user=self.name.lower())
  File "ctb/ctb_coin.py", line 171, in getnewaddr
    self.conn.walletpassphrase(self.conf.walletpassphrase, 1)
  File "pifkoin/bitcoind.py", line 69, in __call__
    return server._rpc_call(self.method, *args)
  File "pifkoin/bitcoind.py", line 216, in _rpc_call
    raise BitcoindException('%d (%s) response from bitcoind' % (response.status, response.reason))
pifkoin.bitcoind.BitcoindException: 500 (Internal Server Error) response from bitcoind
You have new mail in /var/mail/gabenpool
gabenpool@capyspool:~/altcointip/src$

I think it may be pifkoin trying to load up the default configuration for a bitcoind, however I am running gabencoind with different rpc settings. Is there a way to fix this?

dvinograd commented 10 years ago

Hey there, sounds like you don't have the correct wallet passphrase configured in conf/coins.yml. The bot reads and uses that configuration file to communicate with the coin daemon.

francismitchell commented 10 years ago

There definitely is an entry under 'walletpassphrase'. Also, when the bot is starting, it spews out some information about successfully connecting to Gabencoin.

dvinograd commented 10 years ago

Could you post the contents of your conf/coins.yml, without any sensitive information (such as passwords) - replace it with "***", for example?

francismitchell commented 10 years ago

Here is a screenshot of my coins.yml untitled-1

vindimy commented 10 years ago

Your config looks correct. I still suspect there might be an issue with the password. So, try enclosing wallet password in single or double quotes, changing wallet password, etc.

By the way, the error below doesn't mean the bot is talking to Bitcoin daemon (pifkoin library calls every daemon "bitcoind"). You can verify this by shutting down Bitcoind on your system (if you have one running) and then running the bot.

ERROR:cointipbot:CtbCoin::getnewaddr(gabencointipbot): BitcoindException: 500 (Internal Server Error) response from bitcoind

On Wed, Apr 23, 2014 at 12:02 PM, CapyKing notifications@github.com wrote:

[image: untitled-1]https://cloud.githubusercontent.com/assets/2670037/2781946/c39fa82a-cb19-11e3-9f1e-fe3a185f7784.png

— Reply to this email directly or view it on GitHubhttps://github.com/vindimy/altcointip/issues/32#issuecomment-41201116 .

Best regards, Dmitriy V.

francismitchell commented 10 years ago

None of these methods work. Removing the quotation marks gives me the same error, and when I change the password I still get the same error. I have completely re installed, deleted the database, but still, no joy.

dvinograd commented 10 years ago

Hmm, I'm all out of ideas. Because it works for everyone else, there must be something different about your setup, but I can't guess what it could be. What does cat ~/.gabencoin/gabencoin.conf return?

francismitchell commented 10 years ago

As expected, it returns the contents of my coind:

rpcuser=myrpcuser
rpcpassword=myrpcpassword
server=1
rpcport=56883
daemon=1

Of course, rpcuser and rpcpassword are different values. One other thing - I am connected to my wallet via stratum and MPOS as I am running a pool on the same server as the coin daemon. Could this be a problem? EDIT: I don't think this is the problem - I still get the same error when stratum is not running.

vindimy commented 10 years ago

So, the bot must be reading some other configuration and talking to the wrong coin daemon. In your coins.yml, do you have more than one section that starts with gbn: (the line before enabled: true)? I can think of that causing the bot to read wrong config.

francismitchell commented 10 years ago

I am pretty sure it is reading the configuration, because when I start the program it outputs data about successfully connecting to the coind.

vindimy commented 10 years ago

Closing as "can't figure out the issue".