Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: smoothie on June 30, 2011, 06:02:49 AM



Title: PUSHPOOL help
Post by: smoothie on June 30, 2011, 06:02:49 AM
Can anyone tell me why I could get an error of invalid database.engine when running ./pushpoold -E?

Here is some of the out put when running pushpool with strace.

Code:
set_tid_address(0x7effc6049a10)         = 25470
set_robust_list(0x7effc6049a20, 0x18)   = 0
futex(0x7fff81c26a8c, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7fff81c26a8c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7effc6049740) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7effc57b5740, [], SA_RESTORER|SA_SIGINFO, 0x7effc57bfc60}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7effc57b57d0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7effc57bfc60}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
brk(0)                                  = 0x1249000
brk(0x126a000)                          = 0x126a000
clock_gettime(CLOCK_MONOTONIC, {13662, 657617095}) = 0
clock_gettime(CLOCK_MONOTONIC, {13662, 657690975}) = 0
getuid()                                = 0
geteuid()                               = 0
getgid()                                = 0
getegid()                               = 0
epoll_create(32000)                     = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
socketpair(PF_FILE, SOCK_STREAM, 0, [4, 5]) = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fcntl(4, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
getuid()                                = 0
geteuid()                               = 0
getgid()                                = 0
getegid()                               = 0
open("server.json", O_RDONLY)           = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=2348, ...}) = 0
fstat(6, {st_mode=S_IFREG|0644, st_size=2348, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7effc605e000
read(6, "{\n   # network ports\n   \"listen\""..., 4096) = 2348
read(6, "", 4096)                       = 0
close(6)                                = 0
munmap(0x7effc605e000, 4096)            = 0
gettimeofday({1309408026, 645422}, NULL) = 0
open("/etc/localtime", O_RDONLY)        = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
fstat(6, {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7effc605e000
read(6, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"..., 4096) = 2819
lseek(6, -1802, SEEK_CUR)               = 1017
read(6, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0\0\0\0"..., 4096) = 1802
close(6)                                = 0
munmap(0x7effc605e000, 4096)            = 0
write(2, "[2011-06-30 04:27:6.645422] inva"..., 52[2011-06-30 04:27:6.645422] invalid database.engine
) = 52
exit_group(1)                           = ?


Title: Re: PUSHPOOL help
Post by: smoothie on June 30, 2011, 06:03:44 AM
FYI I've installed mysql database on to Ubuntu 11.04.


Title: Re: PUSHPOOL help
Post by: SomeoneWeird on June 30, 2011, 06:04:56 AM
FYI I've installed mysql database on to Ubuntu 11.04.

Show us your server.json


Title: Re: PUSHPOOL help
Post by: smoothie on June 30, 2011, 06:14:19 AM
FYI I've installed mysql database on to Ubuntu 11.04.

Show us your server.json

Here is my server.json file:

Code:
{
   # network ports
   "listen" : [
      # binary protocol (default), port 8342
      { "port" : 8342 },

      # HTTP JSON-RPC protocol, port 8341
      { "port" : 8347, "protocol" : "http-json" },

      # HTTP JSON-RPC protocol, port 8344,
      #proxy is most likely your external ip address if your running a public pool | Public pools WON'T have the following ip addresses: (10.0.0.1, 127.0.0.1, 192.168.1.100, or 192.168.254.254,etc,etc)
      # requests to us | "proxy" should be set to your ip address that people will connect through
      { "port" : 8344, "protocol" : "http-json",
        "proxy" : "208.111.40.205" },

      # binary protocol, localhost-only port 8338
      # host is most likely your localhost address
      { "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
   ],

   # database settings
   "database" : {
      "engine" : "mysql",

      "host" : "localhost",

      "port" : 3306,

      #database name
      "name" : "pushpool",
      #database username
      "username" : "root",
      #database password
      "password" : "xxxxxxxx",
      #enable sharelog | to insert share data or sometimes known as "work"
      "sharelog" : true,
      "stmt.pwdb":"SELECT password FROM pool_worker WHERE username = ?",

      "stmt.sharelog":"INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"

   },

   #uncoment this when you want to use memcached (Recommended for servers over 1.5gb of ram)
   # cache settings
   "memcached" : {
      "servers" : [
         { "host" : "127.0.0.1", "port" : 11211 }
      ]
   },

   "pid" : "/tmp/pushpoold.pid",

   # overrides local hostname detection
   "forcehost" : "localhost.localdomain",

   "log.requests" : "/tmp/request.log",
   "log.shares" : "/tmp/shares.log",

   # the server assumes longpolling (w/ SIGUSR1 called for each blk)
   "longpoll.disable" : false,

   # length of time to cache username/password credentials, in seconds
   "auth.cred_cache.expire" : 75,

   # RPC settings
   #Bitcoind Protocal settings
   #Host were bitcoind can be found on the network
   "rpc.url" : "http://127.0.0.1:8332/",
   #Username & password to connect to bitcoind
   "rpc.user" : "user",
   "rpc.pass" : "pass",

   # rewrite returned 'target' to difficulty-1?
   "rpc.target.rewrite" : true
}


Title: Re: PUSHPOOL help
Post by: SomeoneWeird on June 30, 2011, 06:16:22 AM
FYI I've installed mysql database on to Ubuntu 11.04.

Show us your server.json

Here is my server.json file:

Code:
{
   # network ports
   "listen" : [
      # binary protocol (default), port 8342
      { "port" : 8342 },

      # HTTP JSON-RPC protocol, port 8341
      { "port" : 8347, "protocol" : "http-json" },

      # HTTP JSON-RPC protocol, port 8344,
      #proxy is most likely your external ip address if your running a public pool | Public pools WON'T have the following ip addresses: (10.0.0.1, 127.0.0.1, 192.168.1.100, or 192.168.254.254,etc,etc)
      # requests to us | "proxy" should be set to your ip address that people will connect through
      { "port" : 8344, "protocol" : "http-json",
        "proxy" : "208.111.40.205" },

      # binary protocol, localhost-only port 8338
      # host is most likely your localhost address
      { "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
   ],

   # database settings
   "database" : {
      "engine" : "mysql",

      "host" : "localhost",

      "port" : 3306,

      #database name
      "name" : "pushpool",
      #database username
      "username" : "root",
      #database password
      "password" : "xxxxxxxx",
      #enable sharelog | to insert share data or sometimes known as "work"
      "sharelog" : true,
      "stmt.pwdb":"SELECT password FROM pool_worker WHERE username = ?",

      "stmt.sharelog":"INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"

   },

   #uncoment this when you want to use memcached (Recommended for servers over 1.5gb of ram)
   # cache settings
   "memcached" : {
      "servers" : [
         { "host" : "127.0.0.1", "port" : 11211 }
      ]
   },

   "pid" : "/tmp/pushpoold.pid",

   # overrides local hostname detection
   "forcehost" : "localhost.localdomain",

   "log.requests" : "/tmp/request.log",
   "log.shares" : "/tmp/shares.log",

   # the server assumes longpolling (w/ SIGUSR1 called for each blk)
   "longpoll.disable" : false,

   # length of time to cache username/password credentials, in seconds
   "auth.cred_cache.expire" : 75,

   # RPC settings
   #Bitcoind Protocal settings
   #Host were bitcoind can be found on the network
   "rpc.url" : "http://127.0.0.1:8332/",
   #Username & password to connect to bitcoind
   "rpc.user" : "user",
   "rpc.pass" : "pass",

   # rewrite returned 'target' to difficulty-1?
   "rpc.target.rewrite" : true
}

do you have the mysql development package installed?


Title: Re: PUSHPOOL help
Post by: smoothie on June 30, 2011, 06:22:03 AM
Also here is the version of mysql I am using:


Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 5.1.54-1ubuntu4 (Ubuntu)


Title: Re: PUSHPOOL help
Post by: smoothie on June 30, 2011, 06:23:11 AM
FYI I've installed mysql database on to Ubuntu 11.04.

Show us your server.json

Here is my server.json file:

Code:
{
   # network ports
   "listen" : [
      # binary protocol (default), port 8342
      { "port" : 8342 },

      # HTTP JSON-RPC protocol, port 8341
      { "port" : 8347, "protocol" : "http-json" },

      # HTTP JSON-RPC protocol, port 8344,
      #proxy is most likely your external ip address if your running a public pool | Public pools WON'T have the following ip addresses: (10.0.0.1, 127.0.0.1, 192.168.1.100, or 192.168.254.254,etc,etc)
      # requests to us | "proxy" should be set to your ip address that people will connect through
      { "port" : 8344, "protocol" : "http-json",
        "proxy" : "208.111.40.205" },

      # binary protocol, localhost-only port 8338
      # host is most likely your localhost address
      { "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
   ],

   # database settings
   "database" : {
      "engine" : "mysql",

      "host" : "localhost",

      "port" : 3306,

      #database name
      "name" : "pushpool",
      #database username
      "username" : "root",
      #database password
      "password" : "xxxxxxxx",
      #enable sharelog | to insert share data or sometimes known as "work"
      "sharelog" : true,
      "stmt.pwdb":"SELECT password FROM pool_worker WHERE username = ?",

      "stmt.sharelog":"INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"

   },

   #uncoment this when you want to use memcached (Recommended for servers over 1.5gb of ram)
   # cache settings
   "memcached" : {
      "servers" : [
         { "host" : "127.0.0.1", "port" : 11211 }
      ]
   },

   "pid" : "/tmp/pushpoold.pid",

   # overrides local hostname detection
   "forcehost" : "localhost.localdomain",

   "log.requests" : "/tmp/request.log",
   "log.shares" : "/tmp/shares.log",

   # the server assumes longpolling (w/ SIGUSR1 called for each blk)
   "longpoll.disable" : false,

   # length of time to cache username/password credentials, in seconds
   "auth.cred_cache.expire" : 75,

   # RPC settings
   #Bitcoind Protocal settings
   #Host were bitcoind can be found on the network
   "rpc.url" : "http://127.0.0.1:8332/",
   #Username & password to connect to bitcoind
   "rpc.user" : "user",
   "rpc.pass" : "pass",

   # rewrite returned 'target' to difficulty-1?
   "rpc.target.rewrite" : true
}

do you have the mysql development package installed?

I think I do, but how would I be able to determine for sure?


Title: Re: PUSHPOOL help
Post by: smoothie on June 30, 2011, 06:46:18 AM
I think that I have the mysql development package installed. When I runsudo apt-get install libmysqld-dev I get the following:

Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmysqld-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.


I also ran sudo apt-get install mysql-server after initially running the bold set of commands above.

Any input?


Title: Re: PUSHPOOL help
Post by: SomeoneWeird on June 30, 2011, 06:58:39 AM
I think that I have the mysql development package installed. When I runsudo apt-get install libmysqld-dev I get the following:

Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmysqld-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.


I also ran sudo apt-get install mysql-server after initially running the bold set of commands above.

Any input?

Try
Code:
sudo apt-get install libmysqlclient-dev


Title: Re: PUSHPOOL help
Post by: smoothie on June 30, 2011, 07:49:07 AM
I think that I have the mysql development package installed. When I runsudo apt-get install libmysqld-dev I get the following:

Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmysqld-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.


I also ran sudo apt-get install mysql-server after initially running the bold set of commands above.

Any input?

Try
Code:
sudo apt-get install libmysqlclient-dev

Okay here is the output. Seems like it's already installed:

Code:
root@NCM:/home# sudo apt-get install libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmysqlclient-dev is already the newest version.
libmysqlclient-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.


Title: Re: PUSHPOOL help
Post by: dikidera on June 30, 2011, 08:54:35 AM
Now that i think about it, you wouldn't have been able to compile pushpool if there was no engine installed. Honestly, i just installed XAMPP and everything works for me.



Title: Re: PUSHPOOL help
Post by: SomeoneWeird on June 30, 2011, 09:08:44 AM
Now that i think about it, you wouldn't have been able to compile pushpool if there was no engine installed. Honestly, i just installed XAMPP and everything works for me.



how did you compile pushpool on windows...


Title: Re: PUSHPOOL help
Post by: Djao on June 30, 2011, 09:52:30 AM
how did you compile pushpool on windows...

The 'X' in XAMPP means that it works on various OS and there are several reasons why one would use XAMPP even on Linux:
http://translate.google.de/translate?js=n&prev=_t&hl=de&ie=UTF-8&layout=2&eotf=1&sl=de&tl=en&u=http%3A%2F%2Fwww.apachefriends.org%2Fde%2Ffaq-af.html%23wozu



Title: Re: PUSHPOOL help
Post by: smoothie on July 01, 2011, 05:44:32 AM
Okay so I tried to install XAMPP but I found out that the installation only appears to come in 32bit.

Beside the point..

I did a complete install of PostgreSql and created the appropriate tables and inserted some test user data. I still get the message when running ./pushpoold -E:

Code:
[2011-07-01 05:42:24.263811] invalid database.engine

Am I missing something? I even updated my server.json file with the proper settings.

What I am confused about is how pushpoold can be built/compiled and yet require a database engine in place to do that process, but when I try to run pushpoold I get a message saying "invalid database.engine".

Can someone please help me?

It seems like I am hitting every possible problem when it comes to pushpoold setup.


Title: Re: PUSHPOOL help
Post by: SomeoneWeird on July 01, 2011, 06:04:48 AM
Okay so I tried to install XAMPP but I found out that the installation only appears to come in 32bit.

Beside the point..

I did a complete install of PostgreSql and created the appropriate tables and inserted some test user data. I still get the message when running ./pushpoold -E:

Code:
[2011-07-01 05:42:24.263811] invalid database.engine

Am I missing something? I even updated my server.json file with the proper settings.

What I am confused about is how pushpoold can be built/compiled and yet require a database engine in place to do that process, but when I try to run pushpoold I get a message saying "invalid database.engine".

Can someone please help me?

It seems like I am hitting every possible problem when it comes to pushpoold setup.

How did you compile it?


Title: Re: PUSHPOOL help
Post by: smoothie on July 01, 2011, 07:12:09 AM
Okay so I tried to install XAMPP but I found out that the installation only appears to come in 32bit.

Beside the point..

I did a complete install of PostgreSql and created the appropriate tables and inserted some test user data. I still get the message when running ./pushpoold -E:

Code:
[2011-07-01 05:42:24.263811] invalid database.engine

Am I missing something? I even updated my server.json file with the proper settings.

What I am confused about is how pushpoold can be built/compiled and yet require a database engine in place to do that process, but when I try to run pushpoold I get a message saying "invalid database.engine".

Can someone please help me?

It seems like I am hitting every possible problem when it comes to pushpoold setup.

How did you compile it?

I compiled it with:

Code:
./configure
make
make install
./pushpoold -E


Title: Re: PUSHPOOL help
Post by: SomeoneWeird on July 01, 2011, 07:15:32 AM
Okay so I tried to install XAMPP but I found out that the installation only appears to come in 32bit.

Beside the point..

I did a complete install of PostgreSql and created the appropriate tables and inserted some test user data. I still get the message when running ./pushpoold -E:

Code:
[2011-07-01 05:42:24.263811] invalid database.engine

Am I missing something? I even updated my server.json file with the proper settings.

What I am confused about is how pushpoold can be built/compiled and yet require a database engine in place to do that process, but when I try to run pushpoold I get a message saying "invalid database.engine".

Can someone please help me?

It seems like I am hitting every possible problem when it comes to pushpoold setup.

How did you compile it?

I compiled it with:

Code:
./configure
make
make install
./pushpoold -E

do

Code:
./autogen.sh && ./configure && make && ./pushpoold -DE


Title: Re: PUSHPOOL help
Post by: smoothie on July 01, 2011, 06:33:34 PM
Okay so I tried to install XAMPP but I found out that the installation only appears to come in 32bit.

Beside the point..

I did a complete install of PostgreSql and created the appropriate tables and inserted some test user data. I still get the message when running ./pushpoold -E:

Code:
[2011-07-01 05:42:24.263811] invalid database.engine

Am I missing something? I even updated my server.json file with the proper settings.

What I am confused about is how pushpoold can be built/compiled and yet require a database engine in place to do that process, but when I try to run pushpoold I get a message saying "invalid database.engine".

Can someone please help me?

It seems like I am hitting every possible problem when it comes to pushpoold setup.

How did you compile it?

I compiled it with:

Code:
./configure
make
make install
./pushpoold -E

do

Code:
./autogen.sh && ./configure && make && ./pushpoold -DE


Okay I did ./autogen.sh and I get:
Code:
-bash: ./autogen.sh: No such file or directory


Here is what my pushpool directory looks like:
Code:
root@NCM:/home/pushpool-0.5.1# ls
aclocal.m4             config.status       example-cfg.json  msg.o
anet.c                 config.sub          hist.c            NEWS
anet.h                 configure           hist.o            protocol.h
anet.o                 configure.ac        htab.c            pushpoold
AUTHORS                COPYING             htab.h            README
autotools-config.h     db-mysql.c          htab.o            server.c
autotools-config.h.in  db-mysql.o          INSTALL           server.h
blkmond                db-postgresql.c     install-sh        server.json
ChangeLog              db-postgresql.o     m4                server.o
compile                db-sqlite.c         Makefile          stamp-h1
config.c               db-sqlite.o         Makefile.am       ubbp.h
config.guess           depcomp             Makefile.in       util.c
config.log             elist.h             missing           util.o
config.o               example-blkmon.cfg  msg.c

Am I missing a particular file?