Bitcoin Forum
June 28, 2024, 04:28:43 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Problems setting up mining Pool  (Read 1103 times)
Vl4dim1r (OP)
Member
**
Offline Offline

Activity: 82
Merit: 10


View Profile WWW
April 25, 2013, 06:20:09 AM
 #1

Hey, I have been trying to get a pool running since last Wednesday. I am using bitcoind and pushpoold on Kubuntu 12.10. I installed bitcoind through apt-get, and compiled pushpoold from source. My pushpoold database is configured and seemingly working, the server.json appears to be correct, and my bitcoin.conf also appears to be correct. I am trying to set up a pool for myself and a friend. I work at a multi-billion dollar manufacturing plant, and already have the "OK", to use the plant's workstation computers as bitcoin mining rigs, from the IT staff. After about 5 minutes of running, I get this:

Code:
brad@Pool:~$ bitcoind


************************
EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEEE
Address already in use
bitcoin in ThreadRPCServer()

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  Address already in use
Aborted (core dumped)


My current configuration for bitcoind:

Code:

rpcuser=username
rpcpassword=password
rpcport=8332
server=1
rpcallowip = *.*.*.*


Before I started receiving this error, I was getting "Http 500" errors, and "JSON Upstream failed" errors from pushpoold. In an attempt to simplify the config I went from the configuration below to the one above.

Code:
 # bitcoin.conf configuration file. Lines beginning with # are comments.


 # Network-related settings:

 # Run on the test network instead of the real bitcoin network.
 #testnet=0

 # Connect via a socks4 proxy
 #proxy=127.0.0.1:9050

 ##############################################################
 ##            Quick Primer on addnode vs connect            ##
 ##  Let's say for instance you use addnode=4.2.2.4          ##
 ##  addnode will connect you to and tell you about the      ##
 ##    nodes connected to 4.2.2.4.  In addition it will tell ##
 ##    the other nodes connected to it that you exist so     ##
 ##    they can connect to you.                              ##
 ##  connect will not do the above when you 'connect' to it. ##
 ##    It will *only* connect you to 4.2.2.4 and no one else.##
 ##                                                          ##
 ##  So if you're behind a firewall, or have other problems  ##
 ##  finding nodes, add some using 'addnode'.                ##
 ##                                                          ##
 ##  If you want to stay private, use 'connect' to only      ##
 ##  connect to "trusted" nodes.                             ##
 ##                                                          ##
 ##  If you run multiple nodes on a LAN, there's no need for ##
 ##  all of them to open lots of connections.  Instead       ##
 ##  'connect' them all to one node that is port forwarded   ##
 ##  and has lots of connections.                            ##
 ##       Thanks goes to [Noodle] on Freenode.               ##
 ##############################################################

 # Use as many addnode= settings as you like to connect to specific peers
 #addnode=69.164.218.197
 #addnode=10.0.0.2:8333

 # ... or use as many connect= settings as you like to connect ONLY
 # to specific peers:
 #connect=69.164.218.197
 #connect=10.0.0.1:8333

 # Do not use Internet Relay Chat (irc.lfnet.org #bitcoin channel) to
 # find other peers.
 noirc=0

 # Maximum number of inbound+outbound connections.
 maxconnections=150


 # JSON-RPC options (for controlling a running Bitcoin/bitcoind process)

 # server=1 tells Bitcoin-QT to accept JSON-RPC commands.
 server=1

 # You must set rpcuser and rpcpassword to secure the JSON-RPC api
 rpcuser=username
 rpcpassword=password

 # How many seconds bitcoin will wait for a complete RPC HTTP request.
 # after the HTTP connection is established.
 rpctimeout=60

 # By default, only RPC connections from localhost are allowed.  Specify
 # as many rpcallowip= settings as you like to allow connections from
 # other hosts (and you may use * as a wildcard character):
 #rpcallowip=10.1.1.34
 #rpcallowip=192.168.1.*
 rpcallowip=*.*.*.*

 # Listen for RPC connections on this TCP port:
 rpcport=8332

 # You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind
 # running on another host using this option:
 #rpcconnect=127.0.0.1


 # Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
 # with Bitcoin -server or bitcoind
 #rpcssl=1

 # OpenSSL settings used when rpcssl=1
 #rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
 #rpcsslcertificatechainfile=server.cert
 #rpcsslprivatekeyfile=server.pem


 # Miscellaneous options

 # Set gen=1 to attempt to generate bitcoins
 #gen=0

 # Use SSE instructions to try to generate bitcoins faster.
 #4way=1

 # Pre-generate this many public/private key pairs, so wallet backups will be valid for
 # both prior transactions and several dozen future transactions.
 keypool=150

 # Pay an optional transaction fee every time you send bitcoins.  Transactions with fees
 # are more likely than free transactions to be included in generated blocks, so may
 # be validated sooner.
 paytxfee=0.01

 # Allow direct connections for the 'pay via IP address' feature.
 #allowreceivebyip=1

 # User interface options

 # Start Bitcoin minimized
 #min=0

 # Minimize to the system tray
 #minimizetotray=0

Can anyone point me in teh right direction as to what I'm doing wrong? Also this is my pushpool config (server.json)

Code:
{
        # network ports
        "listen" : [
                # binary protocol (default), port 8335
                { "port" : 8335 },

                # HTTP JSON-RPC protocol, port 8336
                { "port" : 8336, "protocol" : "http-json" },

                # HTTP JSON-RPC protocol, port 8337,
                # with trusted proxy appserver.example.com forwarding
                # requests to us
                { "port" : 8337, "protocol" : "http-json",
                  "proxy" : "127.0.0.1" },

                # binary protocol, localhost-only port 8338
                { "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
        ],

        # database settings
        "database" : {
                "engine" : "mysql",
                "host" : "192.168.1.11",
                "port" : 3306,
                "name" : "Mining_Pool",
                "username" : "SQLUsername",
                "password" : "SQLPassword",
                "sharelog" : true,
                "stmt.pwdb":"SELECT `password` FROM `pool_worker` WHERE `username` = ?",
                "stmt.sharelog":"INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?$

        },

        # cache settings
        "memcached" : {
                "servers" : [
                        { "host" : "127.0.0.1", "port" : 11211 }
                ]
        },

        "pid" : "/tmp/pushpoold.pid",

        # overrides local hostname detection
        "forcehost" : "localhost.localdomain",

        "log.requests" : "/tmp/request.log",
        "log.shares" : "/tmp/shares.log",

        # the server assumes longpolling (w/ SIGUSR1 called for each blk)
        "longpoll.disable" : false,

        # length of time to cache username/password credentials, in seconds
        "auth.cred_cache.expire" : 75,

        # RPC settings | Notice how this ISN'T port number 8332 this is becuase the same    port number should not becuase inconjunc$
        "rpc.url" : "http://127.0.0.1:8332",
        "rpc.user" : "username",
        "rpc.pass" : "password",

        # rewrite returned 'target' to difficulty-1?
        "rpc.target.rewrite" : true
}

Thanks for reading, and I hope to hear from someone soon.







Tips/Payments: 12DXk6FeU1JmKwCyCTJDdwUNKGV8hvZTep
theblazehen
Full Member
***
Offline Offline

Activity: 194
Merit: 100



View Profile
April 25, 2013, 07:41:49 AM
 #2

While I can't solve your problems with the pool , I would reccomend setting up a p2pool node. Also scrypt based coins, eg litecoin, are more profitable to mine - source: dust coin.com

BURST: BURST-ZRT2-GB5S-A6CS-HBVAE
KALRONG
Newbie
*
Offline Offline

Activity: 52
Merit: 0



View Profile WWW
April 25, 2013, 09:04:47 AM
 #3

Hi,

Im also doing my frist attemps with bitcoind and pushpool but in debian instead of Kubuntu hehehe

First to say, you must wait for bitcoind to get all the blockchain or you are gonna face problems like the 500 one (I also had it when I tried the pool at when bitcoind was still updating).

Now lets see some comments about the configurations Smiley

bitcoin.conf:

Here I only need to say that I have the same configuration but in rpcallowip I have just one * instead of *.*.*.*

server.json:

On this one I see that you modified the ports you have 8335-8338, Im my case I use from 8336-8338 BUT Im not using the trusted proxy forwarding.

Another difference is that you are using sharelog with an sql call, a problem I have been facing is that the inserts in mysql didn't appear in the db without doing a commit after them.


Thats all from the config files side, shouldn't be very helpfull but Im trying to provide enough information Smiley

About the problem you have with that exception what I interpret could be two things: the wallet address is already in use (try cleaning up the bitcoin.dat if you dont have any bitcoins on it) or that is a network related problem.

In the second case you can check first if there is another instance of bitcoind running (in case you don't know, in terminal "ps -A | grep bitcoind"), if something else is using the port 8332 using netstats, or changing the rpcallowip that I told you before.

You can also try adding the flag -debug that will give you all the work the servers is doing and simply redirect it to a file:

"bitcoind -debug > bitcoin.log"

Hope this will help you, I will be happy to continue helping you troubleshooting the issue as nobody knows when one of us will face the same problem Smiley

Best regards!
Vl4dim1r (OP)
Member
**
Offline Offline

Activity: 82
Merit: 10


View Profile WWW
April 25, 2013, 10:23:28 AM
 #4

Thank you for the info! I did the things you suggested such as changing the rpcallowip and seeing if another instance is using the port with
Code:
 ps -A | grep bitcoind

I also backed up my .bitcoin folder, and started fresh, only keeping the configuration. Still have the same issue. I struggled with the database not conencting before I got to this error, so I'm pretty sure it is working. It had gotten as far as the RPC Upstream failure error that, I think, means bitcoind isn't talking to pushpoold.

As far as the scrypt-based currencies go. How easy would it be to set up a pool for those? I have been concidering them but wasn't sure if they're worth going for.

Tips/Payments: 12DXk6FeU1JmKwCyCTJDdwUNKGV8hvZTep
KALRONG
Newbie
*
Offline Offline

Activity: 52
Merit: 0



View Profile WWW
April 25, 2013, 10:33:37 AM
 #5

I haven't tried other currencies apart of bitcoin sorry Sad

pushpool not comunicating with bitcoind? From what you posted the error was comming from bitcoind not pushpool, or did I interpret it wrong?

In any case, as I told you before bitcoind gets all the blockchain is quite messy to test things, I have two bitcoin instances working, one on windows for my solo mining and one in linux for the pool, when I try something as the linux one is not updated Im using the windows one (instead of connecting to localhost I connect to the windows server).

In any case, I will recommend to rung "bitcoind -debug" in one terminal and in another one try "bitcoind getinfo" this will give you the information the server is working with now. I also installed the bitcoind from apt BUT when you do the getinfo it asks you to update the client as that one have a security issue (not sure why they didn't update it yet in the repositories).

In the pushpool side, I suppose you used the .sql file to create the tables needed in the sql server, did you check the the user you set in the server.json have enough permisions to writte on it?

If you can copy the lines straight before the error while using the debug option in bitcoind we can try to figure out something else Smiley
KALRONG
Newbie
*
Offline Offline

Activity: 52
Merit: 0



View Profile WWW
April 25, 2013, 10:43:57 AM
 #6

I just checked a little bit more over some chat logs about this issue, looks like it usually happens on windows xp, not the case, also looks like a problem with old client versions (what I said before about updating the client just in case). Also I saw comments about this happening when you have two instances of bitcoind running (we already checked this).

I would recommend downloading last sources of bitcoind client and compiling them manually, always best to have the latest version hehe
Vl4dim1r (OP)
Member
**
Offline Offline

Activity: 82
Merit: 10


View Profile WWW
April 25, 2013, 05:31:03 PM
Last edit: April 26, 2013, 06:05:07 AM by Vl4dim1r
 #7

Bitcoind wasn't replying to PushPool before the problem I'm having now. Also, as to the
Code:
./bitcoind -debug > bitcoind.log
It creates the file but doesn't write anything to it. I built the database from the .sql, and I know the permissions are correct because that's the issue I had before receiving the Json upstream errors from pushpool, and I solved those.

Configuring a fresh bitcoind now



In reference to Litecoin mining: I can't find a definitive guide for running a pool. Is it pretty much the same, as in using lightcoind with pushpool?



***Update***

So I downloaded the master source from https://github.com/bitcoin/bitcoin, ran this
Code:
 make -f makefile.unix
And ended up with this:
Code:
make[1]: Leaving directory `/home/brad/bitcoin/bitcoin/bitcoin-master/src/leveldb'
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/brad/bitcoin/bitcoin/bitcoin-master/src -I/home/brad/bitcoin/bitcoin/bitcoin-master/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/brad/bitcoin/bitcoin/bitcoin-master/src/leveldb/include -I/home/brad/bitcoin/bitcoin/bitcoin-master/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/alert.d -o obj/alert.o alert.cpp
alert.cpp:6:53: fatal error: boost/algorithm/string/classification.hpp: No such file or directory
compilation terminated.
make: *** [obj/alert.o] Error 1



**Update2***
I decided t work with litecoins, seeing as it's more profitable to work with them now, especially since I'm using CPuminers. I'm fairly certain i have everything set up correctly and running. litecoin-qt has synced with the blockchain, pushpool is running, and I have a remote miner connected to the pushpool url. Pushpool isn't displaying anything other than:
Code:
[2013-04-26 05:31:35.590186] Listening on host :: port 9335
[2013-04-26 05:31:35.599874] Listening on host :: port 9336
[2013-04-26 05:31:35.601455] Listening on host :: port 9337
[2013-04-26 05:31:35.612183] Listening on host 127.0.0.1 port 9338
[2013-04-26 05:31:35.762672] initialized

Litecoin-QT isn't showing any activity, and my CPUminer is displaying:
Code:
"Starting CPUMiner"
[2013-04-26 00:47:03] 2 miner threads started, using 'scrypt' algorithm.
[2013-04-26 00:47:03] Long-polling activated for http://psymonkey.net:9337/LP
[2013-04-26 00:47:04] thread 1: 4096 hashes, 4.25 khash/s
[2013-04-26 00:47:04] thread 0: 4096 hashes, 4.25 khash/s
[2013-04-26 00:48:03] thread 1: 250628 hashes, 4.25 khash/s
[2013-04-26 00:48:03] thread 0: 250628 hashes, 4.24 khash/s
[2013-04-26 00:49:03] thread 1: 255168 hashes, 4.28 khash/s
[2013-04-26 00:49:03] thread 0: 254392 hashes, 4.26 khash/s
[2013-04-26 00:50:03] thread 1: 256940 hashes, 4.28 khash/s
[2013-04-26 00:50:03] thread 0: 255876 hashes, 4.25 khash/s
[2013-04-26 00:51:03] thread 0: 255064 hashes, 4.27 khash/s
[2013-04-26 00:51:04] thread 1: 256752 hashes, 4.26 khash/s
[2013-04-26 00:51:46] thread 0: 180156 hashes, 4.23 khash/s
[2013-04-26 00:51:46] thread 1: 178320 hashes, 4.23 khash/s
[2013-04-26 00:52:46] thread 0: 253704 hashes, 4.26 khash/s
[2013-04-26 00:52:46] thread 1: 253552 hashes, 4.25 khash/s
[2013-04-26 00:53:45] thread 1: 254824 hashes, 4.28 khash/s
[2013-04-26 00:53:46] thread 0: 255396 hashes, 4.25 khash/s
[2013-04-26 00:54:44] thread 0: 250820 hashes, 4.27 khash/s
[2013-04-26 00:54:45] thread 1: 256944 hashes, 4.28 khash/s
[2013-04-26 00:55:45] thread 0: 256288 hashes, 4.27 khash/s
[2013-04-26 00:55:45] thread 1: 256964 hashes, 4.29 khash/s
[2013-04-26 00:56:28] thread 0: 184488 hashes, 4.25 khash/s
[2013-04-26 00:56:28] thread 1: 182692 hashes, 4.26 khash/s
[2013-04-26 00:57:28] thread 0: 255300 hashes, 4.27 khash/s
[2013-04-26 00:57:28] thread 1: 255804 hashes, 4.26 khash/s
[2013-04-26 00:58:28] thread 1: 255896 hashes, 4.29 khash/s
[2013-04-26 00:58:28] thread 0: 256300 hashes, 4.27 khash/s
[2013-04-26 00:59:28] thread 1: 257180 hashes, 4.29 khash/s
[2013-04-26 00:59:28] thread 0: 255972 hashes, 4.27 khash/s
[2013-04-26 01:00:28] thread 0: 255924 hashes, 4.28 khash/s
[2013-04-26 01:00:28] thread 1: 257480 hashes, 4.29 khash/s
[2013-04-26 01:01:11] thread 1: 181152 hashes, 4.29 khash/s
[2013-04-26 01:01:11] thread 0: 180472 hashes, 4.28 khash/s
[2013-04-26 01:02:11] thread 0: 256512 hashes, 4.28 khash/s
[2013-04-26 01:02:11] thread 1: 257476 hashes, 4.29 khash/s
[2013-04-26 01:03:11] thread 1: 257568 hashes, 4.29 khash/s
[2013-04-26 01:03:11] thread 0: 256744 hashes, 4.27 khash/s
[2013-04-26 01:04:11] thread 0: 255928 hashes, 4.28 khash/s
[2013-04-26 01:04:11] thread 1: 257448 hashes, 4.29 khash/s
[2013-04-26 01:05:11] thread 1: 257540 hashes, 4.28 khash/s
[2013-04-26 01:05:11] thread 0: 256788 hashes, 4.27 khash/s
[2013-04-26 01:05:53] thread 0: 178300 hashes, 4.27 khash/s
[2013-04-26 01:05:53] thread 1: 179108 hashes, 4.29 khash/s
[2013-04-26 01:06:53] thread 1: 257360 hashes, 4.29 khash/s
[2013-04-26 01:06:53] thread 0: 256200 hashes, 4.27 khash/s
[2013-04-26 01:07:53] thread 0: 255944 hashes, 4.27 khash/s
[2013-04-26 01:07:53] thread 1: 257380 hashes, 4.28 khash/s
[2013-04-26 01:09:00] thread 1: 256980 hashes, 3.83 khash/s

Does this mean everything is working?



Tips/Payments: 12DXk6FeU1JmKwCyCTJDdwUNKGV8hvZTep
KALRONG
Newbie
*
Offline Offline

Activity: 52
Merit: 0



View Profile WWW
April 26, 2013, 08:35:25 AM
 #8

About the problem of the bitcoin not compiling, try doing a simple make without flags, should work fine.


Configuring pushpool with litecoind is the same as with bitcoind, just need to do a few changes that you can find around on the forum.


Its working, in the litecoind you will not see anything (as you dont see it on bitcoind) you should check the logs from pushpool but the miner is getting work done.
Vl4dim1r (OP)
Member
**
Offline Offline

Activity: 82
Merit: 10


View Profile WWW
April 26, 2013, 07:10:39 PM
 #9

Even though lightcoin-qt doesn't show the activity, will it show the litecoins mined? Also, how can I tell what my pool's total hasrate is? Or is that all handled by the frontend?\

Tips/Payments: 12DXk6FeU1JmKwCyCTJDdwUNKGV8hvZTep
KALRONG
Newbie
*
Offline Offline

Activity: 52
Merit: 0



View Profile WWW
April 28, 2013, 12:20:59 PM
 #10

The total hasrate is done by the frontend, you can try simplecoin, is the one im setting right now with bitcoin and im gonna try to use it too for litecoins. You can also try checking on the database and create your own script I remenber reading somewhere in the forum of how to do it hehe

About litecoin-qt not sure about whats gonna say, what I usually do with bitcoind is check in blockchain.info if there is something, in any case if you find a block it will appear in the litecoin-qt balance of the wallet Smiley in any case the miner you use on the clients should show you a message saying that it have accepted the block (In cgminer for example for bitcoins is says to me that the share is below target when its wrong).
Pages: [1]
  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!