Have you changed the dbname/dbuser/dbpass vars in your own config? Obviously. And also, is your table actually named pool_worker and has at least to fields - username & password? Yes. The password have to be in plain text, isn't it? Would you like a database dump? P.S.: Thanks for the support
|
|
|
Right, I compiled jine-pushpool; it connects to the PostgreSQL server, but now I get these errors: on the client ↓ % ./minerd --url http://192.168.1.99:8337/ --user test --pass test [2011-06-02 14:35:18] HTTP request failed: The requested URL returned error: 403 [2011-06-02 14:35:18] json_rpc_call failed, retry after 30 seconds
on the server ↓ % ./pushpoold -E -D 2 --config=config.json [1307021446.964664] Debug output enabled [1307021446.977801] Listening on host :: port 8336 [1307021446.978053] Listening on host :: port 8337 [1307021446.978140] Listening on host 127.0.0.1 port 8338 [1307021447.003793] initialized [1307021594.453532] client host ::ffff:192.168.1.210 port 45973 connected [1307021594.453781] client ::ffff:192.168.1.210 ended
This is the configuration file: % cat config.json { # network ports "listen" : [ # binary protocol (default), port 8336 { "port" : 8336 },
# HTTP JSON-RPC protocol, port 8337 { "port" : 8337, "protocol" : "http-json" },
# HTTP JSON-RPC protocol, port 8339, # with trusted proxy appserver.example.com forwarding # requests to us # # comment out if not using multiple servers #{ "port" : 8337, "protocol" : "http-json", # "proxy" : "appserver.example.com" },
# binary protocol, localhost-only port 8338 { "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" } ],
# database settings "database" : {
## # select one database engine and remove the other ones. ## # "engine" : "sqlite3", # "name" : "/tmp/data.sqlite",
# set to true to enable logging of shares to db # "sharelog" : true,
# edit queries to match your database structure if necessary # "stmt.pwdb" : # "SELECT password FROM pool_worker WHERE username = ?", # "stmt.sharelog" : # "INSERT INTO shares (time, rem_host, username, our_result, upstream_result, reason, solution) VALUES (?,?,?,?,?,?,?)"
# ... or ...
# "engine" : "mysql",
# 'host' defaults to localhost, if not specified # "host" : "mysql.example.com",
# 'port' uses proper default port for the DB engine, # if not specified # "port" : 3306,
# "name" : "mydatabasename", # "username" : "myuser", # "password" : "mypass",
# set to true to enable logging of shares to db # "sharelog" : true,
# edit queries to match your database structure if necessary # "stmt.pwdb" : # "SELECT password FROM pool_worker WHERE username = ?",
# "stmt.sharelog" : # "INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?,?,?,?,?,?)"
# ... or ...
"engine" : "postgresql",
"host" : "127.0.0.1",
"port" : 5432,
"name" : "dbname", "username" : "dbusername", "password" : "dbpassword",
# set to true to enable logging of shares to db "sharelog" : true,
# edit queries to match your database structure if necessary "stmt.pwdb" : "SELECT password FROM pool_worker WHERE username = $1", "stmt.sharelog" : "INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES ($1, $2, $3, $4, $5, decode($6, 'hex'))"
},
# cache settings # comment out to disable memcache - NOT RECOMMENDED "memcached" : { "servers" : [ { "host" : "127.0.0.1", "port" : 11211 } ] },
"pid" : "/tmp/pushpoold.pid",
# overrides local hostname detection #"forcehost" : "localhost.localdomain",
# logfiles for requests and shares "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 to bitcoind upstream server (same as bitcoin.conf if using original client) "rpc.url" : "http://127.0.0.1:8332/", "rpc.user" : "username", "rpc.pass" : "password",
# rewrite returned 'target' to difficulty-1? "rpc.target.rewrite" : true }
|
|
|
Hello, I'm a newbie here and this is my first post. I'm trying to set up a pushpool server using PostgreSQL as SQL server but I have some troubles: I compiled the daemon, I modified the configuration file in order to use postgresql and I adapted the mysql query that I found here for pgsql, but when I try to connect to the server, the daemon prints out this error: [1307005729.968275] pg_pwdb_lookup query failed: ERROR: syntax error at end of input LINE 1: SELECT password FROM pool_worker WHERE username = ? In PostgreSQL the object of the WHERE clause have to be in quotes, as you can see: pushpool=# SELECT password FROM pool_worker WHERE username = test; ERROR: column "test" does not exist LINE 1: SELECT password FROM pool_worker WHERE username = test; ^ pushpool=# SELECT password FROM pool_worker WHERE username = 'test'; password ---------------------------------- /* password in md5 */ (1 row)
So I modified the configuration file to: "stmt.pwdb" : "SELECT password FROM pool_worker WHERE username = '?'", but I get: [1307006155.225905] pg_pwdb_lookup query failed: ERROR: bind message supplies 1 parameters, but prepared statement "" requires 0
I'm doing wrong something or is a bug? Sorry for my very bad English. Tancredi.
|
|
|
|