stratum-mining-proxy error - Can't decode message - python

I'm attempting to run stratum-mining-proxy with minerd. Proxy starts and runs with the following command:
python ./mining_proxy.py -o ltc-stratum.kattare.com -p 3333 -pa scrypt
Proxy starts fine. Run Minerd (U/P removed):
minerd -a scrypt -r 1 -s 6 -o http://127.0.0.1:3333 -O USERNAME.1:PASSWORD
Following errors are received. This one from the proxy:
2013-07-18 01:33:59,981 ERROR protocol protocol.dataReceived # Processing of message failed
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 185, in dataReceived
self.lineReceived(line, request_counter)
File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/protocol.py", line 216, in lineReceived
raise custom_exceptions.ProtocolException("Cannot decode message '%s'" % line)
'rotocolException: Cannot decode message 'POST / HTTP/1.1
And this from minerd. What am I doing wrong? Any help is appreciated!
[2013-07-18 01:33:59] HTTP request failed: Empty reply from server
[2013-07-18 01:33:59] json_rpc_call failed, retry after 30 seconds

I am a little curious, I don't know as a fact but I was under the impression that the mining proxy was for BTC not LTC.
But anyways I believe I got a similar message when I first installed it as well. To fix, or rather to actually get it running I had to use the Git installation method instead of installing manually.
Installation on Linux using Git
This is advanced option for experienced users, but give you the easiest way for updating the proxy.
1.git clone git://github.com/slush0/stratum-mining-proxy.git
2.cd stratum-mining-proxy
3.sudo apt-get install python-dev # Development package of Python are necessary
4.sudo python distribute_setup.py # This will upgrade setuptools package
5.sudo python setup.py develop # This will install required dependencies (namely Twisted and Stratum libraries), but don't install the package into the system.
6.You can start the proxy by typing "./mining_proxy.py" in the terminal window. Using default settings, proxy connects to Slush's pool interface.
7.If you want to connect to another pool or change other proxy settings, type "./mining_proxy.py --help".
8.If you want to update the proxy, type "git pull" in the package directory.

Related

Linux or window is the same :p -> HttpException('Invalid HTTP request form (expected: authority or absolute, got: relative)')

I am new to mitmproxy.org library. On doc what i have seen this library has some features that im really interested to use.
I have some couple of question about this package i have tried in both Windows 10, and ubuntu 18.04 but same result in both.
Support should be on installation setup.
I have found this library since 2 or 3 days, the most important part is that i cannot make it run.
ON WINDOW 10:
I have installed:
mitmproxy throw pip with command 'pip install mitmproxy'
and throw windows installer throw 'https://snapshots.mitmproxy.org/6.0.2/mitmproxy-6.0.2-windows-installer.exe'
When i use this line of code
mitmdump -p 443 --mode reverse:http://example.com # it works just fine as it needs to in local ip http://localhost:443
When i use this line of code
mitmproxy -s anatomy.py # fails to run on local ip http://localhost:8080 with error message 'Error: mitmproxy's console interface is not supported on Windows. You can run mitmdump or mitmweb instead.'
mitmdump -s anatomy.py # fails to run on local ip http://localhost:8080 with error message 'HTTP protocol error in client request: Invalid HTTP request form (expected: authority or absolute, got: relative)'
ON UBUNTU 18.04:
I have installed:
mitmproxy throw pip with command 'pip install mitmproxy'
When i use this line of code
mitmdump -p 443 --mode reverse:http://example.com # fails to run on local ip http://localhost:8080 with error message 'HTTP protocol error in client request: Invalid HTTP request form (expected: authority or absolute, got: relative)'
When i use this line of code
mitmproxy -s anatomy.py | mitmdump -s anatomy.py #fails to run on local ip http://localhost:8080 with error message 'HTTP protocol error in client request: Invalid HTTP request form (expected: authority or absolute, got: relative)'
All, the best

Luigi Pipelining : No module named pwd in Windows

I am trying to execute the tutorial given in https://marcobonzanini.com/2015/10/24/building-data-pipelines-with-python-and-luigi/.
I am able to run the program on its own using local scheduler, giving me:
Scheduled 2 tasks of which:
* 2 ran successfully:
- 1 PrintNumbers(n=1000)
- 1 SquaredNumbers(n=1000)
This progress looks :) because there were no failed tasks or missing external de
pendencies
===== Luigi Execution Summary =====
However, to try the visualization on the server, when I try to run luigid --background, it throws me an error saying I dont have pwd module.
I cannot find a pwd module using pip for windows.
File "c:\users\alex\appdata\local\continuum\anaconda3\lib\site-packages
\luigi\process.py", line 79, in daemonize
import daemon
File "c:\users\alex\appdata\local\continuum\anaconda3\lib\site-packages
\daemon\__init__.py", line 42, in <module>
from .daemon import DaemonContext
File "c:\users\alex\appdata\local\continuum\anaconda3\lib\site-packages
\daemon\daemon.py", line 25, in <module>
import pwd
ModuleNotFoundError: No module named 'pwd'
I am working in Anaconda Spyder with Python 3.6
I was able to fix this by installing python-daemon==2.1.2
If you already have python-daemon, try downgrading to version 2.1.2
Do this before install luigi.
Example:
pip install python-daemon==2.1.2
then
pip install luigi.
For some reason, if you dont use the --background parameter on windows it will start just fine
just write luigid in cmd
The base problem here is that luigid --background is trying to spawn a python-daemon which is a unix-specific thing.
See section titled "The luigid server" here: http://luigi.readthedocs.io/en/stable/central_scheduler.html
Specifically:
Note that this requires python-daemon. By default, the server starts on AF_INET and AF_INET6 port 8082 (which can be changed with the --port flag) and listens on all IPs. (To use an AF_UNIX socket use the --unix-socket flag)
This existing stack overflow answer provides more detail:
How to start daemon process from python on windows?
Options I see here are:
Log a request with Luigi on github to improve their windows support to spawn Luigid as a windows process for the --background switch
Run a virtual machine with a proper Unix OS in it on Windows and run your Luigi pipelines there.
Follow Steven G's suggestion and run luigid in a separate command prompt
To reproduce the root cause of this issue, open a python prompt in windows and type:
>>import daemon
Traceback (most recent call last): File "", line 1, in
File "C:\Anaconda3\lib\site-packages\daemon__init__.py",
line 42, in
from .daemon import DaemonContext File "C:\Anaconda3\lib\site-packages\daemon\daemon.py", line 25, in
import pwd ModuleNotFoundError: No module named 'pwd'

How To install Heroku in Fedora 25

I an Trying To install Heroku On my Fedora 25 For My Django Project Machine but When i Put this in Terminal
wget https://cli-assets.heroku.com/branches/stable/heroku-REPLACE_ME_OS-REPLACE_ME_ARCH.tar.gz -O heroku.tar.gz
This Error Show
--2017-04-12 14:13:47-- https://cli-assets.heroku.com/branches/stable/heroku-REPLACE_ME_OS-REPLACE_ME_ARCH.tar.gz
Resolving cli-assets.heroku.com (cli-assets.heroku.com)... 54.230.190.177, 54.230.190.134, 54.230.190.243, ...
Connecting to cli-assets.heroku.com (cli-assets.heroku.com)|54.230.190.177|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-04-12 14:13:48 ERROR 404: Not Found.
Please Tell me instruction Step by Step
An easier installation process has since been put together by the Heroku team:
curl https://cli-assets.heroku.com/install.sh | sh
Taken from this ticket.
In wget https://cli-assets.heroku.com/branches/stable/heroku-REPLACE_ME_OS-REPLACE_ME_ARCH.tar.gz -O heroku.tar.gz you must replace REPLACE_ME_OS and REPLACE_ME_ARCH with expected values.
From heroku doc:
Where REPLACE_ME_OS is one of “linux”, “darwin”, “windows”, “freebsd”, “openbsd” and REPLACE_ME_ARCH is one of “amd64”, “386” or “arm”

How to parse python module for openstack

Recently, when I was installing openstack on 3 vm on centos 7 using answer file I had the following error:
10.7.35.174_osclient.pp: [ ERROR ]
Applying Puppet manifests [ ERROR ]
ERROR : Error appeared during Puppet run: 10.7.35.174_osclient.pp
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list python-iso8601' returned 1: Error: No matching Packages to list
You will find full trace in log /var/tmp/packstack/20160318-124834-91QzZC/manifests/10.7.35.174_osclient.pp.log
Please check log file /var/tmp/packstack/20160318-124834-91QzZC/openstack-setup.log for more information
Additional information:
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 10.7.35.174. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://10.7.35.174/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
I have already manually installed that module, but the same problem occures anyway.
That command only runs like that:
/usr/bin/yum -d 0 -e 0 -y list python2-iso8601
Is there any way to parse it to python?
Do you have any ideas how to solve it?
Found that kilo version works fine.

hg pull from bitbucket using fabric

I'm trying to use fabric to deploy a Django project and I get this error when I run hg pull:
[myusername.webfactional.com] run: hg pull
[myusername.webfactional.com] out: remote: Warning: Permanently added the RSA host key for IP address '207.223.240.181' to the list of known hosts.
[myusername.webfactional.com] out: remote: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
[myusername.webfactional.com] err: abort: no suitable response from remote hg!
Fatal error: run() encountered an error (return code 255) while executing 'hg pull'
I can run other mercurial commands like hg status, and hg log just fine from my fab file.
I have generated an SSH key on the server and added it to my bitbucket account. This works as I can SSH in and run hg pull and it works fine, it's only when using fabric.
This is my fabfile:
from __future__ import with_statement
from fabric.api import *
env.hosts = ['myusername.webfactional.com']
env.user = "myusername"
def development():
# Update files
local("hg push")
with cd("~/webapps/mysite/mysite"):
run("hg pull")
# Update database
with cd("~/webapps/mysite/mysite"):
run("python2.6 manage.py syncdb")
run("python2.6 manage.py migrate")
# Reload apache
run("~/webapps/mysite/apache2/bin/restart")
Any ideas?
EDIT:
Got this working using https
so instead of
hg pull
I'm using
hg pull https://myusername#bitbucket.org/myusername/mysite
Can't reproduce.
zada$ fab development
[ostars.com] Executing task 'development'
[ostars.com] run: hg pull
[ostars.com] out: pulling from ssh://hg#bitbucket.org/Zada/b
[ostars.com] out: no changes found
Done.
Disconnecting from ostars.com... done.
zada$ hg --version
Mercurial Distributed SCM (version 1.6.3)
zada$ ssh ostars.com "hg --version"
Mercurial Distributed SCM (version 1.6)
zada$ fab --version
Fabric 0.9.2
Possible reasons: versions mismatch. Or just a glitches on Butbucket :)
Try run("hg pull") to be more verbose.
To use SSH to clone or pull or push repository in BitBucket you need to follow this instruction (this document is for Mercurial on Mac OSX or Linux) :
https://confluence.atlassian.com/pages/viewpage.action?pageId=270827678
If you want to setup other ssh to to work with bitbucket, here is the full documentation :
https://confluence.atlassian.com/display/BITBUCKET/How+to+install+a+public+key+on+your+Bitbucket+account

Categories

Resources