Bitcoin Forum
December 05, 2016, 12:56:27 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 »
  Print  
Author Topic: Pushpool - Tech Support  (Read 126700 times)
smoothie
Legendary
*
Offline Offline

Activity: 1834


LEALANA Monero Physical Silver Coins


View Profile
June 30, 2011, 09:09:14 AM
 #241

Because either the db engine you specified in the server.json file is spelled wrong OR you didn't install the said engine. I.e mysql,sqlite or postgresql

Also if you take a look in my server.json file you will see I put "mysql" under engine:

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

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

      # HTTP JSON-RPC protocol, port 8344,
      #proxy is most likely your external ip address if your running a public pool | Public pools WON'T have the following ip addresses: (10.0.0.1, 127.0.0.1, 192.168.1.100, or 192.168.254.254,etc,etc)
      # requests to us | "proxy" should be set to your ip address that people will connect through
      { "port" : 8344, "protocol" : "http-json",
        "proxy" : "208.111.40.205" },

      # binary protocol, localhost-only port 8338
      # host is most likely your localhost address
      { "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
   ],

   # database settings
   "database" : {
      "engine" : "mysql",

      "host" : "localhost",

      "port" : 3306,

      #database name
      "name" : "pushpool",
      #database username
      "username" : "root",
      #database password
      "password" : "xxxxxxxx",
      #enable sharelog | to insert share data or sometimes known as "work"
      "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 (?, ?, ?, ?, ?, ?)"

   },

   #uncoment this when you want to use memcached (Recommended for servers over 1.5gb of ram)
   # 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
   #Bitcoind Protocal settings
   #Host were bitcoind can be found on the network
   "rpc.url" : "http://127.0.0.1:8332/",
   #Username & password to connect to bitcoind
   "rpc.user" : "user",
   "rpc.pass" : "pass",

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

███████████████████████████████████████

            ,╓p@@███████@╗╖,           
        ,p████████████████████N,       
      d█████████████████████████b     
    d██████████████████████████████æ   
  ,████²█████████████████████████████, 
 ,█████  ╙████████████████████╨  █████y
 ██████    `████████████████`    ██████
║██████       Ñ███████████`      ███████
███████         ╩██████Ñ         ███████
███████    ▐▄     ²██╩     a▌    ███████
╢██████    ▐▓█▄          ▄█▓▌    ███████
 ██████    ▐▓▓▓▓▌,     ▄█▓▓▓▌    ██████─
           ▐▓▓▓▓▓▓█,,▄▓▓▓▓▓▓▌          
           ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌          
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓─  
     ²▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╩    
        ▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀       
           ²▀▀▓▓▓▓▓▓▓▓▓▓▓▓▀▀`          
                   ²²²                 
███████████████████████████████████████

. ★☆ WWW.LEALANA.COM        My PGP fingerprint is A764D833.        SMOOTHIE'S HEALTH AND FITNESS JOURNAL          History of Monero development Visualization ★☆ .
LEALANA  PHYSICAL MONERO COINS 999 FINE SILVER.
 
1480942587
Hero Member
*
Offline Offline

Posts: 1480942587

View Profile Personal Message (Offline)

Ignore
1480942587
Reply with quote  #2

1480942587
Report to moderator
1480942587
Hero Member
*
Offline Offline

Posts: 1480942587

View Profile Personal Message (Offline)

Ignore
1480942587
Reply with quote  #2

1480942587
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480942587
Hero Member
*
Offline Offline

Posts: 1480942587

View Profile Personal Message (Offline)

Ignore
1480942587
Reply with quote  #2

1480942587
Report to moderator
elmigranto
Newbie
*
Offline Offline

Activity: 8


View Profile WWW
June 30, 2011, 12:57:00 PM
 #242

Is someone actually using BIN protocol with it? I think I've found a bug in cjson_decode() (from server.c).
More info in this post: http://forum.bitcoin.org/index.php?topic=24257.msg306480#msg306480
Please prove me right (or wrong).

I'm sorry I can't hear you over the sound of how awesome I am.
zapnap
Newbie
*
Offline Offline

Activity: 5


View Profile
June 30, 2011, 06:06:10 PM
 #243

So I patched pushpool to compile on OS X, which jgarzik was kind enough to pull into the master branch. However, I'm still having an issue with it that hopefully someone can help me with.

It seems that pushpool initializes, and binds to a port (as defined in the config) but then immediately dies on me. Has anyone experienced similar problems? Ratcheting the logging up to the max level and using -E to redirect stderr reveals no additional information.

Also, a database schema question... it appears that the intent is that the password column should be plaintext. Is there an explicit design reason for this? Wouldn't it be far better to encrypt the values stored there and run a database PASSWORD() function to check the match?

Cheers,

..nap
sakkaku
Member
**
Offline Offline

Activity: 70



View Profile WWW
June 30, 2011, 07:22:47 PM
 #244

Also, a database schema question... it appears that the intent is that the password column should be plaintext. Is there an explicit design reason for this? Wouldn't it be far better to encrypt the values stored there and run a database PASSWORD() function to check the match?

Yes.  Theoretically it could pass the username and password and at least let you have access to the databases sha and md5 functions.  >_<

Anyone listening to the HTTP requests would be able to extract the passwords also.  You just need to look in the headers and base64decode it.

In any case you should have separate miner and account passwords.

13NiQcetcioQj3YwHL1ZWvgQg8eAjkzUdt
Blog/Projects: zxlu.com | syn-multiminer
zapnap
Newbie
*
Offline Offline

Activity: 5


View Profile
June 30, 2011, 07:28:03 PM
 #245

In any case you should have separate miner and account passwords.

Of course Smiley. Just seemed strange not to apply a base level of security to the worker passwords as well (particularly since so many users re-use passwords).
gnaget
Member
**
Offline Offline

Activity: 112


View Profile
July 01, 2011, 12:40:07 AM
 #246

Thank you for the succinct guide to setting up this software.  I got it running, but I can't connect...  I'm running the pooling software for my farm, I have 7 linux miners (dhcp ip addresses in 192.168.1.150-199 range).  I have a windows server at 192.168.1.2 which is running bitcoin with server=1 and port=8331.  I have btcproxy running under IIS on that server, port 8332.  Pushpool is running on an ubuntu virtual machine on the server.  So basically:

Linux Miner -> BTC Proxy (192.168.1.2:8332) -> pushpool (192.168.1.3:8332) -> bitcoin (192.168.1.2:8331)

my server.json file:
Code:
{
   # network ports
   "listen" : [
      # binary protocol (default), port 8342
      { "port" : 8342 },

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

      # HTTP JSON-RPC protocol, port 8344
      { "port" : 8332, "protocol" : "http-json",
        "proxy" : "192.168.1.3" },

      # binary protocol, localhost-only port 8338
      # host is most likely your localhost address
      { "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
   ],

   # database settings
   "database" : {
      "engine" : "mysql",

      "host" : "localhost",

      "port" : 3306,

      #database name
      "name" : "pushpool",
      #database username
      "username" : "<mysql_username>",
      #database password
      "password" : "<mysql_password>",
      #enable sharelog | to insert share data or sometimes known as "work"
      "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 (?, ?, ?, ?, ?, ?)"

   },

   #uncoment this when you want to use memcached (Recommended for servers over 1.5gb of ram)
   # cache settings
   #"memcached" : {
   #   "servers" : [
   #      { "host" : "127.0.0.1", "port" : 11211 }
   #   ]
   #},

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

   # overrides local hostname detection
   "forcehost" : "miner.pedanticstoner.com",

   "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
   #Bitcoind Protocal settings
   #Host were bitcoind can be found on the network
   "rpc.url" : "http://192.168.1.2:8331/",
   #Username & password to connect to bitcoind
   "rpc.user" : "<my_username>",
   "rpc.pass" : "<my_password>",

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

On BTC Proxy, I have a pool setup: http://192.168.1.3:8332, however I get an error that no pools are available.  

My biggest concern is the proxy ip address is not listed on pushpoold startup:
Code:
gnaget@miner:~/pushpool/sbin$ ./pushpoold -E
gnaget@miner:~/pushpool/sbin$ [2011-07-01 00:43:10.534775] Listening on host :: port 8342
[2011-07-01 00:43:10.535194] Listening on host :: port 8347
[2011-07-01 00:43:10.535325] Listening on host :: port 8332
[2011-07-01 00:43:10.535429] Listening on host 127.0.0.1 port 8338
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280


View Profile
July 01, 2011, 06:18:15 AM
 #247

QUESTION: is /tmp/shares.log and /tmp/request.log entirely necessary? Under what circumstances would one require those files? I assume they would become quite massive in a short amount of time.

Send SIGHUP to the process, to re-open the logs (such as after rotation or deletion).



Why even create them at all though to begin with I guess is my question? If you are already making exact copies of them in your mysql database that you can clean by "timestamp" much easier?

If I simply remove those two lines from the server.json file, is everything going to explode?
Bullethead21
Jr. Member
*
Offline Offline

Activity: 43



View Profile
July 01, 2011, 11:56:52 AM
 #248

Any idea why my stats will not update (running the Mining Farm V2)? I have looked into the most common errors like typos and others and everthing is correct as far as I can tell. I looked at the mysql database and the shares table is populated with data from the mining clients so it seems pushpool or a script is putting the info into the database, at least into the table called shares like the server.json file refers to....it just seems that the info is not being updated to the website stats pages...not sure where to look now or how to further troubleshoot the issue.....everything seems to work great except for statisitic pages......

frizzl
Newbie
*
Offline Offline

Activity: 28


View Profile
July 01, 2011, 03:49:03 PM
 #249

Any idea why my stats will not update (running the Mining Farm V2)? I have looked into the most common errors like typos and others and everthing is correct as far as I can tell. I looked at the mysql database and the shares table is populated with data from the mining clients so it seems pushpool or a script is putting the info into the database, at least into the table called shares like the server.json file refers to....it just seems that the info is not being updated to the website stats pages...not sure where to look now or how to further troubleshoot the issue.....everything seems to work great except for statisitic pages......

Do you have the cron jobs setup correctly?

1NtLm3jrRK2keDBMiBbTUvNetrkNuBV8hY
Bullethead21
Jr. Member
*
Offline Offline

Activity: 43



View Profile
July 01, 2011, 11:30:45 PM
 #250

I think I have narrowed the problem down to crontab....how can I make sure my crontab file is setup correctly? I have tried to search and have come up with several different ways to setup a crontab file....what exactly needs to be in the file for Ubuntu?

I created a file called cronjobs in /etc/cron.d

In the file I put the following ( I also put 2 other lines at 8 and 6 minutes for the other 2 cronjob files):

*/5 * * * * root /var/www/req/cronjobs/blockFound.php

I then ran sudo crontab -u root cronjobs to "enable" the file.....

Thanks for your help.


Bullethead21
Jr. Member
*
Offline Offline

Activity: 43



View Profile
July 01, 2011, 11:54:22 PM
 #251

Got a exit error code 126 in the syslog......

Jul  1 08:00:01 LINUXSERVER CRON[6274]: (root) CMD (/var/www/req/cronjob/blockUpdater.php)
Jul  1 08:00:01 LINUXSERVER CRON[6271]: (CRON) error (grandchild #6274 failed with exit status 126)
Jul  1 08:00:01 LINUXSERVER CRON[6280]: (root) CMD (/var/www/req/cronjob/statsUpdater.php)
Jul  1 08:00:01 LINUXSERVER CRON[6269]: (CRON) error (grandchild #6280 failed with exit status 126)
Jul  1 08:00:01 LINUXSERVER CRON[6279]: (root) CMD (/var/www/req/cronjob/blockFound.php)

d3c0n808
Member
**
Offline Offline

Activity: 113

Not Goxed


View Profile
July 02, 2011, 01:30:18 AM
 #252

Got a exit error code 126 in the syslog......

Jul  1 08:00:01 LINUXSERVER CRON[6274]: (root) CMD (/var/www/req/cronjob/blockUpdater.php)
Jul  1 08:00:01 LINUXSERVER CRON[6271]: (CRON) error (grandchild #6274 failed with exit status 126)
Jul  1 08:00:01 LINUXSERVER CRON[6280]: (root) CMD (/var/www/req/cronjob/statsUpdater.php)
Jul  1 08:00:01 LINUXSERVER CRON[6269]: (CRON) error (grandchild #6280 failed with exit status 126)
Jul  1 08:00:01 LINUXSERVER CRON[6279]: (root) CMD (/var/www/req/cronjob/blockFound.php)



First
crontab -e
then it will give you a vim windows to edit.
Make the cronjob look like this
*/5 * * * * php /var/www/req/cronjob/blockFound.php


your getting an error because linux will not execute a php file, you need to use php cli to execute the cronjob.php file   

60 GH/s BFL Single SC - Pre-Order Yours Today!
`````` Only $1299.99 - butterflylabs.com ``````
Bullethead21
Jr. Member
*
Offline Offline

Activity: 43



View Profile
July 02, 2011, 01:32:29 AM
 #253

Yep you are exactly correct sir, I fixed it by adding a path to the PHP5 executable and changing the line to PHP5.

Stats working now.....

Thanks!

d3c0n808
Member
**
Offline Offline

Activity: 113

Not Goxed


View Profile
July 02, 2011, 01:34:28 AM
 #254

Np i replied in the miningfarm thread but perhaps you didnt get it,  I know what its like to fight with crontab and have nothing work hahaha  also if running pushpoold make sure you modified your ulimit -n. 

Check ulimit by entering ulimit -n and it should spit out a number 1024 or so.  If its 1024 pushpoold will probably crash.  Depending on your distro you can set ulimit permanelty higher so it wont crash its because pushpoold has a lot of files open at one time from the shares, and linux will halt pushpoold if you excede that number

60 GH/s BFL Single SC - Pre-Order Yours Today!
`````` Only $1299.99 - butterflylabs.com ``````
gnaget
Member
**
Offline Offline

Activity: 112


View Profile
July 02, 2011, 03:49:35 PM
 #255

Still having the same problem (see above), I tried taking BTC Proxy out of the mix, and have the miner connect directly to pushpool server.  using the command line -u http://192.168.1.3:8332 I get unable to connect.  I get no additional output on the pushpool screen indicating any connection is being attempted.
gnaget
Member
**
Offline Offline

Activity: 112


View Profile
July 02, 2011, 07:06:44 PM
 #256

Ignore my prior question...  turns out, I'm an idiot and didn't setup the db correctly... 

Now, however, most certainly not being an idiot, I get an error trying to get long pooling to work (following the OP exactly)

Code:
gnaget@miner:~/pushpool/sbin$ ./blkmond blkmond.conf
send msg_version(nVersion=312 nServices=1 nTime=Sat Jul  2 14:04:37 2011 addrTo=CAddress(nServices=1 ip=127.0.0.1 port=8333) addrFrom=CAddress(nServices=1 ip=0.0.0.0 port=0) nNonce=0x7820B3CF681F2626 strSubVer=.4 nStartingHeight=-1)
connecting
error: uncaptured python exception, closing channel <__main__.NodeConn at 0xb70f2eac> (<class 'socket.error'>:[Errno 111] Connection refused [/usr/lib/python2.7/asyncore.py|read|79] [/usr/lib/python2.7/asyncore.py|handle_read_event|435] [/usr/lib/python2.7/asyncore.py|handle_connect_event|443])
close
d3c0n808
Member
**
Offline Offline

Activity: 113

Not Goxed


View Profile
July 02, 2011, 08:23:03 PM
 #257

Ignore my prior question...  turns out, I'm an idiot and didn't setup the db correctly... 

Now, however, most certainly not being an idiot, I get an error trying to get long pooling to work (following the OP exactly)

Code:
gnaget@miner:~/pushpool/sbin$ ./blkmond blkmond.conf
send msg_version(nVersion=312 nServices=1 nTime=Sat Jul  2 14:04:37 2011 addrTo=CAddress(nServices=1 ip=127.0.0.1 port=8333) addrFrom=CAddress(nServices=1 ip=0.0.0.0 port=0) nNonce=0x7820B3CF681F2626 strSubVer=.4 nStartingHeight=-1)
connecting
error: uncaptured python exception, closing channel <__main__.NodeConn at 0xb70f2eac> (<class 'socket.error'>:[Errno 111] Connection refused [/usr/lib/python2.7/asyncore.py|read|79] [/usr/lib/python2.7/asyncore.py|handle_read_event|435] [/usr/lib/python2.7/asyncore.py|handle_connect_event|443])
close


You need to change the blkmond.conf to the ip address of the bitcoin node, your server in this case.

60 GH/s BFL Single SC - Pre-Order Yours Today!
`````` Only $1299.99 - butterflylabs.com ``````
AndyRossy
Sr. Member
****
Offline Offline

Activity: 448


View Profile
July 03, 2011, 04:31:58 PM
 #258

What's going on, here, it just seems to hang when I request any work or connect to it

The debug messages arnt of much use either.


pushpool@kokade:~$ ./pushpoold -D=2 -E
pushpool@kokade:~$ [2011-07-03 16:28:7.180078] Listening on host :: port 8336
[2011-07-03 16:28:7.180286] Listening on host :: port 8337
[2011-07-03 16:28:7.180352] Listening on host 127.0.0.1 port 8338
[2011-07-03 16:28:7.196675] initialized


1) I can telnet to port 8337, and do a GET request (get back a 400) - server.json configures 8337 to be the port.
2) namecoind (what im trying to set up a pool) is running - from the machine running pushpool, I can telnet to the right port (8332), and a "GET /" rightfully gives me 401 unauth.  I've double checked the RPC password's are correct.

When I try to set a miner, to connect to the server, on potr 8337, it seems to connect and do nothing.

Any ideas? Or any ideas where I can get more verbose output? Also, the postgres to select user/password seems correct in json.
d3c0n808
Member
**
Offline Offline

Activity: 113

Not Goxed


View Profile
July 03, 2011, 04:44:55 PM
 #259

What's going on, here, it just seems to hang when I request any work or connect to it

The debug messages arnt of much use either.


pushpool@kokade:~$ ./pushpoold -D=2 -E
pushpool@kokade:~$ [2011-07-03 16:28:7.180078] Listening on host :: port 8336
[2011-07-03 16:28:7.180286] Listening on host :: port 8337
[2011-07-03 16:28:7.180352] Listening on host 127.0.0.1 port 8338
[2011-07-03 16:28:7.196675] initialized


1) I can telnet to port 8337, and do a GET request (get back a 400) - server.json configures 8337 to be the port.
2) namecoind (what im trying to set up a pool) is running - from the machine running pushpool, I can telnet to the right port (8332), and a "GET /" rightfully gives me 401 unauth.  I've double checked the RPC password's are correct.

When I try to set a miner, to connect to the server, on potr 8337, it seems to connect and do nothing.

Any ideas? Or any ideas where I can get more verbose output? Also, the postgres to select user/password seems correct in json.


Are you trying to connect over the internet or over a lan?  Is memcached running?  You can see if its running by entering the command ps aux|grep memcached

60 GH/s BFL Single SC - Pre-Order Yours Today!
`````` Only $1299.99 - butterflylabs.com ``````
AndyRossy
Sr. Member
****
Offline Offline

Activity: 448


View Profile
July 03, 2011, 04:51:04 PM
 #260

Trying both

pushpool@kokade:~$ curl --user admin.testt --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' http://127.0.0.1:8336
Enter host password for user 'admin.testt':
[2011-07-03 16:47:7.632542] client host ::ffff:127.0.0.1 port 56792 connected
curl: (52) Empty reply from server
pushpool@kokade:~$ curl --user admin.testt --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' http://127.0.0.1:8337
Enter host password for user 'admin.testt':
^C
pushpool@kokade:~$ curl --user admin.testt --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' http://127.0.0.1:8337
Enter host password for user 'admin.testt':

This is the output from local, it just hangs when I connect to 8337, locally or remote.



kokade:/etc# ps -ef | grep mem
root      9428  8347  0 18:48 pts/1    00:00:00 grep mem
nobody   20417     1  0 02:12 ?        00:00:01 /usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1


memcached is running, and I can access it on the port written in the conf (11211)


kokade:/etc# telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.


Also, the local namecoind RPC is working fine

pushpool@kokade:~$ curl --user namecoind --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' http://127.0.0.1:8332
Enter host password for user 'namecoind':
{"result":{"version":32151,"balance":0.00000000,"blocks":15214,"connections":8,"proxy":"","generate":false,"genproclimit":-1,"difficulty":55882.45237847,"hashespersec":0,"testnet":false,"keypoololdest":1309711291,"paytxfee":0.00000000,"errors":""},"error":null,"id":"curltest"}


Any more ideas? This is frustration! Sad
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!