Bitcoin Forum
December 03, 2016, 04:58:49 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   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 126662 times)
Vadtec
Newbie
*
Offline Offline

Activity: 15


View Profile
August 03, 2011, 03:45:20 PM
 #421

Question about rpc.target.rewrite setting in the config file...

Does this setting make pushpool behave like a pool vs a proxy to bitcoind? As in, when disabled (false), it is just a proxy to a bitcoind that doesn't bother logging any shares to the DB? And as in, when enabled, it is a proxy to a bitcoind that logs shares to the DB?

This would explain why when I set it to false I see shares generated in my miner but nothing gets logged to the DB. But, as I read the code, shouldn't it go ahead and process the share even though it's not an "easy target" and log to the DB? Looking at the git repo, in msg.c @ line 339, it should just skip over that section and continue processing. However, when I run the code with custom debugging lines inserted throughout submit_work(), I do not even see the custom debugging lines. To see the custom debugging lines, I must set rpc.target.rewrite to true.

So, why is it that when I set rpc.target.rewrite to true pushpool logs to the DB and I see my custom debug messages, but if I set it to false, everything seems to take a nap?

Also, what exactly is it rewriting? I'm still trying to figure that part out...

- Vadtec

I guess this isn't a very important question, otherwise it might have been answered. Such a shame. I have other questions I'd like to ask, but so far neither of the two questions I've asked were even responded to. Guess I'll do this stuff the real way and just figure the code out, though it would be nice to get some real support.

- Vadtec

Find my post useful? Send me a few bitcent @ 1NFBQg4fMpZoP2UEE2CnSyFDdNVy5fSrqc
1480741129
Hero Member
*
Offline Offline

Posts: 1480741129

View Profile Personal Message (Offline)

Ignore
1480741129
Reply with quote  #2

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

Posts: 1480741129

View Profile Personal Message (Offline)

Ignore
1480741129
Reply with quote  #2

1480741129
Report to moderator
1480741129
Hero Member
*
Offline Offline

Posts: 1480741129

View Profile Personal Message (Offline)

Ignore
1480741129
Reply with quote  #2

1480741129
Report to moderator
1480741129
Hero Member
*
Offline Offline

Posts: 1480741129

View Profile Personal Message (Offline)

Ignore
1480741129
Reply with quote  #2

1480741129
Report to moderator
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
August 03, 2011, 04:55:54 PM
 #422

Question about rpc.target.rewrite setting in the config file...

Does this setting make pushpool behave like a pool vs a proxy to bitcoind? As in, when disabled (false), it is just a proxy to a bitcoind that doesn't bother logging any shares to the DB? And as in, when enabled, it is a proxy to a bitcoind that logs shares to the DB?

This would explain why when I set it to false I see shares generated in my miner but nothing gets logged to the DB. But, as I read the code, shouldn't it go ahead and process the share even though it's not an "easy target" and log to the DB? Looking at the git repo, in msg.c @ line 339, it should just skip over that section and continue processing. However, when I run the code with custom debugging lines inserted throughout submit_work(), I do not even see the custom debugging lines. To see the custom debugging lines, I must set rpc.target.rewrite to true.

So, why is it that when I set rpc.target.rewrite to true pushpool logs to the DB and I see my custom debug messages, but if I set it to false, everything seems to take a nap?

Also, what exactly is it rewriting? I'm still trying to figure that part out...

- Vadtec

I guess this isn't a very important question, otherwise it might have been answered. Such a shame. I have other questions I'd like to ask, but so far neither of the two questions I've asked were even responded to. Guess I'll do this stuff the real way and just figure the code out, though it would be nice to get some real support.

- Vadtec

I think you are confused, the only thing rewrite does is have everyone hash at the current bitcoin network difficulty making the whole set up useless scince no work/shares will be distributed unless someone finds a block then only one share will be sent to the database.
sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 03, 2011, 05:29:08 PM
 #423

two things I'd try:


1) wrap line 55 in your server.json.
on the second line be sure to add a #

double check to see if any other lines wrap, try to make them shorter.



2) is mysql installed?  (yum install mysql)
It's looking for mysql_config which is part of the mysql package

yum provides */mysql_config

leads to:


mysql-5.0.77-4.el5_6.6.i386 : MySQL client programs and shared libraries.
Repo        : installed
Matched from:
Filename    : /usr/lib/mysql/mysql_config
Filename    : /usr/bin/mysql_config



To test if mysql_config is installed (on your system it is not) run:

mysql_config --libs

It shows you what libraries are linked.  My test box shows:
-rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto




Thanks mate ,
i deleted the whole line , i only left # RPC settings

I still get the same error . I wonder why , should i try to remove all the comments ?

Edit:
I tried this json file, but it didn't work.
http://pastebin.com/aiJy7C4N
"config file(server.json) line too long"

What i do is, i upload it to rapidshare, make it a direct link and with wget i download it to my server , does this effect the file in any way :S ?
Thanks !
Vadtec
Newbie
*
Offline Offline

Activity: 15


View Profile
August 03, 2011, 05:34:07 PM
 #424

I think you are confused, the only thing rewrite does is have everyone hash at the current bitcoin network difficulty making the whole set up useless scince no work/shares will be distributed unless someone finds a block then only one share will be sent to the database.

Thanks for the response. And yes, I'm not sure what it's doing. So, questions:

1) When I set it to true in the config file, I get entries in the DB. When I set it to false, I do not. Which mode is correct for running a pool? I am assuming setting it to true is what I want to do, because otherwise I do not get any entries in the db.

2) If I set it to false, will I only see entries in the DB when a block is found?

3) (Unrelated to the rewrite setting.) I am trying to query the hash rate of the pushpoold, so that I know how many hash/sec it's handling. When I try (on a *nix host) bitcoind gethashespersec, all I see is 0. pushpoold and bitcoind are running on the same host in this case. What is the correct way to find out how many hash/sec is being handled by pushpoold?

- Vadtec

Find my post useful? Send me a few bitcent @ 1NFBQg4fMpZoP2UEE2CnSyFDdNVy5fSrqc
DavinciJ15
Hero Member
*****
Offline Offline

Activity: 750


Bitcoin - helping to end bankster enslavement.


View Profile WWW
August 04, 2011, 05:53:15 PM
 #425

I am not sure if I got blkmon running correctly on my pool at nmcbit.com
I would run it and it would connect and disconnect like this...

Code:
Connecting
connected
close
close

I looked at the source code and I looks like its looking to see if a new block is found and killing the pushpoold I jjust did not find where it starts it up again.  Anyhow I switch the port that was set in blkmond.conf file to the RPC port and it stayed connected but it's not doing anything.

My problem is pushpoold stops working a while after it finds a block.

Can anyone help?
sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 04, 2011, 08:27:20 PM
 #426

Hello,
Can someone help me please ?
I get this error
Code:
root@server:/home/pool# ./pushpoold -E -F
[2011-08-03 11:49:55.117310] config file(server.json) line too long
my bitcoind is running .

And when i run ./pushpoold -E --config=<path>
it shows JSON parse failed , what is this ?

For the experts:
i found here
https://github.com/jgarzik/pushpool/blame/master/config.c
this code
Code:
61 while ((line = fgets(linebuf, sizeof(linebuf), f)) != NULL) {
62 int i;
63 size_t linelen;
64 bool is_comment;
65
66 if (!memchr(line, '\n', sizeof(linebuf))) {
67 applog(LOG_ERR, "config file(%s) line too long", fn);
68 goto err_out_close;
69 }

Please help ! This is strange, i didn't find anything helps even is google !
Thanks !
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1526

Reverse engineer from time to time


View Profile
August 04, 2011, 09:29:16 PM
 #427

Post your server.json file. The problem is there.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
btcpool24
Member
**
Offline Offline

Activity: 84


View Profile
August 05, 2011, 04:10:29 AM
 #428

Hi, please help me.
I will pay you 5BTC for the solution.

pushpool 5.1 stops working after some hours .
When i look atr the terminalscreen i see "too many open files".

pushpoold is still running , but does not accepting any connections.

cat /proc/sys/fs/files-max are 400000. Think thats enough.

The system:

Dedicated Server
Open Suse 11.4 x64
32GB RAM

I want tu run my pool 24/7 without watching the pushpool status all the time.

Flowz
Member
**
Offline Offline

Activity: 114


Bitcoin = Money for the people, by the people.


View Profile
August 05, 2011, 08:46:39 AM
 #429

Hi, please help me.
I will pay you 5BTC for the solution.

pushpool 5.1 stops working after some hours .
When i look atr the terminalscreen i see "too many open files".

pushpoold is still running , but does not accepting any connections.

cat /proc/sys/fs/files-max are 400000. Think thats enough.

The system:

Dedicated Server
Open Suse 11.4 x64
32GB RAM

I want tu run my pool 24/7 without watching the pushpool status all the time.

Try these commands:
Code:
# ulimit -n40000
# cd /etc/security/
# nano limits.conf

This will open a file in Nano. Now, use PAGE DOWN, or the DOWN ARROW until you get to the very bottom of this confusing document. Once there, add the following lines:

Code:
soft nofile 40000
hard nofile 40000

Press CTRL+O (save), and then CTRL+X (exit). Ok, now type:
Code:
# cd /usr/include/bits/
# nano typesizes.h

now start to look for the line: #define __FD_SETSIZE 1024 so change that to #define __FD_SETSIZE 40000

If you don't have nano installed:
Code:
CentOS:
# yum install nano

Others:
# apt-get install nano
sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 05, 2011, 08:50:31 AM
 #430

Post your server.json file. The problem is there.
here is it,
http://pastebin.com/aL9Am2Pf
i checked it with
http://jsonformatter.curiousconcept.com/
and it is valid
thanks!
Furyan
Full Member
***
Offline Offline

Activity: 175



View Profile
August 05, 2011, 01:44:38 PM
 #431

Hi, please help me.
I will pay you 5BTC for the solution.

pushpool 5.1 stops working after some hours .
When i look atr the terminalscreen i see "too many open files".

pushpoold is still running , but does not accepting any connections.

cat /proc/sys/fs/files-max are 400000. Think thats enough.

The system:

Dedicated Server
Open Suse 11.4 x64
32GB RAM

I want tu run my pool 24/7 without watching the pushpool status all the time.


You have long polling enabled, don't you?  And you have blkmond running?

Yeah, blkmond is not all that reliable.  The issue is that your connections to bitcoind are staying open even after a new block is discovered, instead of the connections being flushed and closed.

You can increase the ulimit but you'll still run into it eventually.  The standing solution seems to be that most operators simply restart pushpoold once in awhile.

I prefer a more permanent solution, which is JoelKatz' patch to bitcoind, here:

http://davids.webmaster.com/~davids/bitcoin-4diff.txt

For a full 12+ page discussion of the issue and its resolution (which ultimately ends up being the forgoing diff), see here:

https://bitcointalk.org/index.php?topic=22585.0

For instance, my files-max is at 262,000 and change.  Even at high load with the above patch, the TIME_WAIT connection count remains very low.
Furyan
Full Member
***
Offline Offline

Activity: 175



View Profile
August 05, 2011, 01:52:10 PM
 #432

Post your server.json file. The problem is there.
here is it,
http://pastebin.com/aL9Am2Pf
i checked it with
http://jsonformatter.curiousconcept.com/
and it is valid
thanks!

What the piece of C code you posted means, in words, is: "If the newline character is not found in the string, within the length of the line buffer, the line is too long".

My guess is you've got your newlines in the file switched to DOS newlines. VIM won't reveal this because it properly understands both newline formats (although, depending on your flavor, it may warn you about it and give you a chance to fix it. It does this on CentOS, I am not sure about other variants).

Try the following command:

Code:
dos2unix -n server.json serverFixed.json

and then try to use the new serverFixed.json file as your pushpoold config file. Post results.

If you don't have the dos2unix utility, you can install it either via
Code:
apt-get install tofrodos
or
Code:
yum install dos2unix
depending on your Linux OS flavor.
Furyan
Full Member
***
Offline Offline

Activity: 175



View Profile
August 05, 2011, 01:57:22 PM
 #433

I am not sure if I got blkmon running correctly on my pool at nmcbit.com
I would run it and it would connect and disconnect like this...

Code:
Connecting
connected
close
close

I looked at the source code and I looks like its looking to see if a new block is found and killing the pushpoold I jjust did not find where it starts it up again.  Anyhow I switch the port that was set in blkmond.conf file to the RPC port and it stayed connected but it's not doing anything.

My problem is pushpoold stops working a while after it finds a block.

Can anyone help?

blkmond doesn't kill pushpool and restart it; it sends the USR1 signal to pushpool.  It's a thin shim over the blockcount method in bitcoind.  When blkmond sees that the count has incremented, it sends the aforementioned signal.  When pushpool receives this signal, it flushes and closes all of its LP waiters - e.g. socket connections - to bitcoind. 

Problem is, blkmond is not reliable and tends to simply... stop... after awhile and either needs to be restarted, or pushpool needs to be restarted to close the sockets.

See my reply, 2 posts above, about the real solution to this problem, which eliminates the need for blkmond.  If you're not comfortable patching your bitcoin, you can simply do as others do which is restart blkmond and/or pushpool periodically.
sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 05, 2011, 02:51:46 PM
 #434

Post your server.json file. The problem is there.
here is it,
http://pastebin.com/aL9Am2Pf
i checked it with
http://jsonformatter.curiousconcept.com/
and it is valid
thanks!

What the piece of C code you posted means, in words, is: "If the newline character is not found in the string, within the length of the line buffer, the line is too long".

My guess is you've got your newlines in the file switched to DOS newlines. VIM won't reveal this because it properly understands both newline formats (although, depending on your flavor, it may warn you about it and give you a chance to fix it. It does this on CentOS, I am not sure about other variants).

Try the following command:

Code:
dos2unix -n server.json serverFixed.json

and then try to use the new serverFixed.json file as your pushpoold config file. Post results.

If you don't have the dos2unix utility, you can install it either via
Code:
apt-get install tofrodos
or
Code:
yum install dos2unix
depending on your Linux OS flavor.
Thanks mate !
I did this:
sudo apt-get install dos2unix ( the code you gave was already installed and the dos2unix command wasn't recognizable )

i ran the command : dos2unix -n server.json serverFixed.json

renamed serverFixed.json to server.json

and then i tried these:
Code:
root@server:/pool# ./pushpoold -E -F --config=/pool/server.json
[2011-08-05 14:48:16.191748] /pool/server.json: JSON parse failed


Code:
root@server:/pool# ./pushpoold -E -F --config=server.json
[2011-08-05 14:48:41.989500] config file(server.json) line too long

Code:
root@server:/pool# ./pushpoold --config=/pool/server.json -E -F
[2011-08-05 14:46:26.202941] /pool/server.json: JSON parse failed

Code:
root@server:/pool# ./pushpoold -E
[2011-08-05 14:47:49.851618] server.json: JSON parse failed

It didn't work :S what do you think ?
Thanks !
DavinciJ15
Hero Member
*****
Offline Offline

Activity: 750


Bitcoin - helping to end bankster enslavement.


View Profile WWW
August 05, 2011, 03:53:07 PM
 #435

I am not sure if I got blkmon running correctly on my pool at nmcbit.com
I would run it and it would connect and disconnect like this...

Code:
Connecting
connected
close
close

I looked at the source code and I looks like its looking to see if a new block is found and killing the pushpoold I jjust did not find where it starts it up again.  Anyhow I switch the port that was set in blkmond.conf file to the RPC port and it stayed connected but it's not doing anything.

My problem is pushpoold stops working a while after it finds a block.

Can anyone help?

blkmond doesn't kill pushpool and restart it; it sends the USR1 signal to pushpool.  It's a thin shim over the blockcount method in bitcoind.  When blkmond sees that the count has incremented, it sends the aforementioned signal.  When pushpool receives this signal, it flushes and closes all of its LP waiters - e.g. socket connections - to bitcoind. 

Problem is, blkmond is not reliable and tends to simply... stop... after awhile and either needs to be restarted, or pushpool needs to be restarted to close the sockets.

See my reply, 2 posts above, about the real solution to this problem, which eliminates the need for blkmond.  If you're not comfortable patching your bitcoin, you can simply do as others do which is restart blkmond and/or pushpool periodically.

Thanks!
You're a gentleman and a scholar!
Keep up the good work.

Davinci
Vadtec
Newbie
*
Offline Offline

Activity: 15


View Profile
August 05, 2011, 04:01:01 PM
 #436

I think you are confused, the only thing rewrite does is have everyone hash at the current bitcoin network difficulty making the whole set up useless scince no work/shares will be distributed unless someone finds a block then only one share will be sent to the database.

Thanks for the response. And yes, I'm not sure what it's doing. So, questions:

1) When I set it to true in the config file, I get entries in the DB. When I set it to false, I do not. Which mode is correct for running a pool? I am assuming setting it to true is what I want to do, because otherwise I do not get any entries in the db.

2) If I set it to false, will I only see entries in the DB when a block is found?

3) (Unrelated to the rewrite setting.) I am trying to query the hash rate of the pushpoold, so that I know how many hash/sec it's handling. When I try (on a *nix host) bitcoind gethashespersec, all I see is 0. pushpoold and bitcoind are running on the same host in this case. What is the correct way to find out how many hash/sec is being handled by pushpoold?

- Vadtec

So hard to get simple responses to simple questions.   Roll Eyes

- Vadtec

Find my post useful? Send me a few bitcent @ 1NFBQg4fMpZoP2UEE2CnSyFDdNVy5fSrqc
btcpool24
Member
**
Offline Offline

Activity: 84


View Profile
August 05, 2011, 05:37:31 PM
 #437

Hi, please help me.
I will pay you 5BTC for the solution.

pushpool 5.1 stops working after some hours .
When i look atr the terminalscreen i see "too many open files".

pushpoold is still running , but does not accepting any connections.

cat /proc/sys/fs/files-max are 400000. Think thats enough.

The system:

Dedicated Server
Open Suse 11.4 x64
32GB RAM

I want tu run my pool 24/7 without watching the pushpool status all the time.


You have long polling enabled, don't you?  And you have blkmond running?

Yeah, blkmond is not all that reliable.  The issue is that your connections to bitcoind are staying open even after a new block is discovered, instead of the connections being flushed and closed.

You can increase the ulimit but you'll still run into it eventually.  The standing solution seems to be that most operators simply restart pushpoold once in awhile.

I prefer a more permanent solution, which is JoelKatz' patch to bitcoind, here:

http://davids.webmaster.com/~davids/bitcoin-4diff.txt

For a full 12+ page discussion of the issue and its resolution (which ultimately ends up being the forgoing diff), see here:

https://bitcointalk.org/index.php?topic=22585.0

For instance, my files-max is at 262,000 and change.  Even at high load with the above patch, the TIME_WAIT connection count remains very low.


Thanky you for the answer. I put blkmon to dev/null  a long time ago. I allready use this bitcoin patch.
Must i restart the server or any services if i change ulimit and or soft/hard limit din /etc/security... ?
Flowz
Member
**
Offline Offline

Activity: 114


Bitcoin = Money for the people, by the people.


View Profile
August 05, 2011, 06:28:09 PM
 #438

Post your server.json file. The problem is there.
here is it,
http://pastebin.com/aL9Am2Pf
i checked it with
http://jsonformatter.curiousconcept.com/
and it is valid
thanks!

What the piece of C code you posted means, in words, is: "If the newline character is not found in the string, within the length of the line buffer, the line is too long".

My guess is you've got your newlines in the file switched to DOS newlines. VIM won't reveal this because it properly understands both newline formats (although, depending on your flavor, it may warn you about it and give you a chance to fix it. It does this on CentOS, I am not sure about other variants).

Try the following command:

Code:
dos2unix -n server.json serverFixed.json

and then try to use the new serverFixed.json file as your pushpoold config file. Post results.

If you don't have the dos2unix utility, you can install it either via
Code:
apt-get install tofrodos
or
Code:
yum install dos2unix
depending on your Linux OS flavor.
There is a much easier way of doing it..
Code:
# vim server.json
# :set fileformat=unix
# :x!
Done!
sareea
Member
**
Offline Offline

Activity: 76


View Profile
August 05, 2011, 08:28:04 PM
 #439

Thanks Furyan and Flowz !!!
Furyan your explanation helped me thousand times ! thanks . Even though the command didn't help, but i think it ruined the file , or i dunno .
I did this , made a text file in directadmin file manager and named it server.json and moved it to the pool directory, and it reads it ! Wow .
Nice .

I am only afraid of that the file permissions are for admin as seen in the directadmin file manager and not for root ...

Edit : I get this error in my directadmin

Error connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I think my Mysql server is down , once i started pushpoold this what happened . And now it can't connect to the SQL server.
strange ... what should i do ? I try to stop mysqld but it fails ...
Furyan
Full Member
***
Offline Offline

Activity: 175



View Profile
August 06, 2011, 01:42:06 AM
 #440

-snip me-
There is a much easier way of doing it..
Code:
# vim server.json
# :set fileformat=unix
# :x!
Done!

The vim-foo is strong in this one! Learn something new every day, thanks Smiley
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!