Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Exceptions thrown when client connects #44

Open
utdrmac opened this issue Jan 22, 2014 · 1 comment
Open

Exceptions thrown when client connects #44

utdrmac opened this issue Jan 22, 2014 · 1 comment

Comments

@utdrmac
Copy link

utdrmac commented Jan 22, 2014

Installed on to raspberry-pi. No issues there. Running it, however, many issues running it.

Client shows this upon enabling connections to proxy:

0: Disabled Dead  Quota 1 Pool 1: stratum+tcp://rpi.local:3333  User:utdrmac.asuras
1: Enabled  Strtm Quota 1 Pool 0: stratum+tcp://stratum.bitcoin.cz:3333  User:utdrmac.asuras

Current pool management strategy: Failover
[F]ailover only disabled
Pool [A]dd [R]emove [D]isable [E]nable [P]rioritize [Q]uota change
[C]hange management strategy [S]witch pool [I]nformation
Or press any other key to continue
 [2014-01-21 22:33:55] pool 1 JSON stratum auth failed: [
   -3,
   "Method 'get_transactions' not found for service 'mining'",
   "Traceback: <class 'stratum.custom_exceptions.MethodNotFoundException'>: Method 'get_transactions'
 not found for service 'mining'\n/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-ar
mv6l.egg/twisted/internet/posixbase.py:614:_doReadOrWrite\n/usr/local/lib/python2.7/dist-packages/Twi
sted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/tcp.py:215:doRead\n/usr/local/lib/python2.7/dist-
packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/tcp.py:221:_dataReceived\n/usr/local/
lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:185:dataReceived\n--- <excep
tion caught here> ---\n/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protoc
ol.py:230:lineReceived\n/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/servi
ces.py:13:_handle_event\n/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/serv
ices.py:75:call\n"
]```


And mining_proxy showed this:

```root@rpi:~/stratum-mining-proxy# ./mining_proxy.py
/usr/local/lib/python2.7/dist-packages/zope.interface-4.0.5-py2.7-linux-armv6l.egg/zope/__init__.py:3: UserWarning: Module twisted was already imported from /usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/__init__.pyc, but /usr/local/lib/python2.7/dist-packages/autobahn-0.7.4-py2.7.egg is being added to sys.path
  import pkg_resources
2014-01-21 22:33:42,151 INFO proxy jobs.<module> # Using C extension for midstate speedup. Good!
2014-01-21 22:33:42,173 WARNING proxy mining_proxy.main # Stratum proxy version: 1.5.2
2014-01-21 22:33:42,221 WARNING proxy mining_proxy.test_update # Checking for updates...
2014-01-21 22:33:42,526 WARNING proxy mining_proxy.main # Trying to connect to Stratum pool at stratum.bitcoin.cz:3333
2014-01-21 22:33:42,834 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2014-01-21 22:33:42,838 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at stratum.bitcoin.cz:3333
2014-01-21 22:33:42,841 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2014-01-21 22:33:43,060 WARNING proxy mining_proxy.main # -----------------------------------------------------------------------
2014-01-21 22:33:43,063 WARNING proxy mining_proxy.main # PROXY IS LISTENING ON ALL IPs ON PORT 3333 (stratum) AND 8332 (getwork)
2014-01-21 22:33:43,066 WARNING proxy mining_proxy.main # -----------------------------------------------------------------------
2014-01-21 22:33:43,072 INFO proxy client_service.handle_event # Setting new difficulty: 3
2014-01-21 22:33:43,078 INFO proxy client_service.handle_event # New job 3c54 for prevhash 45aca989, clean_jobs=True
2014-01-21 22:33:55,731 INFO stats stats.print_stats # 2 peers connected, state changed 1 times
2014-01-21 22:33:57,264 INFO proxy client_service.handle_event # New job 3c55 for prevhash 45aca989, clean_jobs=False
2014-01-21 22:34:25,940 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2014-01-21 22:34:27,086 INFO proxy client_service.handle_event # Setting new difficulty: 1
2014-01-21 22:34:27,091 ERROR protocol protocol.process_failure # [Failure instance: Traceback: <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'write'
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/posixbase.py:614:_doReadOrWrite
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/tcp.py:215:doRead
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/tcp.py:221:_dataReceived
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:185:dataReceived
--- <exception caught here> ---
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:230:lineReceived
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/event_handler.py:7:_handle_event
/root/stratum-mining-proxy/mining_libs/client_service.py:79:handle_event
/root/stratum-mining-proxy/mining_libs/stratum_listener.py:36:on_new_difficulty
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:54:emit
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:160:emit
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:66:emit_single
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:102:writeJsonRequest
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:83:transport_write
]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 230, in lineReceived
    result = self.event_handler._handle_event(msg_method, msg_params, connection_ref=self)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/event_handler.py", line 7, in _handle_event
    return defer.maybeDeferred(wrap_result_object, self.handle_event(msg_method, msg_params, connection_ref))
  File "/root/stratum-mining-proxy/mining_libs/client_service.py", line 79, in handle_event
    stratum_listener.DifficultySubscription.on_new_difficulty(difficulty)
  File "/root/stratum-mining-proxy/mining_libs/stratum_listener.py", line 36, in on_new_difficulty
    cls.emit(new_difficulty)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 54, in emit
    return Pubsub.emit(cls.event, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 160, in emit
    subscription.emit_single(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 66, in emit_single
    conn.writeJsonRequest(self.event, payload, is_notification=True)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 102, in writeJsonRequest
    self.transport_write("%s\n" % serialized)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 83, in transport_write
    self.transport.write(data)
AttributeError: 'NoneType' object has no attribute 'write'
2014-01-21 22:34:27,112 ERROR protocol protocol.process_failure # [Failure instance: Traceback: <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'write'
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/posixbase.py:614:_doReadOrWrite
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/tcp.py:215:doRead
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/tcp.py:221:_dataReceived
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:185:dataReceived
--- <exception caught here> ---
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:230:lineReceived
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/event_handler.py:7:_handle_event
/root/stratum-mining-proxy/mining_libs/client_service.py:64:handle_event
/root/stratum-mining-proxy/mining_libs/stratum_listener.py:59:on_template
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:54:emit
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:160:emit
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:66:emit_single
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:102:writeJsonRequest
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:83:transport_write
]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 230, in lineReceived
    result = self.event_handler._handle_event(msg_method, msg_params, connection_ref=self)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/event_handler.py", line 7, in _handle_event
    return defer.maybeDeferred(wrap_result_object, self.handle_event(msg_method, msg_params, connection_ref))
  File "/root/stratum-mining-proxy/mining_libs/client_service.py", line 64, in handle_event
    job_id, prevhash, coinb1, coinb2, merkle_branch, version, nbits, ntime, clean_jobs)
  File "/root/stratum-mining-proxy/mining_libs/stratum_listener.py", line 59, in on_template
    cls.emit(job_id, prevhash, coinb1, coinb2, merkle_branch, version, nbits, ntime, clean_jobs)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 54, in emit
    return Pubsub.emit(cls.event, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 160, in emit
    subscription.emit_single(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 66, in emit_single
    conn.writeJsonRequest(self.event, payload, is_notification=True)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 102, in writeJsonRequest
    self.transport_write("%s\n" % serialized)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 83, in transport_write
    self.transport.write(data)
AttributeError: 'NoneType' object has no attribute 'write'
2014-01-21 22:34:27,128 ERROR protocol protocol.process_failure # [Failure instance: Traceback: <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'write'
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/posixbase.py:614:_doReadOrWrite
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/tcp.py:215:doRead
/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-armv6l.egg/twisted/internet/tcp.py:221:_dataReceived
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:185:dataReceived
--- <exception caught here> ---
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:230:lineReceived
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/event_handler.py:7:_handle_event
/root/stratum-mining-proxy/mining_libs/client_service.py:64:handle_event
/root/stratum-mining-proxy/mining_libs/stratum_listener.py:59:on_template
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:54:emit
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:160:emit
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py:66:emit_single
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:102:writeJsonRequest
/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py:83:transport_write
]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 230, in lineReceived
    result = self.event_handler._handle_event(msg_method, msg_params, connection_ref=self)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/event_handler.py", line 7, in _handle_event
    return defer.maybeDeferred(wrap_result_object, self.handle_event(msg_method, msg_params, connection_ref))
  File "/root/stratum-mining-proxy/mining_libs/client_service.py", line 64, in handle_event
    job_id, prevhash, coinb1, coinb2, merkle_branch, version, nbits, ntime, clean_jobs)
  File "/root/stratum-mining-proxy/mining_libs/stratum_listener.py", line 59, in on_template
    cls.emit(job_id, prevhash, coinb1, coinb2, merkle_branch, version, nbits, ntime, clean_jobs)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 54, in emit
    return Pubsub.emit(cls.event, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 160, in emit
    subscription.emit_single(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/pubsub.py", line 66, in emit_single
    conn.writeJsonRequest(self.event, payload, is_notification=True)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 102, in writeJsonRequest
    self.transport_write("%s\n" % serialized)
  File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 83, in transport_write
    self.transport.write(data)
AttributeError: 'NoneType' object has no attribute 'write'
2014-01-21 22:34:30,840 INFO stats stats.print_stats # 2 peers connected, state changed 1 times
^C2014-01-21 22:34:31,062 INFO proxy mining_proxy.on_shutdown # Shutting down proxy...
2014-01-21 22:34:31,080 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2014-01-21 22:34:31,086 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at stratum.bitcoin.cz:3333
2014-01-21 22:34:31,090 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
@utdrmac
Copy link
Author

utdrmac commented Jan 26, 2014

Another request to merge this pull into official build as this fixes my issue above:

slush0/stratum#5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant