Search code examples
pythonproxybitcoin

stratum-mining-proxy error - Can't decode message


I'm attempting to run stratum-mining-proxy with minerd. Proxy starts and runs with the following command:

python ./mining_proxy.py -o ltc-stratum.kattare.com -p 3333 -pa scrypt

Proxy starts fine. Run Minerd (U/P removed):

minerd -a scrypt -r 1 -s 6 -o http://127.0.0.1:3333 -O USERNAME.1:PASSWORD

Following errors are received. This one from the proxy:

2013-07-18 01:33:59,981 ERROR protocol protocol.dataReceived # Processing of message failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 185, in dataReceived
    self.lineReceived(line, request_counter)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 216, in lineReceived
    raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line)
'rotocolException: Cannot decode message 'POST / HTTP/1.1

And this from minerd. What am I doing wrong? Any help is appreciated!

[2013-07-18 01:33:59] HTTP request failed: Empty reply from server
[2013-07-18 01:33:59] json_rpc_call failed, retry after 30 seconds

Solution

  • I am a little curious, I don't know as a fact but I was under the impression that the mining proxy was for BTC not LTC.

    But anyways I believe I got a similar message when I first installed it as well. To fix, or rather to actually get it running I had to use the Git installation method instead of installing manually.

    Installation on Linux using Git

    This is advanced option for experienced users, but give you the easiest way for updating the proxy.

    1.git clone git://github.com/slush0/stratum-mining-proxy.git

    2.cd stratum-mining-proxy

    3.sudo apt-get install python-dev # Development package of Python are necessary

    4.sudo python distribute_setup.py # This will upgrade setuptools package

    5.sudo python setup.py develop # This will install required dependencies (namely Twisted and Stratum libraries), but don't install the package into the system.

    6.You can start the proxy by typing "./mining_proxy.py" in the terminal window. Using default settings, proxy connects to Slush's pool interface.

    7.If you want to connect to another pool or change other proxy settings, type "./mining_proxy.py --help".

    8.If you want to update the proxy, type "git pull" in the package directory.