Pages:
Author

Topic: Pushpool - Tech Support - page 17. (Read 135257 times)

sr. member
Activity: 448
Merit: 250
July 03, 2011, 02:21:53 PM
Alright SQL problem fixed now - didnt realize postgres has it's own way of placeholding. 

Going to reinstall memcached shortly Sad but, all just seems wierd - there no way to get more verbose logging out of pushpoold as to why it's not liking memcached? What verison of memcached does it definatly work OK with?
full member
Activity: 434
Merit: 101
July 03, 2011, 02:01:07 PM
I would apt-remove memcached, and see if a custom built memcached works.  I had trouble with my setup and using the old libs and binary.  Although Im on kernel 2.6.37.6  I don't believe any placeholder has been changed ive been able to compile and run pushpool since 0.4 without issue.   You can get the src for memcached at http://memcached.org/  though if it compiled it may not end up being a memcached issue. 
sr. member
Activity: 448
Merit: 250
July 03, 2011, 01:55:15 PM
Are you running the daemon on the same machine?  What distro is this?   What version of memcached are you using as well?  I know debian when you install memcached it starts up at boot so no need to invoke it by memcached -u (username).   Depending on the version you are using you could build a new package.  If pushpool is running it leads me to believe this is either a database issue or and rpc connection error.   Im using memcached 1.4.5

Well, with memcached commented out - it runs + authenticates.

I am on Debian lenny,

Linux version 2.6.26-2-amd64 (Debian 2.6.26-26lenny2) ([email protected]) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Tue Jan 25 05:59:43 UTC 2011
pushpool@kokade:~/pushpool/sbin$ memcached -h
memcached 1.2.2

Any ideas? Really want memcached running.

And a new, second problem (when running without memcached), and a miner submits a share, I get this error.
 pg_sharelog failed: ERROR:  syntax error at or near ","
LINE 1: ..., reason, solution) VALUES (nextval('share_seq'),?,?,?,?,?,?...

Settings:
Quote
"SELECT password  from worker where account_username || '.' || password = $1",

#"stmt.sharelog":"insert into share (id,ourresult,reason,remotehost,solution, updatestreamresult, account_username) VALUES (nextval('share_seq'),?,?,?,?,?,?)"

"stmt.sharelog":"insert into share (id,rem_host, username, our_result, upstream_result, reason, solution) VALUES (nextval('share_seq'),?,?,?,?,?,?)"
},

If I connect via psql on command line, and run
insert into share (id,ourresult,reason,remotehost,solution, updatestreamresult, account_username) VALUES (nextval('share_seq'),NULL,NULL,NULL,NULL,NULL,NULL)
it works fine - has something changed in regards to the placeholders for sharelog since page #1 on this thread was made?

full member
Activity: 434
Merit: 101
July 03, 2011, 01:22:30 PM
Are you running the daemon on the same machine?  What distro is this?   What version of memcached are you using as well?  I know debian when you install memcached it starts up at boot so no need to invoke it by memcached -u (username).   Depending on the version you are using you could build a new package.  If pushpool is running it leads me to believe this is either a database issue or and rpc connection error.   Im using memcached 1.4.5
sr. member
Activity: 448
Merit: 250
July 03, 2011, 12:59:10 PM
Last bitta info before anyone can help, i've got a little further, but now completely stumped.  It's a memcache issue by the looks of things.

It works fine w/out memcached

If I run memcached as current user, with "memcached -u pushpool -p 10000", and configure pushpool accordingly, it hangs. Same if I configure it to use the "servers" one which runs as demon on port 11211.

memcached output: (ran with -vv)

slab class   2: chunk size    120 perslab  8738
slab class   3: chunk size    152 perslab  6898
slab class   4: chunk size    192 perslab  5461
slab class   5: chunk size    240 perslab  4369
slab class   6: chunk size    304 perslab  3449
slab class   7: chunk size    384 perslab  2730
slab class   8: chunk size    480 perslab  2184
slab class   9: chunk size    600 perslab  1747
slab class  10: chunk size    752 perslab  1394
slab class  11: chunk size    944 perslab  1110
slab class  12: chunk size   1184 perslab   885
slab class  13: chunk size   1480 perslab   708
slab class  14: chunk size   1856 perslab   564
slab class  15: chunk size   2320 perslab   451
slab class  16: chunk size   2904 perslab   361
slab class  17: chunk size   3632 perslab   288
slab class  18: chunk size   4544 perslab   230
slab class  19: chunk size   5680 perslab   184
slab class  20: chunk size   7104 perslab   147
slab class  21: chunk size   8880 perslab   118
slab class  22: chunk size  11104 perslab    94
slab class  23: chunk size  13880 perslab    75
slab class  24: chunk size  17352 perslab    60
slab class  25: chunk size  21696 perslab    48
slab class  26: chunk size  27120 perslab    38
slab class  27: chunk size  33904 perslab    30
slab class  28: chunk size  42384 perslab    24
slab class  29: chunk size  52984 perslab    19
slab class  30: chunk size  66232 perslab    15
slab class  31: chunk size  82792 perslab    12
slab class  32: chunk size 103496 perslab    10
slab class  33: chunk size 129376 perslab     8
slab class  34: chunk size 161720 perslab     6
slab class  35: chunk size 202152 perslab     5
slab class  36: chunk size 252696 perslab     4
slab class  37: chunk size 315872 perslab     3
slab class  38: chunk size 394840 perslab     2
slab class  39: chunk size 493552 perslab     2
<3 server listening
<7 new client connection

--And now everything hangs, nothing sent back to miner or client at this point--

--If I kill memcached this is the output--

^CSIGINT handled.
pushpoold: libmemcached/io.cc:356: memcached_return_t memcached_io_read(memcached_server_st*, void*, size_t, ssize_t*): Assertion `0' failed.
pushpool@kokade:~/pushpool/sbin$

And then, pushpoold also falls over.

So yeah, that's what i've nailed it down to, but, cant seem to get any further? I dont like the idea of running this without memcached :S


sr. member
Activity: 448
Merit: 250
July 03, 2011, 12:06:10 PM
Seems even wierder, as, first time i connect to it i do "get /" and it gives me back the 400 bad req, then, going forward, it just hangs.
sr. member
Activity: 448
Merit: 250
July 03, 2011, 11:51:04 AM
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
full member
Activity: 434
Merit: 101
July 03, 2011, 11:44:55 AM
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
member
Activity: 724
Merit: 87
July 01, 2011, 08:32:29 PM
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!
sr. member
Activity: 448
Merit: 250
July 03, 2011, 11:31:58 AM
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.
full member
Activity: 434
Merit: 101
July 02, 2011, 03:23:03 PM
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> (:[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.
member
Activity: 724
Merit: 87
July 01, 2011, 06:54:22 PM
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)
full member
Activity: 154
Merit: 102
July 02, 2011, 02:06:44 PM
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> (:[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
member
Activity: 724
Merit: 87
July 01, 2011, 06:30:45 PM
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.

full member
Activity: 154
Merit: 102
July 02, 2011, 10:49:35 AM
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.
full member
Activity: 434
Merit: 101
July 01, 2011, 08:34:28 PM
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
member
Activity: 724
Merit: 87
July 01, 2011, 06:56:52 AM
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......
full member
Activity: 434
Merit: 101
July 01, 2011, 08:30:18 PM
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   
newbie
Activity: 28
Merit: 0
July 01, 2011, 10:49:03 AM
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?
sr. member
Activity: 280
Merit: 252
July 01, 2011, 01:18:15 AM
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?
Pages:
Jump to: