Hi there,
I have some problems connecting slush's stratum proxy to p2pool. The pool is up and running fine. When I start the proxy, I get the following output:
> ./mining_proxy.py -o localhost -p 9332 -gp 8341 -v
2013-06-13 10:47:38,023 DEBUG stats logger.get_logger # Logging initialized
2013-06-13 10:47:38,030 DEBUG protocol logger.get_logger # Logging initialized
2013-06-13 10:47:38,030 DEBUG socket_transport logger.get_logger # Logging initialized
2013-06-13 10:47:38,050 DEBUG proxy logger.get_logger # Logging initialized
2013-06-13 10:47:38,051 DEBUG proxy logger.get_logger # Logging initialized
2013-06-13 10:47:38,051 INFO proxy jobs. # C extension for midstate not available. Using default implementation instead.
2013-06-13 10:47:38,051 DEBUG proxy logger.get_logger # Logging initialized
2013-06-13 10:47:38,051 DEBUG proxy logger.get_logger # Logging initialized
2013-06-13 10:47:38,052 DEBUG proxy logger.get_logger # Logging initialized
2013-06-13 10:47:38,052 DEBUG proxy logger.get_logger # Logging initialized
2013-06-13 10:47:38,052 DEBUG proxy logger.get_logger # Logging initialized
2013-06-13 10:47:38,052 DEBUG proxy logger.get_logger # Logging initialized
2013-06-13 10:47:38,060 ERROR proxy mining_proxy.main # Stratum host/port autodetection failed
Traceback (most recent call last):
File "./mining_proxy.py", line 178, in main
new_host = (yield utils.detect_stratum(args.host, args.port))
File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1070, in _inlineCallbacks
result = g.send(result)
File "/home/macdschie/src/stratum-mining-proxy/mining_libs/utils.py", line 69, in detect_stratum
header = f.response_headers.get('x-stratum', None)[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
2013-06-13 10:47:38,060 WARNING proxy mining_proxy.main # Stratum proxy version: 1.5.2
2013-06-13 10:47:38,062 WARNING proxy mining_proxy.test_update # Checking for updates...
2013-06-13 10:47:38,242 WARNING proxy mining_proxy.main # Trying to connect to Stratum pool at localhost:9332
2013-06-13 10:47:38,245 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-06-13 10:47:38,245 DEBUG protocol protocol.connectionMade # Connected 127.0.0.1
2013-06-13 10:47:38,245 DEBUG protocol protocol.connectionMade # Resuming connection: []
2013-06-13 10:47:38,245 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at localhost:9332
2013-06-13 10:47:38,245 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-06-13 10:47:38,245 DEBUG protocol protocol.writeJsonRequest # < {"params": [], "id": 1, "method": "mining.subscribe"}
2013-06-13 10:47:38,248 DEBUG protocol protocol.lineReceived # > {u'result': [[u'mining.notify', u'ae6812eb4cd7735a302a8a9dd95cf71f'], u'', 2], u'jsonrpc': u'2.0', u'id': 1, u'error': None}
2013-06-13 10:47:38,250 WARNING proxy mining_proxy.main # -----------------------------------------------------------------------
2013-06-13 10:47:38,251 WARNING proxy mining_proxy.main # PROXY IS LISTENING ON ALL IPs ON PORT 3333 (stratum) AND 8341 (getwork)
2013-06-13 10:47:38,251 WARNING proxy mining_proxy.main # -----------------------------------------------------------------------
2013-06-13 10:47:38,251 DEBUG protocol protocol.lineReceived # > {u'jsonrpc': u'2.0', u'params': [0.9999847412109375], u'method': u'mining.set_difficulty', u'id': 158037711}
2013-06-13 10:47:38,251 INFO proxy client_service.handle_event # Setting new difficulty: 0.999984741211
2013-06-13 10:47:38,251 DEBUG protocol protocol.writeJsonResponse # < {"error": null, "id": 158037711, "result": null}
2013-06-13 10:47:38,252 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at localhost:9332
2013-06-13 10:47:38,252 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
2013-06-13 10:47:38,252 DEBUG socket_transport socket_transport.clientConnectionLost # [Failure instance: Traceback (failure with no frames): : Connection to the other side was lost in a non-clean fashion.
]
2013-06-13 10:47:40,618 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2013-06-13 10:47:40,618 DEBUG protocol protocol.connectionMade # Connected 127.0.0.1
2013-06-13 10:47:40,618 DEBUG protocol protocol.connectionMade # Resuming connection: []
2013-06-13 10:47:40,618 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at localhost:9332
2013-06-13 10:47:40,618 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2013-06-13 10:47:40,619 DEBUG protocol protocol.writeJsonRequest # < {"params": [], "id": 1, "method": "mining.subscribe"}
2013-06-13 10:47:40,621 DEBUG protocol protocol.lineReceived # > {u'result': [[u'mining.notify', u'ae6812eb4cd7735a302a8a9dd95cf71f'], u'', 2], u'jsonrpc': u'2.0', u'id': 1, u'error': None}
2013-06-13 10:47:40,621 DEBUG protocol protocol.lineReceived # > {u'jsonrpc': u'2.0', u'params': [0.9999847412109375], u'method': u'mining.set_difficulty', u'id': 650029787}
2013-06-13 10:47:40,621 INFO proxy client_service.handle_event # Setting new difficulty: 0.999984741211
2013-06-13 10:47:40,621 DEBUG protocol protocol.writeJsonResponse # < {"error": null, "id": 650029787, "result": null}
2013-06-13 10:47:40,622 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at localhost:9332
2013-06-13 10:47:40,622 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
2013-06-13 10:47:40,622 DEBUG socket_transport socket_transport.clientConnectionLost # [Failure instance: Traceback (failure with no frames): : Connection to the other side was lost in a non-clean fashion.
]
The last few lines repeat over and over again: the proxy tries to connect to the pool, exchanges some parameters and disconnects. I cannot find any output regarding the connection attempts in the p2pool logs.
When I start the proxy with other pools, it works fine, Also the traceback at the beginning (TypeError: 'NoneType' object has no attribute '__getitem__') only appears with p2pool.
Has anybody any clue what's going on there?