Bitcoin Forum

Bitcoin => Pools => Topic started by: surfer43 on January 23, 2014, 03:31:52 PM



Title: stratum - exceptions.TypeError: %d format: a number is required, not str
Post by: surfer43 on January 23, 2014, 03:31:52 PM
I get an exception after starting
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
    result = g.send(result)
  File "/root/stratum-mining/mining/__init__.py", line 33, in setup
    bitcoin_rpc = BitcoinRPCManager()
  File "/root/stratum-mining/lib/bitcoin_rpc_manager.py", line 27, in __init__
    settings.COINDAEMON_TRUSTED_PASSWORD)
  File "/root/stratum-mining/lib/bitcoin_rpc.py", line 18, in __init__
    self.bitcoin_url = 'http://%s:%d' % (host, port)
exceptions.TypeError: %d format: a number is required, not str


and then this repeats while stratum is running:

2014-01-23 11:42:26,673 DEBUG DB_Mysql # Connecting to DB
2014-01-23 11:42:26,674 DEBUG DBInterface # DBInterface.do_import called. force: no, queue size: 0
2014-01-23 11:42:41,678 DEBUG DBInterface # run_import_thread current size: 0
2014-01-23 11:42:41,679 DEBUG DBInterface # DB_Mysql_Vardiff INIT


Log opened.
twistd 11.1.0 ( 2.7.3) starting up.
reactor class: twisted.internet.epollreactor.EPollReactor.
ERROR mining # Failed Connect(HTTP 500 or Invalid JSON), Check Username and Password!

Is this because of
COINDAEMON_TRUSTED_USER = '...'
or
COINDAEMON_TRUSTED_PASSWORD = '...'
in conf/config.py
?
And what should I put for those values?


Title: Re: Help setting up stratum
Post by: HellDiverUK on January 23, 2014, 04:37:02 PM
Err...the username you set up in the coin demon.  The names of the variables kinda give it away.


Title: Re: Help setting up stratum
Post by: surfer43 on January 23, 2014, 04:47:56 PM
Err...the username you set up in the coin demon.  The names of the variables kinda give it away.
I already figured that out  :-[

anyway

now I get

File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
    result = g.send(result)
  File "/root/stratum-mining/mining/__init__.py", line 33, in setup
    bitcoin_rpc = BitcoinRPCManager()
  File "/root/stratum-mining/lib/bitcoin_rpc_manager.py", line 27, in __init__
    settings.COINDAEMON_TRUSTED_PASSWORD)
  File "/root/stratum-mining/lib/bitcoin_rpc.py", line 18, in __init__
    self.bitcoin_url = 'http://%s:%d' % (host, port)
exceptions.TypeError: %d format: a number is required, not str

and then this repeats while stratum is running:

2014-01-23 11:42:26,673 DEBUG DB_Mysql # Connecting to DB
2014-01-23 11:42:26,674 DEBUG DBInterface # DBInterface.do_import called. force: no, queue size: 0
2014-01-23 11:42:41,678 DEBUG DBInterface # run_import_thread current size: 0
2014-01-23 11:42:41,679 DEBUG DBInterface # DB_Mysql_Vardiff INIT