Pages:
Author

Topic: Pushpool - Tech Support - page 9. (Read 135232 times)

member
Activity: 78
Merit: 10
August 04, 2011, 03:27:20 PM
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=
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 !
hero member
Activity: 780
Merit: 510
Bitcoin - helping to end bankster enslavement.
August 04, 2011, 12:53:15 PM
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?
newbie
Activity: 15
Merit: 0
August 03, 2011, 12:34:07 PM
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
member
Activity: 78
Merit: 10
August 03, 2011, 12:29:08 PM
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 !
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
August 03, 2011, 11:55:54 AM
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.
newbie
Activity: 15
Merit: 0
August 03, 2011, 10:45:20 AM
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
hero member
Activity: 924
Merit: 501
August 03, 2011, 08:29:56 AM
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



member
Activity: 78
Merit: 10
August 03, 2011, 06:15:32 AM
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for SQLite3 library >= 3.0.0... not found
checking for mysql_config... no

you need to compile with:

./configure -without-sqlite3 --prefix=/home/pushpool/ && make  

from pages 16-17 of this thread



I tried this
and i got
Code:
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for mysql_config... no
checking for mysql_config5... no
checking for pg_config..

But when i do make i still get No valid Database engines defined .

Thanks for the help

Edit :
I fixed the problem by running
sudo apt-get install libmysqlclient-dev
but ,
now i get this
Code:
root@server:/home/pool# ./pushpoold -E -F
./pushpoold: /usr/local/mysql/lib/libmysqlclient.so.16:
no version information available (required by ./pushpool
d)
[2011-08-03 11:34:31.785467] server.json: JSON parse fai
led
And bitcoind is running .
What should i do ?
Thanks !

Edit 2 : it seems i managed to fix the "libmysqlclient.so.16" by renaming the file to "test and running
ln -s libmysqlclient.so.18 libmysqlclient.so.16 .

Now i get this problem hhh Cheesy
Code:
root@server:/home/pool# ./pushpoold -E -F
[2011-08-03 11:49:55.117310] config file(server.json) line too long

WHAT IS THIS Cheesy ?
Thanks !

Edit 3 ( the journey continues ) : 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 }

Here is my server.json file
http://pastebin.com/UKFeg6Pa

I think it might help understand this problem ? Smiley
Thanks
hero member
Activity: 924
Merit: 501
August 02, 2011, 08:00:20 PM
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for SQLite3 library >= 3.0.0... not found
checking for mysql_config... no

you need to compile with:

./configure -without-sqlite3 --prefix=/home/pushpool/ && make 

from pages 16-17 of this thread

full member
Activity: 175
Merit: 102
August 02, 2011, 02:05:00 PM
>Having everything run on one machine is simply a terrible design.

lol.


Heh. Do continue.
member
Activity: 78
Merit: 10
August 02, 2011, 12:05:57 PM
I have Ubuntu 11 with Directadmin control panel on my server . Is there any command listed in this tutorial that i mustn't run ? Because i tried once and my SQL server became problematic , i think i mustn't install the libmysqlclient++dev thing right ?
Thanks a lot

Edit : A hard question :S I have Directadmin , and i could configure the pushpool successfully , but when i try to make; it says that no valid database engines defined, but i already got Directadmin with phpMyadmin and i can make sql databases and etc ...
And i still get this although i have a sql engine :S
Code:
checking for g++... g++
checking whether we are using the GNU C++ compiler... ye
s
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for SQLite3 library >= 3.0.0... not found
checking for mysql_config... no
checking for mysql_config5... no
checking for pg_config... no
no
checking for gawk... (cached) gawk
checking for curl-config... /us
And this is a piece of information about my server

Code:
Apache 2.2.19 Running
DirectAdmin 1.39.1 Running
Exim 4.73 Running
MySQL 5.5.9 Running
Named 9.7.3 Running
ProFTPd 1.3.3d Running
sshd Running
dovecot 2.0.13 Running
Php 5.2.17 Installed

What do you think i should do ? Thanks a lot !
hero member
Activity: 924
Merit: 501
August 02, 2011, 10:58:38 AM
>Having everything run on one machine is simply a terrible design.

lol.


full member
Activity: 175
Merit: 102
August 02, 2011, 09:07:48 AM
If you run them both on the same machine, you only need to expose pushpoold.  You can turn off the firewall for the bitcoind ports to the outside world.  Same way most people run mysql, ya?

Mysql has nothing to do with my question.

Also, as I stated, my intention is to expose bitcoind to the internet.  I want to be able to update stats elsewhere (and run transactions and the such). E.g., a pool frontend.  Having everything run on one machine is simply a terrible design.

However, bitcoind is "ssl" or "no ssl". One or the other, for all connections.  Thus, if I enable the ssl setting in bitcoind, pushpool has to support it as well.  It doesn't look like it does, looking at the CURLOPT code in the pushpool server.
hero member
Activity: 924
Merit: 501
August 02, 2011, 08:58:03 AM
If you run them both on the same machine, you only need to expose pushpoold.  You can turn off the firewall for the bitcoind ports to the outside world.  Same way most people run mysql, ya?
full member
Activity: 175
Merit: 102
August 02, 2011, 08:54:31 AM
Now I have a question of my own -

pushpool does not support bitcoind RPC over SSL, does it?

I tried enabling that setting in bitcoind, and.. well.. regretted it.  I had verified all the certificates, signing, request/response etc was in place. Simply pushpool couldn't speak that language.

I might look at adding this.  I want to expose my bitcoind instance to the internet but I won't do that until it only uses SSL.
full member
Activity: 175
Merit: 102
August 02, 2011, 08:49:11 AM
- snip -
Thanks but ,
I already put bitcoin.conf in the /root/.bitcoin/ directory and set the rpc username and password , why can't it find it ?
and Furyan , i have the server.json file in the pool directory , what do you mean ? do i need a special command to specify it ? Can you help please? thanks !

You start pushpool like this:

./pushpoold --config=/path/to/your/server/config/pushpool.json

I have mine wrapped in a shell script that also starts up memcached for me and allows me to specify extra params to pushpoold.
hero member
Activity: 924
Merit: 501
August 02, 2011, 08:38:56 AM
Code:
/home/bitcoin/bin/32# ./bitcoind -daemon
bitcoin server starting
/home/bitcoin/bin/32# Warning: To use the "-
daemon" option, you must set rpcpassword=
in the configuration file: /root/.bitcoin/bitcoin.conf
If the file does not exist, create it with owner-readabl
e-only file permissions.

I'm guessing you are trying to run bitcoin as the wrong user.  
put your config file in /root/.bitcoin/bitcoin.conf then run as root.
if you are trying to run as user bitcoin, then you need to put the
config file in /home/bitcoin/.bitcoin/bitcoin/conf

If you can run it as user bitcoin, that is MUCH prefered to running as root.

Code:
/home/pool# ./pushpoold -E -F
./pushpoold: /usr/local/mysql/lib/libmysqlclient.so.16:
no version information available (required by ./pushpoold)
[2011-08-02 12:13:17.433843] server.json: JSON parse failed

In this error, you are seeking a library that cannot be found.
I do not have libmysqlclient.so.16 on my system, so it must not
be needed under centos 5.6.  I do, however, have a
libmysqlclient.so & libmysqlclient.so.15

yum provides "*/libmysqlclient.so"
tells us the library lives in mysql-devel
so you need
yum install mysql-devel
if it complains that you already have that package, run
yum reinstall mysql-devel

now, can anybody tell me what this means?

011-07-31 15:30:52: Listener for "pushpoold test": error: [Errno 10054] An existing connection was forcibly closed by the remote host
2011-07-31 15:30:52: Listener for "pushpoold test": Traceback (most recent call last):
2011-07-31 15:30:52: Listener for "pushpoold test": File "BitcoinMiner.pyo", line 261, in longPollThread
2011-07-31 15:30:52: Listener for "pushpoold test": File "BitcoinMiner.pyo", line 224, in request
2011-07-31 15:30:52: Listener for "pushpoold test": File "httplib.pyo", line 974, in getresponse
2011-07-31 15:30:52: Listener for "pushpoold test": File "httplib.pyo", line 391, in begin
2011-07-31 15:30:52: Listener for "pushpoold test": File "httplib.pyo", line 349, in _read_status
2011-07-31 15:30:52: Listener for "pushpoold test": File "socket.pyo", line 397, in readline
2011-07-31 15:30:52: Listener for "pushpoold test": error: [Errno 10054] An existing connection was forcibly closed by the remote host
2011-07-31 15:30:52: Listener for "pushpoold test": Traceback (most recent call last):
2011-07-31 15:30:52: Listener for "pushpoold test": File "BitcoinMiner.pyo", line 261, in longPollThread
2011-07-31 15:30:52: Listener for "pushpoold test": File "BitcoinMiner.pyo", line 224, in request
2011-07-31 15:30:52: Listener for "pushpoold test": File "httplib.pyo", line 974, in getresponse
2011-07-31 15:30:52: Listener for "pushpoold test": File "httplib.pyo", line 391, in begin
2011-07-31 15:30:52: Listener for "pushpoold test": File "httplib.pyo", line 349, in _read_status
2011-07-31 15:40:52: Listener for "pushpoold test": 31/07/2011 15:40:52, long poll exception:
2011-07-31 15:50:52: Listener for "pushpoold test": 31/07/2011 15:50:52, long poll exception:
2011-07-31 16:00:52: Listener for "pushpoold test": 31/07/2011 16:00:52, long poll exception:
2011-07-31 16:10:52: Listener for "pushpoold test": 31/07/2011 16:10:52, long poll exception:


anybody?


member
Activity: 78
Merit: 10
August 02, 2011, 08:26:33 AM
Hello,
I am getting these errors when i run the ./pushpoold -E -F
i run the ./bitcoind and the server says it is starting, then gives a warning .
This is it
.
Code:
/home/bitcoin/bin/32# ./bitcoind -daemon
bitcoin server starting
/home/bitcoin/bin/32# Warning: To use the "-
daemon" option, you must set rpcpassword=
in the configuration file: /root/.bitcoin/bitcoin.conf
If the file does not exist, create it with owner-readabl
e-only file permissions.

/home/pool# ./pushpoold -E -F
./pushpoold: /usr/local/mysql/lib/libmysqlclient.so.16:
no version information available (required by ./pushpool
d)
[2011-08-02 12:13:17.433843] server.json: JSON parse fai
led
What is this ? Thanks a lot !

Edit : i use ubuntu 11 with DirectAdmin , i made the Database using the DirectAdmin , and i also installed the line posted by Xenland

sudo apt-get install libmysql++-dev.
I configured and installed both bitcoind and pushpoold .

Looks like bitcoind isn't starting up, you need to fix that first before you can get pushpoold to work and the error bitcoind is spitting out says you haven't setup a bitcoin.conf file for credentials.
Thanks but ,
I already put bitcoin.conf in the /root/.bitcoin/ directory and set the rpc username and password , why can't it find it ?
and Furyan , i have the server.json file in the pool directory , what do you mean ? do i need a special command to specify it ? Can you help please? thanks !
full member
Activity: 175
Merit: 102
August 02, 2011, 08:21:38 AM
Hello,
I am getting these errors when i run the ./pushpoold -E -F
i run the ./bitcoind and the server says it is starting, then gives a warning .
This is it
.
Code:
/home/bitcoin/bin/32# ./bitcoind -daemon
bitcoin server starting
/home/bitcoin/bin/32# Warning: To use the "-
daemon" option, you must set rpcpassword=
in the configuration file: /root/.bitcoin/bitcoin.conf
If the file does not exist, create it with owner-readabl
e-only file permissions.

/home/pool# ./pushpoold -E -F
./pushpoold: /usr/local/mysql/lib/libmysqlclient.so.16:
no version information available (required by ./pushpool
d)
[2011-08-02 12:13:17.433843] server.json: JSON parse fai
led
What is this ? Thanks a lot !

Edit : i use ubuntu 11 with DirectAdmin , i made the Database using the DirectAdmin , and i also installed the line posted by Xenland

sudo apt-get install libmysql++-dev.
I configured and installed both bitcoind and pushpoold .

Looks like bitcoind isn't starting up, you need to fix that first before you can get pushpoold to work and the error bitcoind is spitting out says you haven't setup a bitcoin.conf file for credentials.

Also, pushpool can't find your pushpool config file.  You have to specify it explicitly on the command line.  Unlike bitcoind, it won't look in a default path for the config file.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
August 02, 2011, 08:02:49 AM
Hello,
I am getting these errors when i run the ./pushpoold -E -F
i run the ./bitcoind and the server says it is starting, then gives a warning .
This is it
.
Code:
/home/bitcoin/bin/32# ./bitcoind -daemon
bitcoin server starting
/home/bitcoin/bin/32# Warning: To use the "-
daemon" option, you must set rpcpassword=
in the configuration file: /root/.bitcoin/bitcoin.conf
If the file does not exist, create it with owner-readabl
e-only file permissions.

/home/pool# ./pushpoold -E -F
./pushpoold: /usr/local/mysql/lib/libmysqlclient.so.16:
no version information available (required by ./pushpool
d)
[2011-08-02 12:13:17.433843] server.json: JSON parse fai
led
What is this ? Thanks a lot !

Edit : i use ubuntu 11 with DirectAdmin , i made the Database using the DirectAdmin , and i also installed the line posted by Xenland

sudo apt-get install libmysql++-dev.
I configured and installed both bitcoind and pushpoold .

Looks like bitcoind isn't starting up, you need to fix that first before you can get pushpoold to work and the error bitcoind is spitting out says you haven't setup a bitcoin.conf file for credentials.
Pages:
Jump to: