Pages:
Author

Topic: Pushpool - Tech Support - page 8. (Read 135255 times)

hero member
Activity: 924
Merit: 501
August 06, 2011, 04:09:47 AM
yea,

cd /var/run/mysql/
-bash: cd: /var/run/mysql/: No such file or directory

that's what I get.  It's correct, too.

you mean to:

cd: /var/run/

then

ls mys*

if it's running you should see:

mysqld.pid

or you could avoid the whole cd thing and just type:


ls /var/run/my*


member
Activity: 78
Merit: 10
August 06, 2011, 02:46:13 AM
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 ...

Glad to help...

So, it's probably a bad idea to run pushpool as root.  Run pushpool as the same user as the owner of the server.json file.

I'm not sure about that mysql error.  It's supposed to run as the system account so I don't think it's a permissions problem.  It's probably dead but the PID file is still around.

What happens if you do

Code:
service mysqld stop
wait about 30 seconds
Code:
service mysqld start

Do NOT use "service mysqld restart".  Seems to be an odd problem with removal of the locking file.  I've had the same happen on my own server, restart doesn't work, you have to use stop and then start (even though restart does exactly the same thing, it's the timing of how close together the calls are).


Look what it gives :S
Code:
root@server:/tmp# service mysqld stop
Stopping mysqld:                [ FAILED ]
root@server:/tmp# service mysqld start
Starting mysqld:                [ OK ]
root@server:/tmp# ps xa | grep mysqld
23794 ?        S      0:00 sh -c /etc/init.d/mysqld rest
art                           >>/dev/null 2>>/dev/null

23795 ?        S      0:00 /bin/sh /etc/init.d/mysqld re
start
23865 ttyp0    S+     0:00 grep mysqld
root@server:/tmp# cd /var/run/mysql/
-bash: cd: [b]/var/run/mysql/: No such file or directory[/b]
I think something deleted this whole directory ? or is it located somewhere else ?
And when i start mysqld using directadmin it automatically shuts down :S I will google this to ease the pain hh
legendary
Activity: 1596
Merit: 1100
August 06, 2011, 12:01:35 AM
'gethashespersec' and getinfo's 'hashespersec' are only for the internal, largely unused CPU miner inside bitcoind.

You must use submitted shares to calculate that.

full member
Activity: 175
Merit: 102
August 05, 2011, 09:00:10 PM
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 ...

Glad to help...

So, it's probably a bad idea to run pushpool as root.  Run pushpool as the same user as the owner of the server.json file.

I'm not sure about that mysql error.  It's supposed to run as the system account so I don't think it's a permissions problem.  It's probably dead but the PID file is still around.

What happens if you do

Code:
service mysqld stop
wait about 30 seconds
Code:
service mysqld start

Do NOT use "service mysqld restart".  Seems to be an odd problem with removal of the locking file.  I've had the same happen on my own server, restart doesn't work, you have to use stop and then start (even though restart does exactly the same thing, it's the timing of how close together the calls are).
full member
Activity: 175
Merit: 102
August 05, 2011, 08:52:17 PM

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

Sorry, missed this one. We're multi-threading a single thread. Hah! Smiley

1. Correct mode = up to you. Strictly speaking there's no need to record the failed shares. They are useful for paying out for pool participation, though Smiley In which case the correct mode = true.
2. Yes
3. I've made the same observation. Even when I know the load is sufficient to produce a value, "gethashespersec" always returns 0.  Must be a bug in bitcoin, but one I haven't bothered to track down. The solution I've seen to this exists within the MiningFarm and SimpleCoin pool frontends - essentially they make the following calculation:

* Count all current shares (or shares over a selected time range)
* hashrate = round(((NUMSHARES*4294967296)/600)/1000000, 0);

The magic numbers are:

4294967296 = hashes/share.  When multiplied by shares, gives you a total count of hashes. I'm assuming this magic number is correct; I haven't personally verified it.
600 = seconds in 10 minutes. You'd change this according to your time window. The division here gives you "hashes/sec".
1000000 = hashes/sec to Mhash/s.   Technically I think that number should be 1048576 (1024^2) to fit the strict definition of "mega", but I wouldn't be a stickler about it.  And it would deflate the apparent hash rate.
full member
Activity: 175
Merit: 102
August 05, 2011, 08:44:31 PM

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... ?


I am 98.7% sure the answer to that is yes.  I'm not intimately familiar with the functioning of that value but I don't think changes to it will get picked up by a running process.
full member
Activity: 175
Merit: 102
August 05, 2011, 08:42:06 PM
-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
member
Activity: 78
Merit: 10
August 05, 2011, 03:28:04 PM
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 ...
member
Activity: 114
Merit: 10
Bitcoin = Money for the people, by the people.
August 05, 2011, 01:28:09 PM
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!
member
Activity: 98
Merit: 10
August 05, 2011, 12:37:31 PM
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://bitcointalksearch.org/topic/20-btc-multithreaded-keep-alive-implementation-in-bitcoind-22585

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... ?
newbie
Activity: 15
Merit: 0
August 05, 2011, 11:01:01 AM
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
hero member
Activity: 780
Merit: 510
Bitcoin - helping to end bankster enslavement.
August 05, 2011, 10:53:07 AM
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
member
Activity: 78
Merit: 10
August 05, 2011, 09:51:46 AM
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 !
full member
Activity: 175
Merit: 102
August 05, 2011, 08:57:22 AM
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.
full member
Activity: 175
Merit: 102
August 05, 2011, 08:52:10 AM
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.
full member
Activity: 175
Merit: 102
August 05, 2011, 08:44:38 AM
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://bitcointalksearch.org/topic/20-btc-multithreaded-keep-alive-implementation-in-bitcoind-22585

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.
member
Activity: 78
Merit: 10
August 05, 2011, 03:50:31 AM
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!
member
Activity: 114
Merit: 10
Bitcoin = Money for the people, by the people.
August 05, 2011, 03:46:39 AM
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
member
Activity: 98
Merit: 10
August 04, 2011, 11:10:29 PM
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.

legendary
Activity: 1862
Merit: 1011
Reverse engineer from time to time
August 04, 2011, 04:29:16 PM
Post your server.json file. The problem is there.
Pages:
Jump to: