New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing externals/stratum Arguments? or Requirements? #368

Closed
theneonirvana opened this Issue Feb 20, 2017 · 10 comments

Comments

Projects
None yet
5 participants
@theneonirvana

theneonirvana commented Feb 20, 2017

First of all, Thank you very, very much in advance....

This is probably my third attempt on a clean install of Ubuntu Server 12, Following the "Getting Started with Stratum Guide"

Everythings pretty easy going until the externals python setup script installs...

The install for the externals/litecoin_scrypt seemed to have gone correctly... However:

cd ~/stratum
sudo python setup.py install

Throws the following stack trace :

...
Extracting distribute-0.6.28-py2.7.egg to /usr/local/lib/python2.7/dist-packages
distribute 0.6.28 is already the active version in easy-install.pth
Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg
Traceback (most recent call last):
  File "setup.py", line 19, in <module>
    install_requires=['twisted', 'ecdsa', 'pyopenssl', 'autobahn',]
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-x86_64/egg/setuptools/command/install.py", line 73, in run
  File "build/bdist.linux-x86_64/egg/setuptools/command/install.py", line 101, in do_egg_install
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 358, in run
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 578, in easy_install
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 630, in install_item
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 677, in process_distribution
    
TypeError: __init__() takes exactly 2 arguments (4 given)
  1. I definitely have all the python requirements and twisted installed, as i am left in a state where i can start "stratum" and/or "stratum-mining" server using twistd -ny launcher.tac, however stratum-mining throws the following errors,

Extracting distribute-0.6.28-py2.7.egg to /usr/local/lib/python2.7/dist-packages
distribute 0.6.28 is already the active version in easy-install.pth
Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg
Traceback (most recent call last):
  File "setup.py", line 19, in <module>
    install_requires=['twisted', 'ecdsa', 'pyopenssl', 'autobahn',]
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-x86_64/egg/setuptools/command/install.py", line 73, in run
  File "build/bdist.linux-x86_64/egg/setuptools/command/install.py", line 101, in do_egg_install
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 358, in run
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 578, in easy_install
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 630, in install_item
    
  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 677, in process_distribution
    
TypeError: __init__() takes exactly 2 arguments (4 given)
  1. I have checked using 'npm install' for ecdsa and pyopnessl and autobahn, so im pretty sure that i have met these requirements, as in the past i also ran into 'bignum' requirements and 'extend' requirements that i had to install with npm (forgive me im not a unix guy) and i got all that sorted out, (pretty sure)

I'm currently left in a state where i have MPOS and apache installed and working with a working and synced litecoind, MPOS sees my litecoind, and MPOS stops complaining about stratum when i have the "stratum" server running, but minners cannot connect to that, i get a "Method subscribe not found for service 'mining'" error, which im intelligently assuming because, its not stratum-mining...

The Following is output when i try to run stratum-mining\twistd -ny launcher.tac

pool@ubuntu:~/stratum-mining$ twistd -ny launcher.tac 
2017-02-19 17:52:51,814 DEBUG bitcoin_rpc # Logging initialized
2017-02-19 17:52:51,814 DEBUG interfaces # Logging initialized
2017-02-19 17:52:51,822 DEBUG Cache # Logging initialized
2017-02-19 17:52:51,866 DEBUG DBInterface # Logging initialized
2017-02-19 17:52:51,866 DEBUG DBInterface # DB_Mysql_Vardiff INIT
2017-02-19 17:52:51,867 DEBUG DB_Mysql_Vardiff # Logging initialized
2017-02-19 17:52:51,890 DEBUG DB_Mysql # Logging initialized
2017-02-19 17:52:52,013 DEBUG DB_Mysql # Connecting to DB
2017-02-19 17:52:52,021 DEBUG DB_Mysql # Checking Database
2017-02-19 17:52:52,021 INFO Cache # Caching initialized
2017-02-19 17:52:52,022 DEBUG subscription # Logging initialized
2017-02-19 17:52:52,071 DEBUG mining # Logging initialized
2017-02-19 17:52:52,071 DEBUG work_log_pruner # Logging initialized
2017-02-19 17:52:52,073 DEBUG BasicShareLimiter # Logging initialized
2017-02-19 17:52:52,073 DEBUG DBInterface # DB_Mysql_Vardiff INIT
2017-02-19 17:52:52,073 DEBUG DB_Mysql # Connecting to DB
2017-02-19 17:52:52,073 DEBUG DB_Mysql_Vardiff # Resetting difficulty for all workers
2017-02-19 17:52:52,073 DEBUG mining # Logging initialized
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/application/service.py", line 405, in loadApplication
    application = sob.loadValueFromFile(filename, 'application', passphrase)
  File "/usr/lib/python2.7/dist-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile
    exec fileObj in d, d
  File "launcher.tac", line 38, in <module>
    mining.setup(on_startup)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
    return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
    result = g.send(result)
  File "/home/pool/stratum-mining/mining/__init__.py", line 24, in setup
    if settings.CONFIG_VERSION == None:
exceptions.AttributeError: 'module' object has no attribute 'CONFIG_VERSION'
2017-02-19 17:52:52-0800 [-] Log opened.
2017-02-19 17:52:52-0800 [-] twistd 11.1.0 (/usr/bin/python 2.7.3) starting up.
2017-02-19 17:52:52-0800 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2017-02-19 17:52:52-0800 [-] Changing process name to twistd-stratum-mining
2017-02-19 17:52:52,483 DEBUG bitcoin_rpc # Logging initialized
2017-02-19 17:52:52,483 DEBUG interfaces # Logging initialized
2017-02-19 17:52:52,483 DEBUG Cache # Logging initialized
2017-02-19 17:52:52,485 DEBUG DBInterface # Logging initialized
2017-02-19 17:52:52,485 DEBUG DBInterface # DB_Mysql_Vardiff INIT
2017-02-19 17:52:52,485 DEBUG DB_Mysql_Vardiff # Logging initialized
2017-02-19 17:52:52,486 DEBUG DB_Mysql # Logging initialized
2017-02-19 17:52:52,488 DEBUG DB_Mysql # Connecting to DB
2017-02-19 17:52:52,488 DEBUG DB_Mysql # Checking Database
2017-02-19 17:52:52,488 INFO Cache # Caching initialized
2017-02-19 17:52:52,489 DEBUG subscription # Logging initialized
2017-02-19 17:52:52,490 DEBUG mining # Logging initialized
2017-02-19 17:52:52,490 DEBUG work_log_pruner # Logging initialized
2017-02-19 17:52:52,490 DEBUG BasicShareLimiter # Logging initialized
2017-02-19 17:52:52,490 DEBUG DBInterface # DB_Mysql_Vardiff INIT
2017-02-19 17:52:52,490 DEBUG DB_Mysql # Connecting to DB
2017-02-19 17:52:52,490 DEBUG DB_Mysql_Vardiff # Resetting difficulty for all workers
2017-02-19 17:52:52,491 DEBUG mining # Logging initialized
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/application/service.py", line 405, in loadApplication
    application = sob.loadValueFromFile(filename, 'application', passphrase)
  File "/usr/lib/python2.7/dist-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile
    exec fileObj in d, d
  File "launcher.tac", line 38, in <module>
    mining.setup(on_startup)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
    return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
    result = g.send(result)
  File "/home/pool/stratum-mining/mining/__init__.py", line 24, in setup
    if settings.CONFIG_VERSION == None:
exceptions.AttributeError: 'module' object has no attribute 'CONFIG_VERSION'
2017-02-19 17:52:52-0800 [-] Log opened.
2017-02-19 17:52:52-0800 [-] twistd 11.1.0 ( 2.7.3) starting up.
2017-02-19 17:52:52-0800 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
^C2017-02-19 17:52:54,750 WARNING DBInterface # SIGINT Detected, shutting down
2017-02-19 17:52:54,750 DEBUG DBInterface # DBInterface.do_import called. force: yes, queue size: 0
2017-02-19 17:52:54-0800 [-] Main loop terminated.
2017-02-19 17:52:54-0800 [-] Server Shut Down.

I'm sorry i have to ask to be honest, however i have been at this for over 5 days in my off time, and i would like to see a working result. All of the online documentation seems to be out of date, or has linux mis-matches between g++ versions needing C++11 compatibility and on and on, but ive gotten past most of that... and i am in everlasting gratitude for some assistance.

Thank you again, in advance.
Zack

@theneonirvana

This comment has been minimized.

theneonirvana commented Feb 24, 2017

got it working thanks,

@thomph

This comment has been minimized.

thomph commented Feb 24, 2017

@theneonirvana, how to fix ?
exceptions.AttributeError: 'module' object has no attribute 'CONFIG_VERSION'

@ahmedbodi

This comment has been minimized.

Member

ahmedbodi commented Feb 24, 2017

@naidu

This comment has been minimized.

naidu commented Sep 10, 2017

@theneonirvana what you did to get it working?

@ikolubr

This comment has been minimized.

ikolubr commented Jan 6, 2018

Did any one get this solved?!
If yes, do you mind sharing it?

@theneonirvana

This comment has been minimized.

theneonirvana commented Jan 6, 2018

its sad, because where ever you search for anything to do with pools, no one wants to help any one because it is all to do with money :)

however Crypto is a community. IMO, and not Money grubbing system, sadly we all have to eat.... and pay rent...

Ive spent the past year going through linux and stratum code and making a black book of everything under the sun. Sadly i could print it all out and you would probably still come up with random errors.

The key is understanding whats happening

The documentation sucks at best, every where, not just any repo. And alot of the code is getting old cuz the block chains are maturing....

However, i will be the ray of sunshine here, for those who are trying to do what i have done, and continue to attempt on http://hash.group ;)

The answer from ahmedbodi is correct, but no one wants to tell people what this all means...

File "/home/pool/stratum-mining/mining/init.py", line 24, in setup
if settings.CONFIG_VERSION == None:

is erroing out because its looking for a value, within the settings object, that has been read from the config file, because its not there, not within the file, or prolly outdated, as per ahmedi's response,

The links within the documentation from 2014 are old, and other git repo's exist for stratum-mining

Since your prolly using old code like i did, or tried 50 frigging times and have ended up cross contaminating things.... this kinda shit happens....

if your mulling over the MPOS quick start guide like i did trying to get this working over a year ago, my honest advice is if you havent given up, running a pool, or pools... can be hell... and if your doing it responsibly, theres liability from angry miners...

Give it the value in the config that it bitches about and try to debug your way through it,

Ensure your on a fresh working copy, maybe including the linux distro your on,

ill see if i can jump on hash.groups litepool and see the exact versions and git repos i have running for the litecoin pool.... but im super busy

and thats the only pool thats running this version of stratum mining because every coin differs. and every single one has there own out-dated, undocumented problems, that no one is willing to share it seems.

ill try to post my findings in a day or so,

@ikolubr

This comment has been minimized.

ikolubr commented Jan 6, 2018

Thank you @theneonirvana.
I'm actually trying to build a pool for VERGE. I have a "few" miners and I want to run just for me as the miners are not the kind I can group them in a solo mining venture.

Honestly I've been trying for the last two days and as you said.... people don't want to share.

I've owned pools in the past, when p2poll was a thing. Probably the best idea that was/is around joining power for mining.

Well, if you could help in anyway, I would really appreciate.

Thank you.

@theneonirvana

This comment has been minimized.

theneonirvana commented Jan 20, 2018

ikolubr did you ever get ur verge pool running? i think i have found a solution.. forgive the lateness

@ikolubr

This comment has been minimized.

ikolubr commented Jan 20, 2018

@theneonirvana I did. I ended up running unomp and mpos. But thank you for the reply anyways. :)

@ahmedbodi

This comment has been minimized.

Member

ahmedbodi commented Jun 3, 2018

What's the issue? i attempted spinning up a pool with this a few days ago, theres an issue with the stratum module which is fixed by installing the one from slush0 but the config and such appear to work fine. Its a case of inputting your coin, db details and boom all done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment