jgarzik / pyminer

Python miner for bitcoin
MIT License
840 stars 354 forks source link

Pyminer doesn't work? #7

Closed davidawad closed 10 years ago

davidawad commented 10 years ago

i tried just running this to make sure it works and i got a errno 111. Any idea why?

terminal output below

Process Process-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "pyminer.py", line 207, in miner_thread
    miner.loop()
  File "pyminer.py", line 203, in loop
    self.iterate(rpc)
  File "pyminer.py", line 167, in iterate
    work = rpc.getwork()
  File "pyminer.py", line 76, in getwork
    return self.rpc('getwork', data)
  File "pyminer.py", line 54, in rpc
    'Content-type' : 'application/json' })
  File "/usr/lib/python2.7/httplib.py", line 1001, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1035, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 850, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 812, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 793, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
error: [Errno 111] Connection refused
davidawad commented 10 years ago

well for anyone who gets this error it's actually just that this is expecting bitcoind to be running. You have to install itcoind from source and be running it on your machine. Then make sure the config files match.

appledevpro commented 3 years ago

Where is bitcoind?

ORP967 commented 2 years ago

I have a working miner that uses the current "getworktemplate" in python 3. It is a code from (https://github.com/vsergeev) that I changed to check for a new block every 20 sc or so and start mining again every time a new block is detected. Currently getting 1.01KH/s on a Dell.