Bitcoin Forum
April 20, 2024, 03:21:08 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
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 »
  Print  
Author Topic: Pushpool - Tech Support  (Read 135151 times)
elmigranto
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile WWW
June 30, 2011, 12:57:00 PM
Last edit: June 30, 2011, 04:49:19 PM by elmigranto
 #241

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).
1713583268
Hero Member
*
Offline Offline

Posts: 1713583268

View Profile Personal Message (Offline)

Ignore
1713583268
Reply with quote  #2

1713583268
Report to moderator
1713583268
Hero Member
*
Offline Offline

Posts: 1713583268

View Profile Personal Message (Offline)

Ignore
1713583268
Reply with quote  #2

1713583268
Report to moderator
1713583268
Hero Member
*
Offline Offline

Posts: 1713583268

View Profile Personal Message (Offline)

Ignore
1713583268
Reply with quote  #2

1713583268
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713583268
Hero Member
*
Offline Offline

Posts: 1713583268

View Profile Personal Message (Offline)

Ignore
1713583268
Reply with quote  #2

1713583268
Report to moderator
zapnap
Newbie
*
Offline Offline

Activity: 5
Merit: 0


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

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
Merit: 10



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

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
Merit: 0


View Profile
June 30, 2011, 07:28:03 PM
Last edit: June 30, 2011, 09:32:27 PM by zapnap
 #244

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).
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280
Merit: 252


View Profile
July 01, 2011, 06:18:15 AM
Last edit: July 01, 2011, 06:38:11 AM by gigabytecoin
 #245

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?
frizzl
Newbie
*
Offline Offline

Activity: 28
Merit: 0


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

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?
d3c0n808
Full Member
***
Offline Offline

Activity: 434
Merit: 101


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

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   
d3c0n808
Full Member
***
Offline Offline

Activity: 434
Merit: 101


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

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
gnaget
Full Member
***
Offline Offline

Activity: 154
Merit: 102


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

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
Full Member
***
Offline Offline

Activity: 154
Merit: 102


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

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
Full Member
***
Offline Offline

Activity: 434
Merit: 101


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

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.
AndyRossy
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250


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

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
Full Member
***
Offline Offline

Activity: 434
Merit: 101


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

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
AndyRossy
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250


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

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
AndyRossy
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250


View Profile
July 03, 2011, 05:06:10 PM
 #255

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.
AndyRossy
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250


View Profile
July 03, 2011, 05:59:10 PM
 #256

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


d3c0n808
Full Member
***
Offline Offline

Activity: 434
Merit: 101


View Profile
July 03, 2011, 06:22:30 PM
 #257

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
AndyRossy
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250


View Profile
July 03, 2011, 06:55:15 PM
Last edit: July 03, 2011, 07:12:27 PM by AndyRossy
 #258

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) (dannf@debian.org) (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?

d3c0n808
Full Member
***
Offline Offline

Activity: 434
Merit: 101


View Profile
July 03, 2011, 07:01:07 PM
 #259

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. 
AndyRossy
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250


View Profile
July 03, 2011, 07:21:53 PM
 #260

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?
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 »
  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!