YoRyan / nuxhash

A NiceHash cryptocurrency mining client for Linux.
GNU General Public License v3.0
264 stars 164 forks source link

Nuxhash fails to decode JSON object and freezes, has to be manually restarted #12

Closed TheFeelTrain closed 6 years ago

TheFeelTrain commented 6 years ago

This happens about once a day for me.

Traceback (most recent call last):
  File "./nuxhashd.py", line 258, in <module>
    main()
  File "./nuxhashd.py", line 88, in main
    do_mining(nx_miners, nx_settings, nx_benchmarks, all_devices)
  File "./nuxhashd.py", line 237, in do_mining
    algorithm.parent.reload()
  File "/home/thefeeltrain/nuxhash/miners/excavator.py", line 318, in reload
    self.server.restart()
  File "/home/thefeeltrain/nuxhash/miners/excavator.py", line 100, in restart
    self.start()
  File "/home/thefeeltrain/nuxhash/miners/excavator.py", line 70, in start
    while not self._test_connection():
  File "/home/thefeeltrain/nuxhash/miners/excavator.py", line 162, in _test_connection
    self.send_command('info', [])
  File "/home/thefeeltrain/nuxhash/miners/excavator.py", line 154, in send_command
    response_data = json.loads(response)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
YoRyan commented 6 years ago

It appears excavator is either sending a garbage response or has not yet fully started. Hopefully the above change makes a difference.

TheFeelTrain commented 6 years ago

Seems to be a lot more stable. Has been running all day without crashing. Although on setup the download/downloadables/excavator.sh file is not copied to the egg install, I had to do it manually and then it worked perfectly.

YoRyan commented 6 years ago

Should be fixed, thanks for the tip! Going to close this issue for now.