stratum-mining-litecoin
stratum-mining-litecoin copied to clipboard
User auth failing for new workers
User auth is failing if anyone sets up a new worker. Auth continues to work for a previous worker that was setup before we rebooted server. Every time a miner connects we are seeing this in the logs:
2013-07-21 20:29:02-0500 [stratum.socket_transport.SocketTransportFactory] 2013-07-21 20:29:02,750 INFO stats # 20 peers connected, state changed 1 times 2013-07-21 20:29:02-0500 [Protocol,758,108.167.56.139] 2013-07-21 20:29:02,750 ERROR protocol # Processing of message failed 2013-07-21 20:29:02-0500 [Protocol,758,108.167.56.139] Traceback (most recent call last): 2013-07-21 20:29:02-0500 [Protocol,758,108.167.56.139] File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 185, in dataReceived 2013-07-21 20:29:02-0500 [Protocol,758,108.167.56.139] self.lineReceived(line, request_counter) 2013-07-21 20:29:02-0500 [Protocol,758,108.167.56.139] File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 216, in lineReceived 2013-07-21 20:29:02-0500 [Protocol,758,108.167.56.139] raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line) 2013-07-21 20:29:02-0500 [Protocol,758,108.167.56.139] ProtocolException: Cannot decode message 'POST / HTTP/1.1 ' 2013-07-21 20:29:02-0500 [Protocol,758,108.167.56.139] 2013-07-21 20:29:02,751 INFO stats # 19 peers connected, state changed 1 times 2013-07-21 20:29:02-0500 [stratum.socket_transport.SocketTransportFactory] 2013-07-21 20:29:02,916 INFO stats # 20 peers connected, state changed 1 times 2013-07-21 20:29:02-0500 [Protocol,759,108.167.56.139] 2013-07-21 20:29:02,916 ERROR protocol # Processing of message failed 2013-07-21 20:29:02-0500 [Protocol,759,108.167.56.139] Traceback (most recent call last): 2013-07-21 20:29:02-0500 [Protocol,759,108.167.56.139] File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 185, in dataReceived 2013-07-21 20:29:02-0500 [Protocol,759,108.167.56.139] self.lineReceived(line, request_counter) 2013-07-21 20:29:02-0500 [Protocol,759,108.167.56.139] File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 216, in lineReceived 2013-07-21 20:29:02-0500 [Protocol,759,108.167.56.139] raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line) 2013-07-21 20:29:02-0500 [Protocol,759,108.167.56.139] ProtocolException: Cannot decode message 'POST / HTTP/1.1 ' 2013-07-21 20:29:02-0500 [Protocol,759,108.167.56.139] 2013-07-21 20:29:02,917 INFO stats # 19 peers connected, state changed 1 times
We get that for users that CONNECT and others that fail as well. This is mining litecoin.
From the stack trace we can see that the real error is as follows.
ProtocolException: Cannot decode message 'POST / HTTP/1.1
This is a user configuration error. The miner is trying getwork , or they chose the wrong protocol when entering the address. The users need to make sure they use the stratum+tcp://webaddress.domain.com:port
or a client that uses stratum.
I may have rushed this issue a bit. I only looked at the logs and did not read the text. The error above is due to something trying to send HTTP on the stratum port. So check for the things mentioned above.
For the issue where users cannot authenticate until it is restarted, this should be resolved in https://github.com/moopless/stratum-mining-litecoin/issues/33. Please try commit https://github.com/moopless/stratum-mining-litecoin/commit/be351f8e37a367a333b2c22b15a550c138be8637 or later. Please verify what commit you are on.
I upgraded to the very latest version and am seeing the same thing. Any users that are created post launch of the software cannot auth, getting the same error.
Looks like restarting memcached might have fixed this
@jZegers What branch of stratum-mining-litecoin are you using?
On Mon, Jul 22, 2013 at 11:13 AM, JZegers [email protected] wrote:
Looks like restarting memcached might have fixed this
— Reply to this email directly or view it on GitHubhttps://github.com/moopless/stratum-mining-litecoin/issues/46#issuecomment-21350928 .
the latest master branch
Ok great. The master branch does not use memcached, but rather internal hashes. I am building the memcached integration in now, but it is in a dev branch. It may be a front end issue if restarting memcached is the resolution (or coincidental). Can you create a new user and verify if it works or not? If it does not, please query the pool_worker table for the user that was just created to ensure it has been created.
On Mon, Jul 22, 2013 at 11:27 AM, JZegers [email protected] wrote:
the latest master branch
— Reply to this email directly or view it on GitHubhttps://github.com/moopless/stratum-mining-litecoin/issues/46#issuecomment-21351945 .
FYI mmcfe-ng is not using memcache for the workers table.
I'm seeing this as well new workers not being able to connect, should we be clearing the user cache more often?
Is this still an issue? What authentication flags are being used? Has anyone found a workaround?
I had this issue using these version on Ubuntu 12. Maybe it's something with Twisted version you have?
I had Twisted 11.1.0:
Found existing installation: stratum 0.2.12 Found existing installation: Twisted 11.1.0 Uninstalling Twisted: Successfully uninstalled Twisted Running setup.py install for twisted Installed Twisted 13.1.0
I ran a pip install stratum --upgrade and it seems to have resolved the issue thus far with the new twisted version (13.1.0)
I will continue to monitor it - but give it a try! Maybe you have immediate results :+1:
scratch that still getting it: 2013-08-06 01:05:34-0700 [Protocol,6,66.249.75.215] 2013-08-06 01:05:34,914 ERROR protocol # Processing of message failed 2013-08-06 01:05:34-0700 [Protocol,6,66.249.75.215] Traceback (most recent call last): 2013-08-06 01:05:34-0700 [Protocol,6,66.249.75.215] File "/usr/local/lib/python2.7/dist-packages/stratum/protocol.py", line 185, in dataReceived 2013-08-06 01:05:34-0700 [Protocol,6,66.249.75.215] self.lineReceived(line, request_counter) 2013-08-06 01:05:34-0700 [Protocol,6,66.249.75.215] File "/usr/local/lib/python2.7/dist-packages/stratum/protocol.py", line 216, in lineReceived 2013-08-06 01:05:34-0700 [Protocol,6,66.249.75.215] raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line) 2013-08-06 01:05:34-0700 [Protocol,6,66.249.75.215] ProtocolException: Cannot decode message 'GET /robots.txt HTTP/1.1^M'
@gr33k Thanks for the update about twisted! I will update the documentation.
The last logs you just added are because we can't handle HTTP traffic. It looks like someone is trying to access your robots.txt (probably a bot). Are you running this on 80,443, or 8080?
Hi Moopless - yep my pool (mmcfe-ng) is on port 80