Bitcoin Forum
November 16, 2024, 03:14:11 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 [5] 6 7 8 9 »  All
  Print  
Author Topic: Avalon users: bitcoind and slush's/generalfaults mining pool setup  (Read 39206 times)
tiktoc (OP)
Full Member
***
Offline Offline

Activity: 176
Merit: 100


View Profile
June 03, 2013, 06:38:49 PM
Last edit: June 03, 2013, 06:50:47 PM by tiktoc
 #81

Congrats Smiley, saw kano's reply in the stratum thread. Assumed something like he said, but he can explain it properly Smiley

edit: I will have a look at 8.2 next few days and change the tute for it.
zulu83465
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
June 07, 2013, 02:34:19 PM
 #82

Hi

run "twistd-ny launcher.tac-l -"

get the response:

2013-06-07 18:18:27,407 INFO mining # Waiting for bitcoin RPC...
2013-06-07 18:18:27+0400 [-] Log opened.
2013-06-07 18:18:27+0400 [-] twistd 13.0.0 (/usr/bin/python 2.7.3) starting up.
2013-06-07 18:18:27+0400 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2013-06-07 18:18:58,184 INFO mining # Response from bitcoin RPC OK
2013-06-07 18:18:58+0400 [HTTPPageGetter,client] Starting factory <HTTPClientFactory: http://localhost:8332>
2013-06-07 18:18:58+0400 [HTTPPageGetter,client] Stopping factory <HTTPClientFactory: http://localhost:8332>
2013-06-07 18:19:18,516 INFO coinbaser # Coinbase address '1MYwS2ASuwrucQtVM1VdFYnX4DR7E8WwYr' is valid
2013-06-07 18:19:18+0400 [HTTPPageGetter,client] Starting factory <HTTPClientFactory: http://localhost:8332>
2013-06-07 18:19:18,518 INFO mining # MINING SERVICE IS READY
2013-06-07 18:19:18+0400 [HTTPPageGetter,client] Loading of signing key 'None' failed, protocol messages cannot be signed.
2013-06-07 18:19:18+0400 [HTTPPageGetter,client] Cannot initiate SSL context, are SSL_PRIVKEY or SSL_CACERT missing?
2013-06-07 18:19:18+0400 [HTTPPageGetter,client] This will skip all SSL-based transports.
2013-06-07 18:19:18+0400 [HTTPPageGetter,client] Unhandled error in Deferred:
2013-06-07 18:19:18+0400 [HTTPPageGetter,client] Unhandled Error
   Traceback (most recent call last):
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/internet/defer.py", line 1070, in _inlineCallbacks
       result = g.send(result)
     File "/home/zulu/stratum/mining/__init__.py", line 66, in setup
       on_startup.callback(True)
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/internet/defer.py", line 380, in callback
       self._startRunCallbacks(result)
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/internet/defer.py", line 488, in _startRunCallbacks
       self._runCallbacks()
   --- <exception caught here> ---
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/internet/defer.py", line 575, in _runCallbacks
       current.result = callback(current.result, *args, **kw)
     File "/usr/local/lib/python2.7/dist-packages/stratum-0.2.12-py2.7.egg/stratum/server.py", line 77, in setup_finalize
       socket.setServiceParent(application)
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/application/service.py", line 186, in setServiceParent
       self.parent.addService(self)
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/application/service.py", line 308, in addService
       service.privilegedStartService()
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/application/internet.py", line 103, in privilegedStartService
       self._port = self._getPort()
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/application/internet.py", line 131, in _getPort
       'listen%s' % (self.method,))(*self.args, **self.kwargs)
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/internet/posixbase.py", line 489, in listenTCP
       p.startListening()
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/internet/tcp.py", line 980, in startListening
       raise CannotListenError(self.interface, self.port, le)
   twisted.internet.error.CannotListenError: Couldn't listen on any:3333: [Errno 98] Address already in use.

I need to update Twisted or something else?
thanks for any advice and assistance
tiktoc (OP)
Full Member
***
Offline Offline

Activity: 176
Merit: 100


View Profile
June 07, 2013, 07:28:02 PM
 #83


     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/internet/posixbase.py", line 489, in listenTCP
       p.startListening()
     File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-i686.egg/twisted/internet/tcp.py", line 980, in startListening
       raise CannotListenError(self.interface, self.port, le)
   twisted.internet.error.CannotListenError: Couldn't listen on any:3333: [Errno 98] Address already in use.

I need to update Twisted or something else?
thanks for any advice and assistance

Something or another running instance of the server is running already and using the 3333 port. Check that the mining server isnt already running.
zulu83465
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
June 07, 2013, 09:37:13 PM
 #84

Thank you very much for your help
now it works )

[/quote]

Something or another running instance of the server is running already and using the 3333 port. Check that the mining server isnt already running.
[/quote]
cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
June 13, 2013, 02:14:54 AM
 #85

questions:

1.  to upgrade from 0.8.1 to 0.8.2 are the commands simply "sudo apt-get update" followed by "sudo apt-get upgrade"?
2.  how do i check bitcoind version # from the command line?
fuzzster
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
June 13, 2013, 06:59:28 AM
 #86

questions:

1.  to upgrade from 0.8.1 to 0.8.2 are the commands simply "sudo apt-get update" followed by "sudo apt-get upgrade"?
2.  how do i check bitcoind version # from the command line?

For point two, run
Code:
bitcoind getinfo
. The version will be listed at the top of your output.

Re point one, not 100% on this myself. Am looking into it and will let you know what I find - unless someone else here could help??
tiktoc (OP)
Full Member
***
Offline Offline

Activity: 176
Merit: 100


View Profile
June 13, 2013, 07:31:46 AM
 #87

I have changed the top post for 0.8.2. To install 0.8.2 delete the git/bitcoin directory and start again from the clone bitcoin command. When it has finished building bitcoind and you have copied it to /use/local/bin and restart bitcoind. You should be on the new version. You don't have to change anything in bitcoin.conf.  If you are using a local wallet make sure you backup your .bitcoin directory before you install the new version.
cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
June 14, 2013, 11:19:58 PM
 #88

is the "&" part of the command correct in the tute?:

Code:
then started the server again using

twistd -ny launcher.tac -l - &
jspielberg
Sr. Member
****
Offline Offline

Activity: 490
Merit: 255



View Profile
June 15, 2013, 12:33:42 AM
 #89

The & throws the process into the background.   If you want to keep it in the foreground, leave it out.
cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
June 15, 2013, 01:01:08 AM
 #90

I didn't notice that setuid option.... that is so much cleaner than trying to run the command through a su -c.

Anyone else seeing instability with bitcoind?
I see it crash every couple of days.

It restarts fast enough that I haven't bothered to look any further.

did we ever agree as to the best way to restart bitcoind and stratum pool in case of a crash?
tiktoc (OP)
Full Member
***
Offline Offline

Activity: 176
Merit: 100


View Profile
June 15, 2013, 07:25:30 PM
 #91

If you use the last version of the init scripts i posted they should restart either bitcoind or the pool software if they crash, unless its reoccurring error after a set number of times it wont try to restart them.

There is more you can do to monitor them, one of the linux forums might get more results, or asking nicely in the pools thread. Its not something I have examples for as I havent needed to do it.

googling linux process monitoring comes up with a few hit to have a read about eg http://www.unix.com/shell-programming-scripting/17866-script-monitor-process-running-server-posting-mail-if-any-process-dead.html
cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
June 17, 2013, 08:50:55 PM
 #92

Replace the bits you need to

Code:
# bitcoind upstart script for Ubuntu

description "Bitcoin daemon"

start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 60
setuid yourusernameforbitcoinhere
expect fork
exec /usr/local/bin/bitcoind -datadir=/home/yourusernameforbitcoinhere/.bitcoin


Code:
description "Start and stop slush on bitcoind start"

respawn
respawn limit 10 60
expect fork

start on started bitcoind
stop on stopped bitcoind
setuid poolusernamehere
pre-start script
   sleep 30
end script

chdir /home/poolocation/git/stratum-mining
exec twistd --syslog -ny /home/poollocation/git/stratum-mining/launcher.tac &



so do these 2 bits of code go into the bitcoin.conf and stratum-mining.conf files respectively?
tiktoc (OP)
Full Member
***
Offline Offline

Activity: 176
Merit: 100


View Profile
June 18, 2013, 05:03:01 PM
 #93

nope, they go in /etc/init/ directory, create them as root

mine looks like this

-rw-r--r-- 1 root root 228 Apr 12 08:03 bitcoind.conf

the bitcoind info goes in the above one and the pool one below

-rw-r--r-- 1 root root 305 Apr 12 08:12 slushpool.conf

Code:

sudo su root

cd /etc/init/

pico bitcoind.conf


cut and past the above bitcoind init script into pico

cntrl x
then hit y to save


Code:
pico slushpool.conf


cut and past the above pool  init script into pico

cntrl x
then hit y to save


Init is the automatic program startup system for linux.
cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
June 29, 2013, 11:13:04 PM
 #94

Code:
cypher@server:~$ bitcoind -blocknotify="/home/username/git/stratum-mining/scripts/blocknotify.sh --password x --host localhost --port 3333" -daemon
cypher@server:~$ Bitcoin server starting
: Error opening block database.
Do you want to rebuild the block database now?
y
y: command not found

how do i respond to this?
tiktoc (OP)
Full Member
***
Offline Offline

Activity: 176
Merit: 100


View Profile
June 29, 2013, 11:31:15 PM
 #95

Try starting it without the -daemon

Once it has finished rebuilding start it adding with the -daemon
cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
June 29, 2013, 11:44:30 PM
 #96

Try starting it without the -daemon

Once it has finished rebuilding start it adding with the -daemon

same error w/o -daemon
cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
June 30, 2013, 07:38:07 AM
 #97

Code:
cypher@server:~$ bitcoind -blocknotify="/home/username/git/stratum-mining/scripts/blocknotify.sh --password x --host localhost --port 3333" -daemon
cypher@server:~$ Bitcoin server starting
: Error opening block database.
Do you want to rebuild the block database now?
y
y: command not found

how do i respond to this?

btw, this happened while i was away on vacation.  came back and server shutdown.  wasn't actively mining; just running bitcoind daemon and slush server anyway.  got this error when trying to restart.

should be a simple fix?  anxious to get it working again as my avalons arrived and want to point them at this solo setup to see if they work.  Grin
tiktoc (OP)
Full Member
***
Offline Offline

Activity: 176
Merit: 100


View Profile
June 30, 2013, 08:03:24 AM
 #98

When it us not running in daemon mode it should except keyboard input so it should rebuild when you hit enter.
cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
July 01, 2013, 05:42:01 PM
 #99

i think i just noted an inconsistency in the tute:

Quote
CENTRAL_WALLET = '1jxc4KgRXCkn2JD7QjmgMrDKqM2yQtPAp'   # local bitcoin address where money goes

(DO NOT USE THE WALLET ADDRESS IN THE ABOVE LINE)[/font]

The address MUST have the '' chars around it like above.

should the address be bounded by ' or " ?
jspielberg
Sr. Member
****
Offline Offline

Activity: 490
Merit: 255



View Profile
July 01, 2013, 07:12:59 PM
 #100

i think i just noted an inconsistency in the tute:

Quote
CENTRAL_WALLET = '1jxc4KgRXCkn2JD7QjmgMrDKqM2yQtPAp'   # local bitcoin address where money goes

(DO NOT USE THE WALLET ADDRESS IN THE ABOVE LINE)[/font]

The address MUST have the '' chars around it like above.

should the address be bounded by ' or " ?

No inconsistency... just misleading with a proportional space font... the '' is actually two single 's real close together.

Personally I found this pool easier to setup than eligius... plus slush has a status webpage which is nice.
Pages: « 1 2 3 4 [5] 6 7 8 9 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!