Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: shads on July 31, 2011, 07:17:08 AM



Title: PoolServerJ - Tech Support
Post by: shads on July 31, 2011, 07:17:08 AM
Support thread for PoolServerJ (http://poolserverj.org/).  Ask you questions here.

In case you're wondering what PoolServerJ (http://poolserverj.org/) is http://forum.bitcoin.org/index.php?topic=33142.0

If you are using a bitcoind v0.3.24 or below ensure you have the 4diff patch (https://bitcointalk.org/index.php?topic=22585.msg384157#msg384157). There is a known bug that will bring poolserverj to a grinding halt if it occurs.  It is fixed in this patch and it also contains some massive performance improvements that will benefit poolserverj.  See this post (https://bitcointalk.org/index.php?topic=33142.msg539168#msg539168) for an explanation of how it affects poolserverj and why the fact that it doesn't slow down pushpool is not necessarily a good thing.

Support for performance issues

If you're having performance issues (high CPU load, slow response to workers etc) your problem is probably fixable.  Poolserverj has been proven to handle very high loads in production environments with minimal cpu usage.  There are a number of things that can cause these symptoms though.

If you want me to help you troubleshoot these sort of issues please help me out by providing the following info:

  • Poolserverj version
  • A summary of your hardware specs.
  • What patches are applied to your bitcoind (and if it's an alt chain daemon make sure you tell me that
  • How you've got yr pool components splits among servers.  i.e. are poolserverj, bitcoind, frontend, database on the same server?  Multiple bitcoinds?  On which servers.  What type of database.
  • A copy of your poolserverj properties file (Please remember to remove your passwords).
  • A sample of your log output (error and stdout) with debug=true.  About 10 mins worth is good but try to include a block change in that.
    If your load is not particularly high then also set trace=true and traceTargets=all.  Note: the only data this should contain that might be considered sensitive is worker login names and possibly ip addresses (if trace=true).  If you're concerned about this then scrub the log file first but please use some sort of regex find/replace with a marker so I can see where these events actually happened.
  • The output from running the script found in this post (https://bitcointalk.org/index.php?topic=33142.msg538639#msg538639).  This will dump two 2sec snapshots of server stats to log directory. This should be from the same time window as the log sample.

If you can't find me on IRC then PM for an email address to send this to.



Title: Re: PoolServerJ - Tech Support
Post by: de4l on August 26, 2011, 08:28:33 PM
this is probably an error on my part, but I was trying to setup the mysql database and went to import the example sql file provided but am getting this error:
Code:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE `poolserverj_native`.`shares` ( `id` bigint(30) NOT NULL AUTO_IN' at line 10
CREATE TABLE  `poolserverj_native`.`pool_worker` (
 `id` INT( 255 ) NOT NULL AUTO_INCREMENT ,
 `associatedUserId` INT( 255 ) NOT NULL ,
 `username` VARCHAR( 50 ) DEFAULT NULL ,
 `password` VARCHAR( 255 ) DEFAULT NULL ,
 `allowed_hosts` TEXT,
PRIMARY KEY (  `id` )
) ENGINE = MYISAM AUTO_INCREMENT =1 DEFAULT CHARSET = latin1 CREATE TABLE  `poolserverj_native`.`shares` (
 `id` BIGINT( 30 ) NOT NULL AUTO_INCREMENT ,


just needed 2 semicolons, 1 after each statement


Title: Re: PoolServerJ - Tech Support
Post by: de4l on August 27, 2011, 08:32:37 AM
I have noticed very poor performance when trying to run poolserverj with a solidcoin daemon, could I get you opinion if this is a) poor config on my part b) poolserverj does not like solidcoin c) solidcoin needs multi-threaded keepalive connections like this https://bitcointalk.org/index.php?topic=22585.0 d) other


Title: Re: PoolServerJ - Tech Support
Post by: shads on August 27, 2011, 10:10:59 AM
I have noticed very poor performance when trying to run poolserverj with a solidcoin daemon, could I get you opinion if this is a) poor config on my part b) poolserverj does not like solidcoin c) solidcoin needs multi-threaded keepalive connections like this https://bitcointalk.org/index.php?topic=22585.0 d) other

It could be several of those things...

I haven't tried psj with solidcoin but I can't see any reason it wouldn't work ok with so I wouldn't jump straight to b).

With regards to config yes there are some easy ways to turn psj into a pig and in fact some of the default settings in the sample config are probably not ideal as defaults.  With the right tuning it should fly though.  I've written a bit of a guide to performance tuning here: http://poolserverj.org/documentation/performance-memory-tuning/

But definately the first step is to ensure you've got a patched bitcoind.  I saw 10-20x performance increase in the rate of incoming works when I patched my daemon.  I don't know how heavily solidcoin has been modified so not sure how easy/hard it will be to apply that patch but it really is essential.  If patching isn't an option (or if it is and you just want more)... Then you could always setup a whole bunch of bitcoind's and feed them all into the poolserver. 


Title: Re: PoolServerJ - Tech Support
Post by: shads on August 27, 2011, 10:16:46 AM
just needed 2 semicolons, 1 after each statement

thanks, I've fixed the sample sql files in 0.2.9.  BTW 0.2.9 fixes a critical memory leak so please update.


Title: Re: PoolServerJ - Tech Support
Post by: de4l on August 27, 2011, 02:59:35 PM
I updated but now I'm getting this error, tried re-installing the service too
Code:
[2011-08-27 09:56:56] [info]  Running 'PoolServerJServicec' Service...
[2011-08-27 09:56:56] [info]  Starting service...
[2011-08-27 09:56:56] [error] %1 is not a valid Win32 application.
[2011-08-27 09:56:56] [error] Failed creating java C:\Program Files\Java\jdk1.7.0\jre\bin\server\jvm.dll
[2011-08-27 09:56:56] [error] %1 is not a valid Win32 application.
[2011-08-27 09:56:56] [error] ServiceStart returned 1
[2011-08-27 09:56:56] [error] %1 is not a valid Win32 application.
[2011-08-27 09:56:56] [info]  Run service finished.
[2011-08-27 09:56:56] [info]  Commons Daemon procrun finished


Title: Re: PoolServerJ - Tech Support
Post by: shads on August 27, 2011, 03:26:22 PM
Not sure what that one's all about I just did a diff between the 0.2.8 and 0.2.9 win-service.bat and they haven't changed... Are you running from the same directory?  If not you may need to remove the service before reinstalling.  Remember you *must* run win-service.bat from the bin directory or none of the paths will match up properly.

You can try running PoolServerJServicew.exe which is a gui interface to show all the service settings.  Check that all the paths in there are actually valid.  I'm just about to head to bed so if you don't have any luck let me know and I'll try a win-service install from the 0.2.9 binary in the morning and see what I can find.


Title: Re: PoolServerJ - Tech Support
Post by: shads on August 27, 2011, 11:17:11 PM
oops... that's a little embarrassing.  I put the 0.2.8 binary in the 0.2.9 distribution...
I've updated the archive on the download page and also put the single jar file there if you want to just download that and copy it over the old one.

Sorry about that...


Title: Re: PoolServerJ - Tech Support
Post by: de4l on August 28, 2011, 06:53:45 AM
Not sure what that one's all about I just did a diff between the 0.2.8 and 0.2.9 win-service.bat and they haven't changed... Are you running from the same directory?  If not you may need to remove the service before reinstalling.  Remember you *must* run win-service.bat from the bin directory or none of the paths will match up properly.

You can try running PoolServerJServicew.exe which is a gui interface to show all the service settings.  Check that all the paths in there are actually valid.  I'm just about to head to bed so if you don't have any luck let me know and I'll try a win-service install from the 0.2.9 binary in the morning and see what I can find.

I removed the older service and am starting over in a new folder, I re-downloaded the archive since you have updated it, still getting the same error, not sure what it is, could having 64bit java be messing with it? Even though I did have it running previously...


Title: Re: PoolServerJ - Tech Support
Post by: shads on August 28, 2011, 06:56:06 AM
did you try running the service gui and verifying that all paths etc it's recorded for the service are valid?


Title: Re: PoolServerJ - Tech Support
Post by: shads on August 28, 2011, 07:10:21 AM
ok just tried a service install using 0.2.9a.tar.gz (the one on the website).  It work both for a 1.6_u25 Sun JDK.  I tested both the 32bit and 64bit versions ok.  I haven't tried openJDK1.7 but I can't see any reason why it would fail.  Unless "C:\Program Files\Java\jdk1.7.0\jre\bin\server\jvm.dll" doesn't happen to exist in openJDK?

You might try editing win-service.bat and changing the options : --StartMode=jvm and --StopMode=jvm to either 'java' or 'exe' (no quotes).

Detail doc on service options available here: http://commons.apache.org/daemon/procrun.html

procrun can be a bitch to get right so I'm scared to touch it once I've found a working config.


Title: Re: PoolServerJ - Tech Support
Post by: de4l on August 28, 2011, 05:48:27 PM
ok just tried a service install using 0.2.9a.tar.gz (the one on the website).  It work both for a 1.6_u25 Sun JDK.  I tested both the 32bit and 64bit versions ok.  I haven't tried openJDK1.7 but I can't see any reason why it would fail.  Unless "C:\Program Files\Java\jdk1.7.0\jre\bin\server\jvm.dll" doesn't happen to exist in openJDK?

You might try editing win-service.bat and changing the options : --StartMode=jvm and --StopMode=jvm to either 'java' or 'exe' (no quotes).

Detail doc on service options available here: http://commons.apache.org/daemon/procrun.html

procrun can be a bitch to get right so I'm scared to touch it once I've found a working config.


I got it running and it seems much more stable than the last version, just need to do some performance tuning.  I fixed it by finally getting the gui to run and then selecting 'use default' instead of C:\Program Files\Java\jdk1.7.0\jre\bin\server\jvm.dll even though this file did exist, something was not working with it, no idea why.  I think the default might be using my 32bit jre instead of the 64bit jdk that I installed just for this, but after reading your tips that 32bit java was better in this instance.... I'll just let it go since it's running now.


Title: Re: PoolServerJ - Tech Support
Post by: Leandro César on September 08, 2011, 05:15:31 PM
Hi,

I am using the last poolserverj on Fedora 15 64 bits, jdk 1.6 update 26, bitcoind 0.3.24 and get the follow error:

org.json.JSONException: A JSONObject text must begin with '{' at character 1

Can you help me?

L.


Title: Re: PoolServerJ - Tech Support
Post by: shads on September 08, 2011, 10:43:01 PM
Hi,

I am using the last poolserverj on Fedora 15 64 bits, jdk 1.6 update 26, bitcoind 0.3.24 and get the follow error:

org.json.JSONException: A JSONObject text must begin with '{' at character 1

Can you help me?

L.

I'll try but I need a bit more information.  Can you make sure debug=true and logStacktrace=true then post the full stack strace.  Also can you describe what's actually happening?  Is it straight after start up?  Is it when you send a getwork request from a miner?  Is bitcoind running etc?


Title: Re: PoolServerJ - Tech Support
Post by: wtfman on September 12, 2011, 11:21:30 AM
Hey, I am trying to test PoolServerJ but I have a problem with the db inserts.

Using v0.29a

Error:
Code:
work submit success, result: false
Submit Throttling on: false
Doing database flush for Shares: 1
Failed to commit to database.
java.sql.BatchUpdateException: Field 'block_num' doesn't have a default value

Query being executed when exception was thrown:
INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution, time, source) VALUES ('xx.xx.xx.xx', 'test', 1, 0, null, '0001000131dcbc30ad5ae6021834e79139879666f1e628de6c78e9e600007d8a000000003c7fef66abefaba3bd824e32ab44351b8f0186196944b909c198b96ee01fc77a4e6de5471b00b269cce138bf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', '2011-09-12 11:09:38', 'namecoind-localhost')


        at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2024)
        at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
        at com.shadworld.poolserver.db.shares.DefaultPreparedStatementSharesDBFlushEngine.flushToDatabase(DefaultPreparedStatementSharesDBFlushEngine.java:111)
        at com.shadworld.poolserver.logging.ShareLoggingThread.run(ShareLoggingThread.java:156)
Caused by: java.sql.SQLException: Field 'block_num' doesn't have a default value

Query being executed when exception was thrown:
INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution, time, source) VALUES ('xx.xx.xx.xx', 'test', 1, 0, null, '0001000131dcbc30ad5ae6021834e79139879666f1e628de6c78e9e600007d8a000000003c7fef66abefaba3bd824e32ab44351b8f0186196944b909c198b96ee01fc77a4e6de5471b00b269cce138bf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', '2011-09-12 11:09:38', 'namecoind-localhost')


        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)
        at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1976)
        ... 5 more
Flushed 1 shares to DB in 35.0ms (28/sec)



Prepare Statement from Conf
Code:
### native - ensure usePushPoolCompatibleFormat=false
db.stmt.insertShare=INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution, time, source) VALUES (?, ?, ?, ?, ?, ?, ?, ?)


Now, there does seem the insert for block_num to be missing, but no idea where I should put it in. I have looked a bit at the source code but didnt get an exact info. Pls help


Title: Re: PoolServerJ - Tech Support
Post by: shads on September 12, 2011, 11:32:54 AM
Prepare Statement from Conf
Code:
### native - ensure usePushPoolCompatibleFormat=false
db.stmt.insertShare=INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution, time, source) VALUES (?, ?, ?, ?, ?, ?, ?, ?)


Now, there does seem the insert for block_num to be missing, but no idea where I should put it in. I have looked a bit at the source code but didnt get an exact info. Pls help

It's trying to write a null to a NOT NULL column... try

INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution, time, source, block_num, prev_block_hash) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ? ,?)

or alternately remove the NOT NULL restriction from the block_num and prev_block_hash columns.

The supplied sql scripts in 0.2.9 set those columns to NOT NULL which they probably shouldn't have.  Will be changed in the next release.

BTW Unless you've got a good reason for it I'd leave out the prev_block_hash column.


Title: Re: PoolServerJ - Tech Support
Post by: wtfman on September 12, 2011, 11:45:27 AM
thanks!


Title: Re: PoolServerJ - Tech Support
Post by: wtfman on September 18, 2011, 06:59:14 PM
hey, I tried to use latest poolserverj in pushpool compatible mode but it didnt work for me. I have a share table that isnt called 'shares' and I also set it up in the properties file, but still it tried to insert data into 'shares'

I adjusted the db to your design, it works so far, but just now I found this in the stdout:

Code:
Flushed 61 shares to DB in 35.0ms (1742/sec)
Pausing Share logging due to block change.
java.lang.IllegalStateException: IDLE,initial
        at org.eclipse.jetty.server.AsyncContinuation.complete(AsyncContinuation.java:449)
        at com.shadworld.poolserver.BlockChainTracker$NotifyLongpollClientsThread.run(BlockChainTracker.java:178)
java.lang.IllegalStateException: IDLE,initial
        at org.eclipse.jetty.server.AsyncContinuation.complete(AsyncContinuation.java:449)
        at com.shadworld.poolserver.BlockChainTracker$NotifyLongpollClientsThread.run(BlockChainTracker.java:178)
java.lang.IllegalStateException: IDLE,initial
        at org.eclipse.jetty.server.AsyncContinuation.complete(AsyncContinuation.java:449)
        at com.shadworld.poolserver.BlockChainTracker$NotifyLongpollClientsThread.run(BlockChainTracker.java:178)
java.lang.IllegalStateException: IDLE,initial
        at org.eclipse.jetty.server.AsyncContinuation.complete(AsyncContinuation.java:449)
        at com.shadworld.poolserver.BlockChainTracker$NotifyLongpollClientsThread.run(BlockChainTracker.java:178)
java.lang.IllegalStateException: IDLE,initial
        at org.eclipse.jetty.server.AsyncContinuation.complete(AsyncContinuation.java:449)
        at com.shadworld.poolserver.BlockChainTracker$NotifyLongpollClientsThread.run(BlockChainTracker.java:178)
java.lang.IllegalStateException: IDLE,initial
        at org.eclipse.jetty.server.AsyncContinuation.complete(AsyncContinuation.java:449)
        at com.shadworld.poolserver.BlockChainTracker$NotifyLongpollClientsThread.run(BlockChainTracker.java:178)
java.lang.IllegalStateException: IDLE,initial
        at org.eclipse.jetty.server.AsyncContinuation.complete(AsyncContinuation.java:449)
        at com.shadworld.poolserver.BlockChainTracker$NotifyLongpollClientsThread.run(BlockChainTracker.java:178)
java.lang.IllegalStateException: IDLE,initial
        at org.eclipse.jetty.server.AsyncContinuation.complete(AsyncContinuation.java:449)
        at com.shadworld.poolserver.BlockChainTracker$NotifyLongpollClientsThread.run(BlockChainTracker.java:178)


Title: Re: PoolServerJ - Tech Support
Post by: shads on September 19, 2011, 01:00:44 AM
Hi wtfman,

I assume you're running 0.2.9 then?  If so then those errors aren't a problem.  It's an expected exception and probably be logged.  I'm pretty sure it isn't unless you've got debug enabled.

However I really would recommend you get 0.3.0 working.  The longpolling has been rewritten from scratch which has given it huge performance boosts as well as fixing a of obscure errors.

Post some detail about the sql errors and I'll see if can help.  There should be no problem using a different share table name since you can specify the query in the properties file.  Post the query yr using, the table CREATE statement and any exceptions you're seeing in the log.


Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on September 20, 2011, 07:41:57 PM
I am currently 'testing' the latest 0.3.0rc1. The first thing i notice is the CPU usage. I am running in pushpoold compatability. So why this CPU usage? Pushpoold rarely used any CPU but PJS uses one full core.

The second thing i notice is that PSJ inserts shares quite a bit slower than pushpoold. And what it affects is the speed counted on my frontend. I am currently getting 40mh/s less detected in the frontend thereby people WILL lose coins.


Title: Re: PoolServerJ - Tech Support
Post by: shads on September 20, 2011, 10:58:33 PM
I am currently 'testing' the latest 0.3.0rc1. The first thing i notice is the CPU usage. I am running in pushpoold compatability. So why this CPU usage? Pushpoold rarely used any CPU but PJS uses one full core.

problem is most likely default cache size set too high.  see: source.local.1.maxCacheSize and source.local.1.cacheWaitTimeout

also: http://poolserverj.org/documentation/performance-memory-tuning/

I'm going to change the default settings in the next release to be more suitable for a small pool as I've had this default setup for some extreme load tests and I keep getting this question.  Suitable for a small pool is probably the most sane default since most people will fire it up in a low usage test environment first.  I figure anyone evaluating psj for a pool larger than a couple of hundred GH is more likely to read the documentation and make the high performance adjustments needed..

Quote
The second thing i notice is that PSJ inserts shares quite a bit slower than pushpoold. And what it affects is the speed counted on my frontend. I am currently getting 40mh/s less detected in the frontend thereby people WILL lose coins.

shares are logged slower to the database by design.

shares.maxEntrysToQueueBeforeCommit=5000

shares.maxEntryAgeBeforeCommit=10

you can effectively disable this delayed writing by setting these to 0.

You are not getting any less Hashes on your pool.  If anything you should be getting slightly more.  I'd lay money that the problem is with reporting.  The work is still being dished out, hashed, returned and if valid submitted to the bitcoind so nothing is going missing.  The timestamps are added when the work is submitted by the worker not when it's written to the database.  Is your database using timestamps with a CURRENT_TIMESTAMP default value by any chance?



Title: Re: PoolServerJ - Tech Support
Post by: wtfman on September 21, 2011, 09:23:52 PM
Hey shadders,

I have the following problem:

Some users experience a couple of rejected shares after each LP. This is what I can see in debug mode. You have an explanation or maybe even a solution for me here?

Thanks for your help

Quote
LP continuation reached LP servlet but is not in 'initial' state: AsyncContinuation@89e2f1@REDISPATCHED,resumed
LP continuation reached LP servlet but is not in 'initial' state: AsyncContinuation@3228a1@REDISPATCHED,resumed


Title: Re: PoolServerJ - Tech Support
Post by: shads on September 22, 2011, 01:30:15 AM
Hey shadders,

I have the following problem:

Some users experience a couple of rejected shares after each LP. This is what I can see in debug mode. You have an explanation or maybe even a solution for me here?

Thanks for your help

Quote
LP continuation reached LP servlet but is not in 'initial' state: AsyncContinuation@89e2f1@REDISPATCHED,resumed
LP continuation reached LP servlet but is not in 'initial' state: AsyncContinuation@3228a1@REDISPATCHED,resumed

I could be wrong but I think those log messages are a seperate and possibly unrelated thing.  Actually they shouldn't be a problem, what I think it is is that the request was previously suspended and resumed by the QoS filter before it reached the LP servlet.  I didn't take that into account and expected any LP request should arrive in an initial state.  I'll log it as a bug.   A workaround for now would be disable the QoS filter.  Actually I'd be interested to see if that makes a difference.

As for the rejected shares, the ideal sequence of events is something like:
1/ worker gets work
2/ worker submits share
3/ worker gets work
4/ psj detects new block
5/ psj collects fresh work from bitcoind
6/ psj sends LP response
7/ worker receives LP response
8/ worker submits share

The time between 4 and 7 should be very minimal but if worker happens to submit share in that space it will be rejected.  This should be no more than 1-2 seconds on a busy server provided the bitcoind is patched and able to feed new work to the poolserver fast enough.

If it's not some other fault then something is probably causing that gap to be higher than it should... watch the log during a block change with debug=true.  You should see when the new block is detected and it should also tell when all LP responses have been dispatched (and how long it took).  Anything longer a 1000ms is not ideal.  Large pools are able to push several thousand in under a second with psj.  A likely candidate for slowing this down is an unpatched bitcoind.  please see https://bitcointalk.org/index.php?topic=22585.msg384157#msg384157 if you don't have the multithreaded rpc patch.


Title: Re: PoolServerJ - Tech Support
Post by: wtfman on September 22, 2011, 10:15:30 AM
I actually have that patch running. Takes > 5 secs to dispatch the LP responses, though on a ~20 GHash/s load with 70 workers. I didn't even notice the incoming rate > 500/s ever, even after restart and big max cache.

Is it very likely  then, that it is caused by the server performance overall?


Title: Re: PoolServerJ - Tech Support
Post by: shads on September 22, 2011, 10:37:19 AM
Is it very likely  then, that it is caused by the server performance overall?

I doubt it, unless you're running on very limited hardware.  70 LP's should be taking 500ms *max* unless you're running on a pocket calculator with dialup.

perhaps you should try collecting some logs and send to me as described in this post: https://bitcointalk.org/index.php?topic=33142.msg538639#msg538639


Title: Re: PoolServerJ - Tech Support
Post by: shads on September 22, 2011, 11:50:29 AM
ok looked at yr logs and I can only see one possibility atm if you're running the 4diff patch...

source.local.1.blockmonitor.maxPollInterval=20

this is a constant 50 requests/sec.  Which is loading yr bitcoind as well as the pool... This should be fairly trivial to reasonable hardware though. 

What is the spec of yr server and what else is running on it?


Title: Re: PoolServerJ - Tech Support
Post by: shads on September 22, 2011, 10:40:52 PM
Is it very likely  then, that it is caused by the server performance overall?

ok looking at yr top output it looks like your system is definately paging.  You should probably restrict java's max heap size as it's default is quite greedy.  Take a look at: http://poolserverj.org/documentation/performance-memory-tuning/

Particularly the very last section: "Limit the JVM Heap Size"



Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on September 28, 2011, 02:29:07 PM
Quick question?

Is there a way to include the USER_ID found in the worker table when inserting into the shares table?


Title: Re: PoolServerJ - Tech Support
Post by: Nebuluz on September 28, 2011, 03:45:26 PM
First, awesome work there shad... PoolServerJ performance over pushpool is great.

Just got a two short question and a request :D

1)
 atm i'm running poolserverj in screen and it works great, but if anyone got other suggestion please post :D

2)
When i check the screen it looks like this:

Doing database flush for Shares: 10
Flushed 10 shares to DB in 9.0ms (1111/sec)
Trimmed 14 entries from workmap and 29 entries from duplicate check sets in 0ms
Dropping submit throttle to 2ms
Submit Throttling on: false
Doing database flush for Shares: 7
Flushed 7 shares to DB in 4.0ms (1749/sec)
Submit Throttling on: false
Doing database flush for Shares: 15
Flushed 15 shares to DB in 8.0ms (1874/sec)
Trimmed 16 entries from workmap and 1003 entries from duplicate check sets in 0ms
Submit Throttling on: false
Doing database flush for Shares: 14
Flushed 14 shares to DB in 4.0ms (3499/sec)

I just wonder what does Submit Throttling on: false mean?

Request:
I also got an request about ?method=getsourcestats, it would be nice to have a short description on what each stats really mean, if you could make a short list it would be nice.

Sorry all dumb question :)

Btw, i run bitcoind 0.4.0, did switch from bitcoind 0.3.24(patched with joelkatz diff4) and it seems to run great with the new bitcoind.

/Best regards


Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on September 29, 2011, 07:18:40 PM

2)
When i check the screen it looks like this:

Dude I have it running with "screen" command how do you check the screen?



Title: Re: PoolServerJ - Tech Support
Post by: shads on September 30, 2011, 09:46:34 AM
Quick question?

Is there a way to include the USER_ID found in the worker table when inserting into the shares table?

It's easy to do but I'd have to make a minor code change and add it as a config option so it doesn't break backward compatibility.

If you log a feature request on the source code repo site I'll add it to the todo list.


Title: Re: PoolServerJ - Tech Support
Post by: shads on September 30, 2011, 10:22:13 AM
First, awesome work there shad... PoolServerJ performance over pushpool is great.

Just got a two short question and a request :D

1)
 atm i'm running poolserverj in screen and it works great, but if anyone got other suggestion please post :D

2)
When i check the screen it looks like this:

Doing database flush for Shares: 10
Flushed 10 shares to DB in 9.0ms (1111/sec)
Trimmed 14 entries from workmap and 29 entries from duplicate check sets in 0ms
Dropping submit throttle to 2ms
Submit Throttling on: false
Doing database flush for Shares: 7
Flushed 7 shares to DB in 4.0ms (1749/sec)
Submit Throttling on: false
Doing database flush for Shares: 15
Flushed 15 shares to DB in 8.0ms (1874/sec)
Trimmed 16 entries from workmap and 1003 entries from duplicate check sets in 0ms
Submit Throttling on: false
Doing database flush for Shares: 14
Flushed 14 shares to DB in 4.0ms (3499/sec)

I just wonder what does Submit Throttling on: false mean?

Request:
I also got an request about ?method=getsourcestats, it would be nice to have a short description on what each stats really mean, if you could make a short list it would be nice.

Sorry all dumb question :)

Btw, i run bitcoind 0.4.0, did switch from bitcoind 0.3.24(patched with joelkatz diff4) and it seems to run great with the new bitcoind.

/Best regards

1/ daemonizing poolserverj has been on my todo list since day one but this is actually the first time anyone has asked about it.  I'm not much of a bash expert but I think if you do something like this:

normalStartCommand > mylogfile.txt &

that should redirect the output to a file and run it as a background process so you can keep using your shell. 

2/ submit throttling is a fairly useless feature.  It kicks in if a db flush is triggered and the previous one hasn't finished yet.  It was useful during stress testing when I had a fixed number of fake miners so it would effectively throttle the submit rate.  In the real world though it won't really have any effect aside from giving the miner a short delay before they receive a response to their share submits...  I will get rid of it one of these days.

3/ getsourcestats is also something I built as an aid to testing so I didn't really give much though to making it readable.  Most of the stats are useful, some of them do nothing and some give completely rubbish results.  I also have a TODO to turn that in proper API probably with JSON output so when that's done and I've stripped out the useless stuff and put some other more useful things in I'll write up some doco...

But for now here's a brief rundown (comments in italics):

Memory used: 4.4375 MB - Freed by GC: 9.900390625MB

This only refers to heap memory.  Depending on how many connection threads you've got assigned you can add about 10-30mb to this to get real memory usage.  The total of 'used' + 'freed' is approx the currently allocated heap size.

State [bitcoind-patch] these stats are per daemon, if you multiples you see this section repeated
   
    Current Cache Max: 1000 - min/max: 1/1000
    Current Cache Size: 998
this is the work cache.  min/max are meaningless atm.  There used to be a dynamic cache sizing algorithm but it was a bit crap so I took it out.  The 1000 represent the max number before it will stop calling for more work.  The 998 is current number in cache.  This can occasionally creep over your max by up to Concurrent DL Requests.

    Concurrent DL Requests: 10 - min/max: 1/20

This is a gotcha, currently this gets set to 1/2 the value you've set.  Another hangover from the old dynamic cache sizing algo which also regulated request rate.

    DL Request Interval (ms): 0 - min/max: 0/100
    Current Ask Rate (works/req): 10

these 2 are rubbish

    Consecutive Connect Fails: 0
    Consecutive Http Fails: 0
    Consecutive Http Auth Fails: 0
    Consecutive Http Busy Fails: 0

These do actually work but they'll always be zero unless yr daemon crashes or you have network problems between psj and bitcoind.

    Cache Excess: 1,002.5
    Cache Excess Trend: 0.06

rubbish

    Cache Retreival Age: 13885

avg age of work work when retrieved from cache.  measured in millis from when it was retrieved from daemon

    Incoming Rate: 36.69/sec

how many works/sec you're getting from the daemon.  This doesn't represent the maximum but if you look straight after a block change for a few seconds it will probably be close.

    Incoming Fullfillment Rate: 100%

number request/number received.  This will drop under 100% if you have http errors or daemon stops responding to requests for any reason.

    Outgoing Requested Rate: 0.78/sec
    Outgoing Delivered Rate: 0.78/sec
    Outgoing Fullfillment Rate: 100%

same thing basically.  Except if fullfillment drops below it most likely means psj can't get work from the daemon fast enough.

Longpoll Connections: 1 / 1000

Ignore the 1000.  There used to be a limit but there's not anymore.  Connections will include connections that have been silently dropped by the client but not connection that have expired.

WorkSource Stats:
      Stats for source: [bitcoind-patch]
        Current Block: 147243
        Cache:
          Work Received: 42965
          Work Delivered: 978

fairly obvious, duplicate below

          Upstream Request Fail Rate: 0%
          Upstream Request Fail Rate Tiny: 0%
rubbish

          Immediately Serviced Rate: 91.2%

This one is worth a comment.  Immediately serviced mean miner request work, psj checked cache and found one already available.  If the cache is empty it will wait a few seconds for one to arrive and this counts as 'not immediate'  In reality it might only be a millisecond or two.

          MultiGet Delivery Rate: ?%
          Delayed Serviced Rate: 100%
          Not Serviced Rate: 0%
          Expired Work Rate: 100%
rubbish

          Duplicate Work Rate: 0%

Usually 0 but if you have an unpatched daemon there's a bug that cause duplicates... If you ever see this higher than 0.01% keep an eye on it, it's a definately indicator something is wrong.

          Cache Growth Rate: 17.228%
          Cache Growth Rate Short: 29.76%

rubbish

        Work Submissions:
          Work Supplied: 978
          Work Submitted: 0
          Work Submitted Invalid: 0
          Work Submitted Unknown: 0
          Work Submitted Valid: 0
          Work Submitted Valid Real: 0

not rubbish but doesn't work.

        HTTP:
          Requests Issued: 42972
          Fail Rate: 0%
          Success trip time: 24.56 ms
          Header trip time: 24.55 ms
          Fail trip time: ? ms
          Expire trip time: ? ms

These are about the HTTP connection between psj and daemon.  Nothing to do with miner side of the server.  The trip times are a useful for tuning max concurrent connections... Once the latency start to go up dramatically you've probably got too many.

        Cache Age:
          Entries: 998 Oldest: 10337 Newest: 4032 Avg: 5418 Reject Rate: 0%

stats on the current contents of the cache.  Oldest. Newest, Avg are age in millis.  Reject Rate is basically the same thing a Duplicate rate except with a different moving average period.


Title: Re: PoolServerJ - Tech Support
Post by: eleuthria on October 06, 2011, 08:34:12 PM
If it's not some other fault then something is probably causing that gap to be higher than it should... watch the log during a block change with debug=true.  You should see when the new block is detected and it should also tell when all LP responses have been dispatched (and how long it took).  Anything longer a 1000ms is not ideal.  Large pools are able to push several thousand in under a second with psj.

Just to add a reference point, BTC Guild pushes out between 6,000 and 8,000 LPs depending on the time of day.  Our average time is between 600ms and 1000ms.  It can be even faster if both of our bitcoinds detected the new block simultaneously (our record was 490ms for ~7,500 LPs).  This is with two bitcoind clients, running on dedicated servers.  One is local on the same server as PSJ, one is running on another server in the same datacenter which runs the database.

This may improve even more soon, ArtForz has been looking into an extra optimization in bitcoind's getwork code and merging it with JoelKatz's 4diff patch.


Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on October 09, 2011, 02:28:09 AM
Can you please add the X-Roll-Ntime header?


Title: Re: PoolServerJ - Tech Support
Post by: wtfman on October 23, 2011, 11:36:04 AM
running mm-0.5 I stumble upon this error every now and then.

org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException
        at org.eclipse.jetty.io.UncheckedPrintWriter.setError(UncheckedPrintWriter.java:107)
        at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:280)
        at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:295)
        at java.io.PrintWriter.append(PrintWriter.java:977)
        at com.shadworld.poolserver.LongpollHandler.completeLongpoll(LongpollHandler.java:177)
        at com.shadworld.poolserver.LongpollHandler$LongpollTimeoutTask.call(LongpollHandler.java:340)
        at com.shadworld.poolserver.LongpollHandler$LongpollTimeoutTask.call(LongpollHandler.java:1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: org.eclipse.jetty.io.EofException
        at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:911)
        at org.eclipse.jetty.http.AbstractGenerator.flush(AbstractGenerator.java:431)
        at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:89)
        at org.eclipse.jetty.server.HttpConnection$Output.flush(HttpConnection.java:1139)
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:168)
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:96)
        at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:126)
        at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:283)
        at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:107)
        at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:271)
        ... 12 more
Caused by: java.io.IOException: Broken pipe
        at sun.nio.ch.FileDispatcher.writev0(Native Method)
        at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51)
        at sun.nio.ch.IOUtil.write(IOUtil.java:182)
        at sun.nio.ch.SocketChannelImpl.write0(SocketChannelImpl.java:383)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:406)
        at java.nio.channels.SocketChannel.write(SocketChannel.java:384)
        at org.eclipse.jetty.io.nio.ChannelEndPoint.gatheringFlush(ChannelEndPoint.java:347)
        at org.eclipse.jetty.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:285)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:259)
        at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:843)
        ... 21 more


Title: Re: PoolServerJ - Tech Support
Post by: Jine on October 23, 2011, 01:56:34 PM
I've started testing poolserverj at bitcoins.lc for handling larger loads better (Having issues with LP's against large amount of connections).
But before rolling out anything public, i really need to get rid of the DATETIME-fields in MySQL. Is that possible?

I'd like to have everything in GMT UNIX Timestamps. One "hackish" way would be to do the conversion in the statement, but I'd like actually make poolserverj to insert unix timestamp instead of having to do a TO_UNIXTIME(?) in the statment.

Even better would be to drop MySQL entirely and finally use a better scaling database (MongoDB/other No-sql DB) and let Mongo take care of timestamps by it's own, also let mongodb take care of replication and load balancing / sharding.

Any planned NoSQL-support?


Title: Re: PoolServerJ - Tech Support
Post by: wtfman_mobile on October 23, 2011, 02:37:32 PM
hey again.

there was even another issue with running mm-0.5. It worked great until first Long Poll, then CPU usage skyrocketed and didnt drop any more. After a couple of mins the work queue was emptied out so miners only received No Work available message and pool hash rate dropped to 0.0 Hash/s.

I have tried it before with only 2 miners in testnet and there was no problem. Problem occured with approximately 15Ghash/s and 60 workers.


Title: Re: PoolServerJ - Tech Support
Post by: urstroyer on October 23, 2011, 03:17:58 PM
hey again.

there was even another issue with running mm-0.5. It worked great until first Long Poll, then CPU usage skyrocketed and didnt drop any more. After a couple of mins the work queue was emptied out so miners only received No Work available message and pool hash rate dropped to 0.0 Hash/s.

I have tried it before with only 2 miners in testnet and there was no problem. Problem occured with approximately 15Ghash/s and 60 workers.

I have exactly the same issue, poolserverj mm is running smooth at low cpu usage and finding both nmc and btc blocks until network block is found and lp happens.
Then bitcoind is under heavy cpu usage until i restart the poolserverj. We currently use a 4diff patched version of vinced bitcoind.


Title: Re: PoolServerJ - Tech Support
Post by: shads on October 24, 2011, 12:05:52 AM
running mm-0.5 I stumble upon this error every now and then.

org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException
        at org.eclipse.jetty.io.UncheckedPrintWriter.setError(UncheckedPrintWriter.java:107)
        at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:280)
        at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:295)
        at java.io.PrintWriter.append(PrintWriter.java:977)
        at com.shadworld.poolserver.LongpollHandler.completeLongpoll(LongpollHandler.java:177)

This is a normal/expected exception.  It happens when psj tries to send a longpoll response but the client has silently dropped the connection.  In this case psj will recycle the work for the next LP connection in the queue.

The reason yr seeing it now and may not have before is that while psj-mm is in alpha I'm dumping a lot more events to the log so I can see better what's going on inside.  This particularly exception happens all the time with pre-mm version but isn't logged.


Title: Re: PoolServerJ - Tech Support
Post by: shads on October 24, 2011, 12:21:57 AM
I've started testing poolserverj at bitcoins.lc for handling larger loads better (Having issues with LP's against large amount of connections).
But before rolling out anything public, i really need to get rid of the DATETIME-fields in MySQL. Is that possible?

I'd like to have everything in GMT UNIX Timestamps. One "hackish" way would be to do the conversion in the statement, but I'd like actually make poolserverj to insert unix timestamp instead of having to do a TO_UNIXTIME(?) in the statment.

Even better would be to drop MySQL entirely and finally use a better scaling database (MongoDB/other No-sql DB) and let Mongo take care of timestamps by it's own, also let mongodb take care of replication and load balancing / sharding.

Any planned NoSQL-support?

Well before the advent of merged mining PSJ had exceptional longpoll performance but as you can see from the last few posts in this thread there's a few issues to be ironed out....

There is one good reason why you'd want to have timestamps set on the psj side rather than DB side.  Because psj caches shares and bulk writes them there can be a delay between when they came in and when the DB sees them.  PSJ timestamps the share as soon as it's received and uses this timestamp when writing to the db.  So if accurate share times are important to you that's something to consider.

I'm not really familiar with mongo or no-sql.  If they have JDBC drivers then adding support would be fairly trivial.  However it won't happen until mm is stabilised.  Dropping mysql support isn't likely sits it's most commonly used.

Having poolserver insert a timestamp directly should also be fairly trivial.  The internal representation is the same as a unix timestamp GMT but in millis instead of seconds.  If you're comfortable building from source it would only be a couple of lines needed modding in DefaultPreparedStatementSharesDBFlushEngine.  If you really want crazy performance and your share writes don't update existing rows have a look at the bulkloader engines in the source.

I presume what yr actually after is just an integer column?  If so have you tried just changing the column type to see if it works?  The code that sets is this:
stmt.setTimestamp(7, new Timestamp(entry.createTime));

And I have a feeling if the target column type is a BIGINT it will probably just convert it.

If not the change you'd need to make would be something like:
stmt.setLong(7, entry.createTime / 1000);


Title: Re: PoolServerJ - Tech Support
Post by: shads on October 24, 2011, 12:30:22 AM
hey again.

there was even another issue with running mm-0.5. It worked great until first Long Poll, then CPU usage skyrocketed and didnt drop any more. After a couple of mins the work queue was emptied out so miners only received No Work available message and pool hash rate dropped to 0.0 Hash/s.

I have tried it before with only 2 miners in testnet and there was no problem. Problem occured with approximately 15Ghash/s and 60 workers.

I have exactly the same issue, poolserverj mm is running smooth at low cpu usage and finding both nmc and btc blocks until network block is found and lp happens.
Then bitcoind is under heavy cpu usage until i restart the poolserverj. We currently use a 4diff patched version of vinced bitcoind.


When you see this happen can you try checking http://localhost:8997/?method=getsourcestats and report back is Duplicate rate or Reject rate are above zero?

If not can you set debug=true trace=true traceTargets=merged and throw the output onto pastebin?


Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on October 24, 2011, 02:20:46 AM
hey again.

there was even another issue with running mm-0.5. It worked great until first Long Poll, then CPU usage skyrocketed and didnt drop any more. After a couple of mins the work queue was emptied out so miners only received No Work available message and pool hash rate dropped to 0.0 Hash/s.

I have tried it before with only 2 miners in testnet and there was no problem. Problem occured with approximately 15Ghash/s and 60 workers.

I have exactly the same issue, poolserverj mm is running smooth at low cpu usage and finding both nmc and btc blocks until network block is found and lp happens.
Then bitcoind is under heavy cpu usage until i restart the poolserverj. We currently use a 4diff patched version of vinced bitcoind.

This also happens to me with mm-psj  one suggestion from shadders was to set forceAllSubmitsUpstream to false.

I have not tried it.  Also you should lower your work cache sizes big time.

I know you where upset with me in the chat room for not using/testing it but I had a working part of my pool and many other parts that where not working I had to prioritize them as people wanted me to expand into other countries.

Also I was hoping you would find the bug and issue a new version before I got a chance to retry your suggestions.


Title: Re: PoolServerJ - Tech Support
Post by: urstroyer on October 24, 2011, 04:58:40 PM
hey again.

there was even another issue with running mm-0.5. It worked great until first Long Poll, then CPU usage skyrocketed and didnt drop any more. After a couple of mins the work queue was emptied out so miners only received No Work available message and pool hash rate dropped to 0.0 Hash/s.

I have tried it before with only 2 miners in testnet and there was no problem. Problem occured with approximately 15Ghash/s and 60 workers.

I have exactly the same issue, poolserverj mm is running smooth at low cpu usage and finding both nmc and btc blocks until network block is found and lp happens.
Then bitcoind is under heavy cpu usage until i restart the poolserverj. We currently use a 4diff patched version of vinced bitcoind.


When you see this happen can you try checking http://localhost:8997/?method=getsourcestats and report back is Duplicate rate or Reject rate are above zero?

If not can you set debug=true trace=true traceTargets=merged and throw the output onto pastebin?


Running psj mm for an hour now with 35gh/s load an got some new test results.

I seems like the heavy cpu load (70-80%) on bitcoind happens CAN happen on every lp which was trigged from a new network block.

When this happens, i noticed that the field block_num in shares table gets the current NMC block number!

It also happend that on another network block and lp the cpu usage got back to normal 3-5% load and guess what! The field block_num in shares table got the BTC block number again on every share.

The situation can actually switch every on every lp.

Here are two snapshots of getsourcestats:
#### 1 minute after starting psj (heavy cpu load, nmc block_num in shares table) ####
http://pastebin.com/BMAx0vgG

#### 30 minute after starting psj (heavy cpu load, nmc block_num in shares table) ####
http://pastebin.com/zViA7K5b

#### Console on lp (normal cpu load to heavy cpu load) ####
http://pastebin.com/zhfQG1ES

I couldn't figure out what circumstances cause this effect, it seems pretty random to me. Maybe can help.


Title: Re: PoolServerJ - Tech Support
Post by: shads on October 25, 2011, 01:26:36 AM
Thanks for the info Urstroyer...  I think this is the indicator I needed:

Code:
#
Incoming Rate: 3,387.53/sec
Incoming Fullfillment Rate: 100%
Outgoing Requested Rate: 29.5/sec

Somewhere in the chain it's discarding valid work and getting more from the daemon.  Not because of duplicates in this case.  One of the validation checks it does is to ensure the work is from the current block before sending out.  It seems having different sets of block numbers is causing a bit confusion.

I'm actually nearly ready to release the fix that should make longpolling work for both chains and I've replaced the blocknum field (which was just a long int) which a new BlockNumbers class that tracks blocks for all chains so that should be the end of it with a bit of luck.


Title: Re: PoolServerJ - Tech Support
Post by: shads on October 25, 2011, 07:26:44 AM
MM edition .06 is now on the downloads page.  This is first version of MM that I'm reasonably happy with.

It should now be sending longpolls if either block changes and the server is now actively monitoring the state of all block chains..  Issues with high CPU load caused by PSJ rejecting valid work should also be resolved.

If you are going to try it I'd appreciate if you could set the following:
debug=true
trace=true
traceTargets=blockmon

If anything odd happens this should give me some useful info to play with.


Title: Re: PoolServerJ - Tech Support
Post by: wtfman on October 25, 2011, 07:55:35 AM
MM edition .06 is now on the downloads page.  This is first version of MM that I'm reasonably happy with.

It should now be sending longpolls if either block changes and the server is now actively monitoring the state of all block chains..  Issues with high CPU load caused by PSJ rejecting valid work should also be resolved.

If you are going to try it I'd appreciate if you could set the following:
debug=true
trace=true
traceTargets=blockmon

If anything odd happens this should give me some useful info to play with.


great, testing it right now


Title: Re: PoolServerJ - Tech Support
Post by: urstroyer on October 25, 2011, 10:18:59 AM
Running very smooth now! Great work! Even lp is happening quite often, seems to work out.

I'll report back after some more hours on load.


Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on October 25, 2011, 01:25:48 PM
MM edition .06 is now on the downloads page.  This is first version of MM that I'm reasonably happy with.

It should now be sending longpolls if either block changes and the server is now actively monitoring the state of all block chains..  Issues with high CPU load caused by PSJ rejecting valid work should also be resolved.

If you are going to try it I'd appreciate if you could set the following:
debug=true
trace=true
traceTargets=blockmon

If anything odd happens this should give me some useful info to play with.


100 GHs and looking good!
I have everything set except:
traceTargets=blockmon


I have a good feeling about this one.


Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 01, 2011, 03:14:27 PM
If the connection between MySQL and poolserverj goes down (timeout and/or other reasons), the server having issues with doing reconnects, please read the following error message.

Quote
java.sql.BatchUpdateException: The last packet successfully received from the server was 4,664,997 milliseconds ago.  The last packet sent successfully to the server was 1,950,645 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

How do i set autoReconnect=true?

I can increase the timeout on the serverside, but feels kinda non-optional.

/ Jim


EDIT:
This is for the non-MM version.


Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 01, 2011, 03:20:41 PM
Hmm, strange.. noticed the JDBC-url which contains autoReconnect=true.
I'm having issues with writing shares to the db so... Get the errormessage above in the log.


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 01, 2011, 03:21:36 PM
I could have sworn I'd set that because I've seen this problem before.  I've just changed it as a default setting which will require a full release since it's buried in once of the support libs... Since yr obviously building from source you can set it in the Conf class.

Add the line:
workerSql.getJdbcOptionMap().put("autoReconnect", "true");

just after:
workerSql = new MySql(whost, wport == null ? "3306" : String.valueOf(wport), wschema, wuser, wpassword);



Title: Re: PoolServerJ - Tech Support
Post by: shads on November 01, 2011, 03:23:54 PM
Hmm, strange.. noticed the JDBC-url which contains autoReconnect=true.
I'm having issues with writing shares to the db so... Get the errormessage above in the log.

aaahh when I had that issue previously it was with the workerSql connection not the shares one so whatever I changed may have only affected that.  Add that same line but where I said 'workerSql' use 'sharesSql'.



Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 01, 2011, 03:28:29 PM
I'm going to throw that in soon, i restarted PSJ and now I'm getting this error...

Quote
Failed to commit to database.
java.sql.BatchUpdateException: Field 'block_num' doesn't have a default value

Query being executed when exception was thrown:
INSERT INTO pool_shares (rem_host, username, our_result, upstream_result, reason, solution, time) VALUES ('213.112.59.222', 'Ly5pv6', 1, 0, null, '00000001763915294e20 .... 000000000080020000', UNIX_TIMESTAMP('2011-11-01 16:26:22'))



        at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2024)
        at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
        at com.shadworld.poolserver.db.shares.DefaultPreparedStatementSharesDBFlushEngine. flushToDatabase(DefaultPreparedStatementSharesDBFlushEngine.java:127)
        at com.shadworld.poolserver.logging.ShareLoggingThread.run(ShareLoggingThread.java:156)

Any ideas?

My config (snippet):

Quote
usePushPoolCompatibleFormat=false

...

db.stmt.insertShare=INSERT INTO pool_shares (rem_host, username, our_result, upstream_result, reason, solution, time) VALUES (?, ?, ?, ?, ?, ?, UNIX_TIMESTAMP(?))


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 01, 2011, 03:30:42 PM
block_num column in sample db script is set to 'not null'... change it and it should be fine..


Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 01, 2011, 03:31:59 PM
Dooooooh! Stupid me, thanks :)


Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 01, 2011, 04:38:37 PM
Hmm, strange.. noticed the JDBC-url which contains autoReconnect=true.
I'm having issues with writing shares to the db so... Get the errormessage above in the log.

aaahh when I had that issue previously it was with the workerSql connection not the shares one so whatever I changed may have only affected that.  Add that same line but where I said 'workerSql' use 'sharesSql'.



Quote
               if (workerSql != null)
                        workerSql.getJdbcOptionMap().put("autoReconnect", "true");
                if (sharesSql != null)
                        sharesSql.getJdbcOptionMap().put("autoReconnect", "true");

Seems like it's already there.
Does the 0.3.0-FINAL version contain that to? I'm using that for testing now, to avoid any potential issues with my own patches/fixes :)

A 0.3.1 version based upon the latest hg would be awesome, as i having a bit of issues with compiling the code from bitbucket. (Have to setup a better development environment)

/ Jim


Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 01, 2011, 04:48:15 PM
There is something seriously wrong with my setup (MySQL+PSJ), getting all kinds of mysql-issues, this is the latest:

Quote
Failed to commit to database.
java.sql.BatchUpdateException: Communications link failure

The last packet successfully received from the server was 703,780 milliseconds ago.  The last packet sent successfully to the server was 9 milliseconds ago.

Query being executed when exception was thrown:
INSERT INTO pool_shares (rem_host, username, our_result, upstream_result, reason, solution, time) VALUES ('213.112.59.222', 'Ly5pv6', 1, 0, null, '000000019e4eb299110ef922bf6f3cfe7dbb2c69157066e567b36266000008d200000000340305a 3500db5479f929646294649725a231962027d44a503d5f67af87fbdd34eb021d51a0df0ca3c9ee9 0200000080000000000000000000000000000000000000000000000000000000000000000000000 0000000000080020000', UNIX_TIMESTAMP('2011-11-01 17:45:09'))


        at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2024)
        at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
        at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
        at com.shadworld.poolserver.db.shares.DefaultPreparedStatementSharesDBFlushEngine. flushToDatabase(DefaultPreparedStatementSharesDBFlushEngine.java:127)
        at com.shadworld.poolserver.logging.ShareLoggingThread.run(ShareLoggingThread.java:156)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure

The last packet successfully received from the server was 703,780 milliseconds ago.  The last packet sent successfully to the server was 9 milliseconds ago.

Any ideas? :(


Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 01, 2011, 05:39:12 PM
A restart of PSJ solved it, but the issue is kinda strange. The connection between mysql and PSJ seems to break from time to time with 0.3.0-FINAL.


Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on November 01, 2011, 06:33:16 PM
Does poolserverj have rollntime support?


Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 01, 2011, 08:37:16 PM
Yes, it does.


Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 01, 2011, 08:40:07 PM
I'm still having serious issues with the db-connectivity.
Even with miners working against the poolserver, i get this issue.

Quote
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: The last packet successfully received from the server was 8,777,967 milliseconds ago.  The last packet sent successfully to the server was 7,665,562 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 02, 2011, 12:43:06 AM
Does poolserverj have rollntime support?

It sort of does but not really... Meaning I half implemented it but never finished it.  It won't take much to finish but it will require a fairly extensive testing cycle afterwards.  I doubt it will ever support noncerange.  Supporting noncerange requires additional overhead for not much gain and with internal work generation about to be released which is orders of magnitude faster than json-rpc getwork, generating work is very cheap and unlikely to ever be a bottleneck again unless one day we have peta-hash pools.


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 02, 2011, 12:51:08 AM
I'm still having serious issues with the db-connectivity.
Even with miners working against the poolserver, i get this issue.

Quote
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: The last packet successfully received from the server was 8,777,967 milliseconds ago.  The last packet sent successfully to the server was 7,665,562 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

I've only seen these sorts of issues twice before.  Onces was in a test setup where worker connection was unused for over 24 hours.  The other which looked a lot more like the quoted exception was using bulkloader engines but that was kind of a special case.  Using LOAD DATA INFILE statements with internal streams masqerading as the the LOCAL file. 

In any case I'm still a bit baffled.  The MySql class checks the state of the connection before using it.  i.e. if (conn.isClosed()) prepareConnection();  So this should only occur if the server is dropping the connection silently as far as I can tell and if it is then mysql is behaving pretty badly.  I will have a look at the code again today just to be sure though.

I notice in all these examples the time since last use is very high.  Do you have a miner running off the test pool constantly?  I wonder if that's the case if you're ever likely to see this in production?  Aside from the one example above which was a pretty unusual case I've never heard any reports of this happening in the field. 


Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 02, 2011, 08:59:33 AM
Yes, i do have a miner working at ~6mh or something for testing. (A few shares per hour)
I'll point my 300mh miner against it as soon as i get home later tonight.

But still, pretty scary if this would happen in production - no shares are logged in db...
A hard restart of PSJ is required to get it up and running again.

Then it works for a few shares (at 6mh) and then it goes bad again.


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 02, 2011, 11:26:28 AM
But still, pretty scary if this would happen in production - no shares are logged in db...
A hard restart of PSJ is required to get it up and running again.

True... I'm keen to find the source of it but as I said to my knowledge it's never happened in production.

BTW which version are you running?


Title: Re: PoolServerJ - Tech Support
Post by: Jine on November 02, 2011, 11:56:24 AM
0.3.0-FINAL, the binary version.

I'm struggling to compile from source, any walk-through or similar? Debian Squeeze, apt-get install maven2... then what? :)

EDIT:
Been playing around with mvn compile/install, installed all libs_non-mvn into my repo, but when i run "mvn compile" in poolserverj-core (which is a dependencie for poolserverj-core) i get this error:

Quote
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

/usr/src/bitcoin-poolserverj/poolserverj-core/src/main/java/com/shadworld/poolserver/entity/Worker.java:[70,16] generics are not supported in -source 1.3
(use -source 5 or higher to enable generics)
        private HashSet<String> allowedHosts = new HashSet();

/usr/src/bitcoin-poolserverj/poolserverj-core/src/main/java/com/shadworld/poolserver/entity/Worker.java:[77,17] for-each loops are not supported in -source 1.3
(use -source 5 or higher to enable for-each loops)
                        for (String h : allowedHosts) {

/usr/src/bitcoin-poolserverj/poolserverj-core/src/main/java/com/shadworld/poolserver/entity/UniquePortionString.java:[47,2] annotations are not supported in -source 1.3
(use -source 5 or higher to enable annotations)
        @Override

/usr/src/bitcoin-poolserverj/poolserverj-core/src/main/java/com/shadworld/poolserver/entity/FastEqualsSolution.java:[17,2] annotations are not supported in -source 1.3
(use -source 5 or higher to enable annotations)
        @Override

EDIT:
Installed poolserverj-core with mvn install:install-file, but I'm running into the same issue with compiling poolserverj-main :/


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 05, 2011, 02:23:15 AM
Sorry I missed this post somehow... Your maven build is set to use java compliance level 1.3  I can't actually recall the setting but you need to declare the compliance level in the pom.xml file.

As an alternative I've just posted a guide to setting up the project in eclipse.  This is not for a maven setup but it's quickest easiest way to do it.  The only disadvantage is that you won't have attached source for some of the dependencies but unless it's very rare you need to go into those for debugging.

The guide is here:
http://poolserverj.org/documentation/guide-to-setting-up-poolserverj-in-eclipse-3-7/

If you set it up this way you'll be able to run poolserverj inside eclipse which will allow you to use all the debug features to follow what's going on.


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 05, 2011, 11:20:39 PM
I'm still having serious issues with the db-connectivity.
Even with miners working against the poolserver, i get this issue.

Quote
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: The last packet successfully received from the server was 8,777,967 milliseconds ago.  The last packet sent successfully to the server was 7,665,562 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

just added handling on the worker db connection to catch connection exceptions and make an attempt to close and reopen connection.  Working on the shares connection now but that's a bit more involved.  I figure while I'm there I might as well deal with this feature request:
https://bitbucket.org/shadders/bitcoin-poolserverj/issue/10/failed-to-commit-to-database-should-cache

When connection fails start serializing shares to disk and recover them and start feeding to DB once connection state is normal again.


Title: Security HOTFIX - PLEASE UPDATE
Post by: shads on November 06, 2011, 05:58:41 AM
Security HOTFIX - PLEASE UPDATE

see this post for details:
https://bitcointalk.org/index.php?topic=33142.msg608297#msg608297


Title: Re: PoolServerJ - Tech Support
Post by: ThiagoCMC on November 07, 2011, 02:33:26 AM
Hi!

 I just start the PoolServerJ 0.3.1 for the first time, I'm running it with litecoind.

 I got:

Code:
administrativo@ltcmining1:~/poolserverj-0.3.1/bin$ java -classpath poolserverj.jar:../lib/*:../lib/lib_non-maven/*:../lib/plugins com.shadworld.poolserver.servicelauncher.PoolServerService start ../conf-samples/local-daemon.properties 
Args - [2]: start ../conf-samples/local-daemon.properties
PoolServerJ Service Starting Mon Nov 07 00:22:44 BRST 2011
[24:22:44.791] user.dir: /home/administrativo/poolserverj-0.3.1/bin
[24:22:44.792] Home path set to: /home/administrativo/poolserverj-0.3.1/bin/poolserverj.jar
[24:22:44.793] Home directory set from jar file location to: /home/administrativo/poolserverj-0.3.1
[24:22:44.818] Wrote PID: 22092 to pidFile: /home/administrativo/poolserverj-0.3.1/tmp/poolserverj.pid
[24:22:44.878] Connecting to DB URL: jdbc:mysql://localhost:3306/poolserverjdb?allowMultiQueries=true&zeroDateTimeBehavior=round&dumpQueriesOnException=true&dumpMetadataOnColumnNotFound=true&useCompression=true&autoReconnect=true
[24:22:45.174] Building Shares-DB-flush-engine: DefaultPreparedStatementSharesDBFlushEngine.class with extraParams: []
[24:22:45.175] Building Worker-authentication-engine: WorkerAuthenticator.class with extraParams: null
566 [main] INFO org.eclipse.jetty.util.log - jetty-7.4.0.v20110414
603 [main] INFO org.eclipse.jetty.util.log - started o.e.j.s.ServletContextHandler{/,null}
625 [main] INFO org.eclipse.jetty.util.log - Started SelectChannelConnector@0.0.0.0:8999 STARTING
626 [main] INFO org.eclipse.jetty.util.log - jetty-7.4.0.v20110414
626 [main] INFO org.eclipse.jetty.util.log - started o.e.j.s.ServletContextHandler{/,null}
629 [main] INFO org.eclipse.jetty.util.log - Started SelectChannelConnector@127.0.0.1:8997 STARTING
[24:22:45.372] Starting local work source proxy: bitcoind-patch
[24:22:45.373] PoolServerJ is open for business
[24:22:45.373] DaemonSource[bitcoind-patch] Native longpoll: false verification: true
[24:22:45.373] DaemonSource[bitcoind-patch] Native longpoll: false verification: true
[24:22:45.373] No native longpoll listeners registered, all sources will fall back to polling mode
PoolServerJ Service Started Mon Nov 07 00:22:45 BRST 2011
com.google.bitcoin.core.VerificationException: Difficulty target is bad: 43566378659636251172094964077388411969922914778514660462017772519424
at com.google.bitcoin.core.Block.getDifficultyTargetAsInteger(Block.java:231)
at com.shadworld.poolserver.BlockChainTracker.reportDifficultyTarget(BlockChainTracker.java:281)
at com.shadworld.poolserver.source.WorkSource.cacheEntry(WorkSource.java:469)
at com.shadworld.poolserver.source.WorkSource.processSingleWork(WorkSource.java:287)
at com.shadworld.poolserver.source.daemonhandler.DaemonHandler.processSingleResponse(DaemonHandler.java:157)
at com.shadworld.poolserver.source.daemonhandler.SingleWorkExchange.onResponseComplete(SingleWorkExchange.java:35)
at org.eclipse.jetty.client.HttpExchange$Listener.onResponseComplete(HttpExchange.java:920)
at org.eclipse.jetty.client.HttpEventListenerWrapper.onResponseComplete(HttpEventListenerWrapper.java:118)
at org.eclipse.jetty.client.security.SecurityListener.onResponseComplete(SecurityListener.java:251)
at org.eclipse.jetty.client.HttpExchange.setStatus(HttpExchange.java:263)
at org.eclipse.jetty.client.HttpConnection$Handler.messageComplete(HttpConnection.java:622)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:828)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
at org.eclipse.jetty.client.HttpConnection.handle(HttpConnection.java:269)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:515)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
at java.lang.Thread.run(Thread.java:679)
com.google.bitcoin.core.VerificationException: Difficulty target is bad: 43566378659636251172094964077388411969922914778514660462017772519424
at com.google.bitcoin.core.Block.getDifficultyTargetAsInteger(Block.java:231)
at com.shadworld.poolserver.BlockChainTracker.reportDifficultyTarget(BlockChainTracker.java:281)
at com.shadworld.poolserver.source.WorkSource.cacheEntry(WorkSource.java:469)
at com.shadworld.poolserver.source.WorkSource.processSingleWork(WorkSource.java:287)
at com.shadworld.poolserver.source.daemonhandler.DaemonHandler.processSingleResponse(DaemonHandler.java:157)
at com.shadworld.poolserver.source.daemonhandler.SingleWorkExchange.onResponseComplete(SingleWorkExchange.java:35)
at org.eclipse.jetty.client.HttpExchange$Listener.onResponseComplete(HttpExchange.java:920)
at org.eclipse.jetty.client.HttpEventListenerWrapper.onResponseComplete(HttpEventListenerWrapper.java:118)
at org.eclipse.jetty.client.security.SecurityListener.onResponseComplete(SecurityListener.java:251)
at org.eclipse.jetty.client.HttpExchange.setStatus(HttpExchange.java:263)
at org.eclipse.jetty.client.HttpConnection$Handler.messageComplete(HttpConnection.java:622)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:828)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
at org.eclipse.jetty.client.HttpConnection.handle(HttpConnection.java:269)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:515)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
at java.lang.Thread.run(Thread.java:679)
com.google.bitcoin.core.VerificationException: Difficulty target is bad: 43566378659636251172094964077388411969922914778514660462017772519424
at com.google.bitcoin.core.Block.getDifficultyTargetAsInteger(Block.java:231)
at com.shadworld.poolserver.BlockChainTracker.reportDifficultyTarget(BlockChainTracker.java:281)
at com.shadworld.poolserver.source.WorkSource.cacheEntry(WorkSource.java:469)
at com.shadworld.poolserver.source.WorkSource.processSingleWork(WorkSource.java:287)
at com.shadworld.poolserver.source.daemonhandler.DaemonHandler.processSingleResponse(DaemonHandler.java:157)
at com.shadworld.poolserver.source.daemonhandler.SingleWorkExchange.onResponseComplete(SingleWorkExchange.java:35)
at org.eclipse.jetty.client.HttpExchange$Listener.onResponseComplete(HttpExchange.java:920)
at org.eclipse.jetty.client.HttpEventListenerWrapper.onResponseComplete(HttpEventListenerWrapper.java:118)
at org.eclipse.jetty.client.security.SecurityListener.onResponseComplete(SecurityListener.java:251)
at org.eclipse.jetty.client.HttpExchange.setStatus(HttpExchange.java:263)
at org.eclipse.jetty.client.HttpConnection$Handler.messageComplete(HttpConnection.java:622)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:828)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
at org.eclipse.jetty.client.HttpConnection.handle(HttpConnection.java:269)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:515)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
at java.lang.Thread.run(Thread.java:679)
com.google.bitcoin.core.VerificationException: Difficulty target is bad: 43566378659636251172094964077388411969922914778514660462017772519424

 This message: "com.google.bitcoin.core.VerificationException: Difficulty target is bad:" is expected?!

 And, how to enable LongPool?!

Thank you guys!
Thiago


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 07, 2011, 02:43:12 AM
Well you're the first person to try it with litecoin to my knowledge...

0.3.1 is not SCrypt compatible.  You'll need the merged mining version.

Also I seem to recall there's something odd about litecoin difficulty?  Like it can be below 1 or something like that?

Can you post the results of a getwork from a litecoind here so I can see what the difficulty bits actually are?


Title: Re: PoolServerJ - Tech Support
Post by: ThiagoCMC on November 07, 2011, 02:54:56 AM
Good to know that I'm the first one!! lol

 Here we go:

Code:
administrativo@ltcmining1:~$ ./Litecoin/litecoin/src/litecoind getwork
{   
    "midstate" : "f2cfc038d83389f1e4e44eb67b4967f4e9c0352a9eb0cacb7cc01e04c84fa039",
    "data" : "00000001d8632caadf2260bf42d2067f60d987d6b790562b272653ae611ba0fa67fe1945e3c77cc0b144c2b408614956f4bdcff4ecf1c7f2818beb3e5c6cfd61083be20c4eb747fd1d019db000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000",
    "hash1" : "00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000",
    "target" : "0000000000000000000000000000000000000000000000000000b09d01000000"
}

Code:
administrativo@ltcmining1:~$ ./Litecoin/litecoin/src/litecoind getdifficulty
0.61881515

 Thank you!

Best!
Thiago


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 07, 2011, 02:59:12 AM
ok yes difficulty is below the minimum allowed.  I'll ask the dev what the minimum constant is and update PSJ.  There should be a major release later today or tomorrow so hopefull I'll get it included in that.


Title: Re: PoolServerJ - Tech Support
Post by: ThiagoCMC on November 07, 2011, 03:04:54 AM
WOW! Thank you!!

 I'm about to start my Litecoin pool, in portuguese for the brazillian people...

 Would love to use PoolServJ instead of PushPool...

Regards,
Thiago


Title: Re: PoolServerJ - Tech Support
Post by: ThiagoCMC on November 07, 2011, 03:09:19 AM
And about being SCrypt compatible?!
Maybe this can be a major problem?!


Title: Re: PoolServerJ - Tech Support
Post by: Snapman on November 07, 2011, 03:18:25 AM
WOW! Thank you!!

 I'm about to start my Litecoin pool, in portuguese for the brazillian people...

 Would love to use PoolServJ instead of PushPool...

Regards,
Thiago

I second that statemment, psj with scrypt compatibility would be extremely helpful for those of us who think "psj 0wnz pp in the face :O"


Title: Re: PoolServerJ - Tech Support
Post by: Retard on November 10, 2011, 11:25:24 AM
I would test to install PoolServerJ for merge mining but i have a problem and i dont know why ?

Namecoin Client running all Blocks Downloaded version 0.5
Bitcoin Client running all Blocks Downloaded version 0.5

Ubunut Version 10.11
PoolserverJ Version : poolserverj-0.4.0rc2
Mysql and all Daemons on the same server




but after start i get this

Quote
[03:18:03.560] Realm resolved null for key: localhost:8331/ Realm: jsonrpc
205349 [shared-httpclient-97] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
[03:18:03.560] RETRY
[03:18:03.561] getblocknumber response status: 401 for url: http://localhost:8330/
[03:18:03.561] getblocknumber response status: 401 for url: http://localhost:8330/
[03:18:03.561] Realm resolved null for key: localhost:8331/ Realm: jsonrpc
205350 [shared-httpclient-229] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
[03:18:03.562] RETRY
[03:18:03.562] Realm resolved null for key: localhost:8331/ Realm: jsonrpc
205351 [shared-httpclient-125] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
[03:18:03.562] RETRY
[03:18:03.562] Realm resolved null for key: localhost:8331/ Realm: jsonrpc
205352 [shared-httpclient-82] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
[03:18:03.563] RETRY
[03:18:03.563] getblocknumber response status: 401 for url: http://localhost:8330/
210667 [shared-httpclient-19] WARN org.eclipse.jetty.util.log - EXPIRED ContentExchange@1872384842=POST//localhost:8331/#8
[03:18:08.879] [WARN] Failed to build auxblock for chain: namecoin
java.lang.NullPointerException
   at com.shadworld.poolserver.source.merged.MergedMiningGroup.buildAuxBlock(MergedMiningGroup.java:262)
   at com.shadworld.poolserver.source.merged.MergedMiningGroup.updateAuxes(MergedMiningGroup.java:163)
   at com.shadworld.poolserver.Cleaner.run(Cleaner.java:54)
[03:18:08.879] [WARN] Reverting to rpc getauxblock for chain: namecoin
[03:18:33.480] getblocknumber response status: 401 for url: http://localhost:8330/
[03:18:33.485] Realm resolved null for key: localhost:8331/ Realm: jsonrpc
235274 [shared-httpclient-124] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
[03:18:33.499] Realm resolved null for key: localhost:8331/ Realm: jsonrpc
235288 [shared-httpclient-70] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc

After start that checked all :

Quote
[03:45:31.932] Mapped parameter 1 to field 1 (remote_host)
[03:45:31.932] Mapped parameter 2 to field 2 (username)
[03:45:31.932] Mapped parameter 3 to field 3 (our_result)
[03:45:31.932] Mapped parameter 4 to field 4 (upstream_result)
[03:45:31.933] Mapped parameter 5 to field 5 (reason)
[03:45:31.933] Mapped parameter 6 to field 7 (time)
[03:45:31.933] Mapped parameter 7 to field 8 (source)
[03:45:31.933] Mapped parameter 8 to field 9 (block_num)
[03:45:31.933] Mapped parameter 9 to field 11 (useragent)
[03:45:31.935] Building Shares-DB-flush-engine: DefaultPreparedStatementSharesDBFlushEngine.class with extraParams: []
[03:45:31.936] Building Worker-authentication-engine: WorkerAuthenticator.class with extraParams: null
[03:45:31.979] Configuring aux daemon for WorkSource: bitcoind-mm
[03:45:31.979] Chain name: namecoin
[03:45:31.980] Chain id: 1
[03:45:31.980] Chain url: http://localhost:8331/
[03:45:31.980] Chain username: smart
[03:45:31.980] Chain payoutAddress: Mz3Qs4eDoE7USV8sjnCf8aATeHCJAtM5Zp
[03:45:31.980] Chain password: s***t
^C[03:45:32.343] Shutting down poolserver...
[03:45:32.343] Flushing cached shares...
[03:45:32.343] Flush shares cache complete...
[03:45:32.343] Waiting to complete upstream share submits...
[03:45:32.350] Finished upstream submits...
[03:45:32.350] Flushing final shares...
[03:45:32.365] 0 shares in 1,320,925,568 seconds. Current hashRate: 0 GH/s
[03:45:32.365] Submit Throttling on: false
[03:45:32.365] All share submits flushed...
[03:45:32.366] Waiting for threads to die...
[03:45:32.367] Dumping workmap to file: /home/smart/Downloads/poolserverj-0.4.0rc2/tmp/workmap-8332.bin
2449 [main] INFO org.eclipse.jetty.util.log - jetty-7.4.0.v20110414
2768 [main] INFO org.eclipse.jetty.util.log - started o.e.j.s.ServletContextHandler{/,null}
2869 [main] INFO org.eclipse.jetty.util.log - Started SelectChannelConnector@0.0.0.0:8332 STARTING
2873 [main] INFO org.eclipse.jetty.util.log - jetty-7.4.0.v20110414
2873 [main] INFO org.eclipse.jetty.util.log - started o.e.j.s.ServletContextHandler{/,null}
2907 [main] INFO org.eclipse.jetty.util.log - Started SelectChannelConnector@0.0.0.0:8997 STARTING
[03:45:32.919] Starting local work source proxy: bitcoind-mm

whats wrong ? any idea ?

i can need help to configure this -.- ....  pushpoold works without problems but i need a java version :P



best regards
Smart


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on November 10, 2011, 02:09:33 PM
ok smart and I have that problem fixed by using the mini binary shads posted


Poolserverj is starting now

we are getting this message:

[06:07:45.255] Exception in Cleaner Thread
java.lang.NullPointerException
        at com.shadworld.poolserver.workmaker.WorkMaker.update(WorkMaker.java:178)
        at com.shadworld.poolserver.source.merged.MergedMiningGroup.updateAuxes(MergedMiningGroup.java:249)
        at com.shadworld.poolserver.Cleaner.run(Cleaner.java:54)


and miners cannot connect

although sometimes it will say "retriving worker from database"

any ideas?


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 10, 2011, 02:38:00 PM
ok smart and I have that problem fixed by using the mini binary shads posted


Poolserverj is starting now

we are getting this message:

[06:07:45.255] Exception in Cleaner Thread
java.lang.NullPointerException
        at com.shadworld.poolserver.workmaker.WorkMaker.update(WorkMaker.java:178)
        at com.shadworld.poolserver.source.merged.MergedMiningGroup.updateAuxes(MergedMiningGroup.java:249)
        at com.shadworld.poolserver.Cleaner.run(Cleaner.java:54)


and miners cannot connect

although sometimes it will say "retriving worker from database"

any ideas?

see: https://bitcointalk.org/index.php?topic=51226.msg613256#msg613256

can people please keep tech support questions specific to the workmaker release in that thread...

I'm thinking I might close the other threads and link them all to that one to keep it simple.


Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on November 23, 2011, 02:00:41 PM
What is the difference between 0.3.X and a Workmaker edition? Also, do i really need the 4diff patch? Cause i am using 0.3.24(I can upgrade if the problem is resolved) on windows, and it would be a pain in the ass to compile Bitcoin(with or without gui) on windows.


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 23, 2011, 02:10:17 PM
What is the difference between 0.3.X and a Workmaker edition? Also, do i really need the 4diff patch? Cause i am using 0.3.24(I can upgrade if the problem is resolved) on windows, and it would be a pain in the ass to compile Bitcoin(with or without gui) on windows.

The differences are all explained here: https://bitcointalk.org/index.php?topic=51226.0

It runs with vanilla bitcoin 0.5.0.  I've seen the rpc thread crash in bitcoind a few times in my test environment but I've never heard of it happening in a production environment so it could just be something peculiar to my setup.  I do put my poor little bitcoind through some pretty horrible contortions that probably don't happen on a normal pool setup.


Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on November 23, 2011, 03:43:32 PM
Quote
5619 [shared-httpclient-60] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
5623 [shared-httpclient-60] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
5627 [shared-httpclient-61] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
[17:41:28.137] [WARN] Bad HTTP response connecting to auxDaemon http://localhost:8335.  Work generated from this AuxInfo will not be valid for chain: namecoin. HTTP response code: 401


Dunno what is wrong. Using 0.3.24.64 and get that. Password AND username are correct.

WorkMaker edition, pushpool compatibility is OFF


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on November 27, 2011, 04:26:17 PM
I created a PoolserverJ tutorial

anyone should be able to get PoolServerJ working if they follow this step by step:

http://devtome.org/wiki/index.php?title=How_to_Setup_a_Merged_Mining_Bitcoin_Pool_with_PoolServerJ

let me know what you think!


Title: Re: PoolServerJ - Tech Support
Post by: shads on November 27, 2011, 11:15:26 PM
I created a PoolserverJ tutorial

anyone should be able to get PoolServerJ working if they follow this step by step:

http://devtome.org/wiki/index.php?title=How_to_Setup_a_Merged_Mining_Bitcoin_Pool_with_PoolServerJ

let me know what you think!

That's fantastic cablepair!  I'll put a link to it on the PSJ site and in the other thread. 

My only suggestion is that you point people to download page rather than linking to the specific versions.  I leave the old versions on the server so those links will be valid long after the psj version has incremented.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on November 28, 2011, 12:02:14 AM
will do,

and thats mostly a rough draft I am polishing it up a bit more

Also just want to let you know I started from scratch when testing this tutorial to make sure everything worked the way I laid it out

I tested on a old dell with a Pentium 4 1.7 Ghz CPU and 256 mb ram

and PoolServerJ is mining on both BTC/NMC networks right now with no problems

talk about efficiency!
 :)


Title: Re: PoolServerJ - Tech Support
Post by: pooler on December 01, 2011, 11:55:50 AM
Any chance PoolServerJ will support difficulties less than 1?
I have tried setting it up for Litecoin (current difficulty is about 0.66), but with version 0.4.0rc2 all I get is a bunch of
Code:
com.google.bitcoin.core.VerificationException: Difficulty target is bad: 40474064220290374717375238241067511033434108403022755503819899011072
at com.google.bitcoin.core.Block.getDifficultyTargetAsInteger(Block.java:582)


Title: Re: PoolServerJ - Tech Support
Post by: doublec on December 01, 2011, 12:33:29 PM
I created a PoolserverJ tutorial
Why do the conf files for bitcoin/namecoin in the tutorial specify "rpcallowip=*". Doesn't this open the JSON-RPC port of the daemon for anyone to connect to? This gives access to 'sendtoaddress' and other commands for sending coins out of the wallet. Or am I missing something?


Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on December 01, 2011, 12:48:37 PM
I created a PoolserverJ tutorial
Why do the conf files for bitcoin/namecoin in the tutorial specify "rpcallowip=*". Doesn't this open the JSON-RPC port of the daemon for anyone to connect to? This gives access to 'sendtoaddress' and other commands for sending coins out of the wallet. Or am I missing something?
You are correct DoubleC
However I do that but I have a firewall and I open up the port to the IP's I trust, in other words IP's I own and control.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on December 01, 2011, 02:57:49 PM
I created a PoolserverJ tutorial
Why do the conf files for bitcoin/namecoin in the tutorial specify "rpcallowip=*". Doesn't this open the JSON-RPC port of the daemon for anyone to connect to? This gives access to 'sendtoaddress' and other commands for sending coins out of the wallet. Or am I missing something?

This is an interesting security concern you bring up and very valid. The idea of the tutorial is to be something for people who really have little or no idea what they are doing. It does not seem very plausible however that there are going to be people out there scanning IP addresses for open RPC ports to that may have used my tutorial. I tried to make it as fool proof as possible thus the reason for the *, people have different network setups and I am trying to eliminate needless problems and the possibility that this could turn into an actual security incident seems very remote to me.

I am doing some polishing up soon of this tutorial and I will take this in mind. Thank you.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on December 01, 2011, 04:26:29 PM
So I thought about it for a sec and your right about the security issue and in that setup it's not needed to allow rpcallowip=* anyways. It's just a habit I got into when helping people to setup pools to skip over needless problems

So I finished polishing up the tutorial today

http://devtome.org/wiki/index.php?title=How_to_Setup_a_Merged_Mining_Bitcoin_Pool_with_PoolServerJ

I also included step by step instructions on how to access the database with phpmyadmin and add a worker.

Also if anyone would like to see a public pool in action that I setup check out

http://pool.devcoin.org

Of course it is for mining devcoins and not Bitcoins.





Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on December 01, 2011, 05:43:25 PM
This still does not answer my problem.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on December 01, 2011, 05:45:02 PM
Quote
5619 [shared-httpclient-60] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
5623 [shared-httpclient-60] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
5627 [shared-httpclient-61] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
[17:41:28.137] [WARN] Bad HTTP response connecting to auxDaemon http://localhost:8335.  Work generated from this AuxInfo will not be valid for chain: namecoin. HTTP response code: 401


Dunno what is wrong. Using 0.3.24.64 and get that. Password AND username are correct.

WorkMaker edition, pushpool compatibility is OFF

why not upgrade?

I may be able to help you but I need a little more info

do you want to send me your config?

send to tom@devcoin.org and I will see if anything pops out at me

are you using coinbassing? local work generation?



Title: Re: PoolServerJ - Tech Support
Post by: g2x3k on December 12, 2011, 04:50:34 PM
have to vote on poolers suggestion it would be nice if worked with diff being lower then 1


Title: Re: PoolServerJ - Tech Support
Post by: Furyan on December 16, 2011, 04:36:38 PM
Has anyone added MS SQL support to PoolServerJ?

Because it uses JDBC this should be (almost) trivial as MS SQL is fully ODBC 92 compliant, just wondering if anyone's made the effort to actually write the associated bit of code.

I can dive in myself, I'm reasonably proficient in Java but I look to save time where possible :)

Also... shads.. you're outdoing yourself man... I'm very impressed with the built-in coinbasing & work generation now.  It eliminates almost all of the custom mods I had made to my version of bitcoind, which lowers my support profile and barrier to upgrades.

Really impressed here.


Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on December 16, 2011, 05:21:31 PM
Has anyone added MS SQL support to PoolServerJ?

Because it uses JDBC this should be (almost) trivial as MS SQL is fully ODBC 92 compliant, just wondering if anyone's made the effort to actually write the associated bit of code.

I can dive in myself, I'm reasonably proficient in Java but I look to save time where possible :)

Also... shads.. you're outdoing yourself man... I'm very impressed with the built-in coinbasing & work generation now.  It eliminates almost all of the custom mods I had made to my version of bitcoind, which lowers my support profile and barrier to upgrades.

Really impressed here.
Yes he has done an amazing job.


Title: Re: PoolServerJ - Tech Support
Post by: mu50stang on January 09, 2012, 09:57:13 PM
I keep getting this message everyone once in a while.  I was wondering what it meant or if it was an issue.


5470046 [HttpClient-upstream-work-submit-handler-38] WARN org.eclipse.jetty.util.log - EXPIRED ContentExchange@1769400994=POST//127.0.0.1:8444/#8


Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on January 09, 2012, 10:33:54 PM
I really hope PSJ soon gets completed X extensions.

Such as X-rollntime etc.


Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on January 10, 2012, 12:12:53 AM
Shadders

If you are not coming back?


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on January 10, 2012, 12:21:55 AM
ive been wondering the same thing :(


Title: Re: PoolServerJ - Tech Support
Post by: mu50stang on January 10, 2012, 02:55:35 AM
JSON-RPC getmemorypool update failed.

Whats happens when I get this error.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on January 10, 2012, 03:21:14 AM
I already told you what happens

your running your pool on the same box as Ubuntu xwindows

and your actively using xwindows

and browsing the web with firefox and all kinds of other crap

and its slowing the already less then capable machine down and Bitcoin RPC cant keep up with requests from the Pool


I saw all the processes on that machine, you cant expect the pool to operate at full speed when your running it as a workstation computer for web browsing and all kinds of regular use, there are not that many resources available to that machine to begin with - you need them reserved for the pool - running a pool takes a sh1t load of resources dude its not like a regular thing - especially when you are merged mining three different coins

running a pool takes a lot of resources and if the machine its on inst super fast it takes a dedicated one at the very least.


Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on January 15, 2012, 05:27:51 PM
Quote
5619 [shared-httpclient-60] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
5623 [shared-httpclient-60] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
5627 [shared-httpclient-61] WARN org.eclipse.jetty.util.log - Unknown Security Realm: jsonrpc
[17:41:28.137] [WARN] Bad HTTP response connecting to auxDaemon http://localhost:8335.  Work generated from this AuxInfo will not be valid for chain: namecoin. HTTP response code: 401


Dunno what is wrong. Using 0.3.24.64 and get that. Password AND username are correct.

WorkMaker edition, pushpool compatibility is OFF
Bump. I need to fix this, so please, guys help me. I am on the verge of destroying psj.

Thanks to cablepair this is fixed. However, I encountered another problem. After a while PSJ hangs on windows causing Bitcoin-Qt to crash as well.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on January 16, 2012, 05:20:18 PM
ive already addressed this issue


Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on January 16, 2012, 08:24:51 PM
I was browsing on your comments in this thread, and there was nothing about PSJ crashing ?coind. Even namecoind crashed. After trying to restart PSJ via Ctrl+C the threads dont quit so I have to manually kill the java process


Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on January 16, 2012, 08:48:06 PM
I was browsing on your comments in this thread, and there was nothing about PSJ crashing ?coind. Even namecoind crashed. After trying to restart PSJ via Ctrl+C the threads dont quit so I have to manually kill the java process
It crashes my ?coind I have them set to auto restart.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on January 17, 2012, 12:21:01 AM
yeah

the funny thing is the last two times one of my pools crashed bitcoind with poolserverj it was because it solved a block

i wish shads would come back and continue developing this...

btw:

Right now I am merged mining btc/nmc/dvc with poolserverj and attempting to add i0 ad ix later tonight

am i the first person to do this? anyone else attempt more than just nmc with psj?


Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on January 17, 2012, 12:31:02 AM
Do all the standard precompiled clients of all alt-chains support merged mining? I.e do I need to compile them with mm support? Cause bitcoin has the rpc command getmemorypool, but namecoin does not.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on January 17, 2012, 12:34:17 AM
not all chains do

btc/nmc/dvc/i0/ix are officially merged compatible right now, but im sure doublec's patch could be applied to any of them.


Title: Re: PoolServerJ - Tech Support
Post by: doublec on January 17, 2012, 01:18:47 AM
not all chains do

btc/nmc/dvc/i0/ix are officially merged compatible right now, but im sure doublec's patch could be applied to any of them.
btc is only able to be used as a 'parent' chain. It can't be an auxiliary chain. It requires a block chain fork for a chain to be changed to support use as an auxiliary chain.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on January 17, 2012, 01:21:02 AM
i understand that :)

my only concern right now is the way poolserverj uses weighting for merged mining

im having a bit of a difficult time trying to determine what the best weight is for bitcoin as parent and nmc/dvc/i0/ix as aux



Title: Re: PoolServerJ - Tech Support
Post by: cablepair on January 17, 2012, 06:33:17 PM
Well I have bad news - and a very good reason why we need shads (or some other very skilled and brilliant coder) to come work on this awesome project!

After extensive testing on multiple pools and also getting reports from other pool admins

I have come to the conclusion that (although its supposed to) merged mining of more than one aux chain does not work with PSJ at the current time.

You can add multiple merged mining aux chains, and you can have everything running pretty with no errors
but the only blocks that will ever solve are the parent (bitcoin) and which ever aux chain you declare first.

I have tested this on multiple pools with multple aux chains multiple times in multiple different scenarios and I am 100% convinced of this to be true

if anyone can prove me wrong I would love to see it but unfortunately I know I am right.

I assume since at the time he created PSJ / NMC was the only merged mining compatible aux chain he was not able to actually test if this worked or not.

Shads we need you!!



Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on January 17, 2012, 07:02:06 PM
Well I have bad news - and a very good reason why we need shads (or some other very skilled and brilliant coder) to come work on this awesome project!

After extensive testing on multiple pools and also getting reports from other pool admins

I have come to the conclusion that (although its supposed to) merged mining of more than one aux chain does not work with PSJ at the current time.

You can add multiple merged mining aux chains, and you can have everything running pretty with no errors
but the only blocks that will ever solve are the parent (bitcoin) and which ever aux chain you declare first.

I have tested this on multiple pools with multple aux chains multiple times in multiple different scenarios and I am 100% convinced of this to be true

if anyone can prove me wrong I would love to see it but unfortunately I know I am right.

I assume since at the time he created PSJ / NMC was the only merged mining compatible aux chain he was not able to actually test if this worked or not.

Shads we need you!!



Sorry I did not know you were testing this but Shadders told me it only works for one aux chain.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on January 17, 2012, 07:52:11 PM
Did he say if/when he is going to fix it? This is too good of a project to let die


Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on January 18, 2012, 12:38:40 PM
Did he say if/when he is going to fix it? This is too good of a project to let die
Last time I talked to him was when he posted and said he would be back during the holidays so I don't know if he is coming back.


Title: Re: PoolServerJ - Tech Support
Post by: MORA on January 18, 2012, 05:28:55 PM
Sorry if this may be horribly obvious.

I got the poolserver working on litecoin, and added a few clients to it, they were hashing away and getting longpool events.

However I dont see shares being logged, neither to DB or file.
As I understand, a share is each time cpuminer prints out a stat line, right ?
In that case it should have logged a few 100shares, but no errors and no data in the shares file.

When starting it, it does say RETRY a few times, but then runs and looks to be working.

Any ideas what could be the reason for no log?


Title: Re: PoolServerJ - Tech Support
Post by: DavinciJ15 on January 18, 2012, 05:33:38 PM
Sorry if this may be horribly obvious.

I got the poolserver working on litecoin, and added a few clients to it, they were hashing away and getting longpool events.

However I dont see shares being logged, neither to DB or file.
As I understand, a share is each time cpuminer prints out a stat line, right ?
In that case it should have logged a few 100shares, but no errors and no data in the shares file.

When starting it, it does say RETRY a few times, but then runs and looks to be working.

Any ideas what could be the reason for no log?
You did not give PSJ permissions  also you need to turn on trace debug in you settings file to see errors on the screen.


Title: Re: PoolServerJ - Tech Support
Post by: MORA on January 18, 2012, 07:46:30 PM
You did not give PSJ permissions  also you need to turn on trace debug in you settings file to see errors on the screen.

Permissions should be ok, in MySQL I granted it all, and I just tested that I can insert to shares table with same login, also it didnt complain about the user logins, that I created in user table (but then again I didnt check with a user that would fail, dont know if it falls back to no check if theres DB problems).

enabling trace=all gives alot of these
[20:39:05.159] TRACE[blockmon_firecheck] Sleeping timed block check cycle for source: litecoin-1.litecoin 0ms
[20:39:05.169] TRACE[blockmon_firecheck] Firing timed block check for source: litecoin-1.litecoin overdue by 10ms

but even with those removed form the log, there does not seem to be any actual errors logged.


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on January 18, 2012, 08:18:37 PM
do you import the poolserver.sql tables into your database and make sure the ma mappings are correct in the psj conf?


Title: Re: PoolServerJ - Tech Support
Post by: MORA on January 18, 2012, 08:52:53 PM
do you import the poolserver.sql tables into your database and make sure the ma mappings are correct in the psj conf?
Imported yes.
I didnt change the mappings, but used those in single mine example.
I have checked that the fields exist.


Title: Re: PoolServerJ - Tech Support
Post by: Retard on January 22, 2012, 06:17:19 PM
how must it look when the deamons are on a different server?

for example

Merge Mining

Bitcoin // Namecoin server #1 192.168.1.0
PoolserverJ #192.168.1.1

Code:
################################################################
#          Includes                                            #
################################################################

### This allows you to include other properties files by including a comma delimited list of filenames.
### The path is relative to the location of THIS properties file.
###
### This may be useful for testing/troubleshooting scenarios allowing you split database config or
### any other block of config to a seperate file for easy changes.
###
### Properties are accumlated and overwritten in order.  e.g. if the same property appears in this
### file and in one the include files the include property will take precedence.
### Included properties files can also use the include property.  File are processes by walking the tree
### e.g. this file, 1st include file, 1st include file's include file, 2nd include file.
### If you precede the list with a '!' char this will prevent conficts and throw an error if any
### included property overwrites one that is already set.  Child properties can also set this flag.
### prefix with '!!' will force the conflicts flag to be inherited and conflict flags in child properties
### will be ignored.  You can set the inheritance flag in a child properties file and it will only apply
### to children of that properties file.

#include=props1/debug.properties

################################################################
#          Coinbase Donations                                  #
################################################################

### This option will only work if source.local.1.localWorkGeneration=true
### It allows you send a donation as part of the coinbase transaction to the poolserverj developer
### or anyone else.  You can send multiple donations to different addresses so if you use
### an open source front end you may want to consider including them in the donation list.
### donationTarget chainName must match the names you've given the chains in merged mining setup.
### Donations on aux chains are only supported if you have applied the getmemorypool patch to your
### aux daemon.
###
### addressUrl is a URL you can point to obtain a current payout address.  The returned format
### is simply a json object with a list of keypairs using chainName as key and address as value.
### the string '.testnet' is appended to chain name for testnet addresses. e.g.
### {"bitcoin":"1LezqRatQz7MeNoCVziYwcdwtqeEbvrdAq", "namecoin":"NFpgM5Ds3o9GwkqEoW5NnGstc2Lw7rHcYa"}
### defaultAddress is just a standard bitcoin address which will be used if no dynamic address can be found.
###
### Payout amount can be calculated several ways and the calculation method is determined by the payout
### amount format.  Examples:
### donationTarget.1.amount=0.15  <-- if you simply put a number this a fixed amount donation in FULL BTC's NOT SATOSHIS.
### donationTarget.1.amount=0.3%  <-- appending a '%' will calculate the donation as a percentage of the total block reward including transaction fees
### donationTarget.1.amount=0.4%- <-- appending '%-' will calculate the donation as a percentage of the total block reward excluding transaction fees
### donationTarget.4.amount=20%t <-- appending '%t' will calculate the donation as a percentage of the transaction fees only.
### If for example you wanted to donate a different rate for main block reward and transaction fees you could set up something like this
### to payout 0.3% of block reward and 20% of transaction fees:
###
### donationTarget.1.chainName=bitcoin
### donationTarget.1.defaultAddress=1LezqRatQz7MeNoCVziYwcdwtqeEbvrdAq
### donationTarget.1.amount=0.3%-
###
### donationTarget.2.chainName=bitcoin
### donationTarget.2.defaultAddress=1LezqRatQz7MeNoCVziYwcdwtqeEbvrdAq
### donationTarget.2.amount=20%t



################################################################
#          General Config                                      #
################################################################

### default false
#testnet=true

### Turns on logging of some additional status messages.
debug=true

### Turn this off if you don't need it.  It does consume resources even if you've got a limited set of traceTargets
trace=false

### traceTargets enables tracing on particular event groups.  traceTarget 'all' means what it says.  Prepare for a big log file.
### Available trace targets are logged by poolserverj on startup.  Best to look at that rather look for a list here
### as there will probably be new ones added frequently.  Look for a line like:
### Trace activated, available trace targets: [blockmon, worker_stats, worker_cache, longpoll, blockmon_worksource, all]
### You can also prepend a '-' symbol before any trace target to exlude it.  If you want to see everything you can set 'all'
### but if you find a particular tracetarget is spamming the log too much you can get rid of it this way.
### comma delimited list
traceTargets=
### whether to log full stack traces on exceptions or just the exception message.  If you're asking the developer for
### help on an exception these are very useful.
logStacktraces=true
pidFile=tmp/poolserverj.pid

### Typically only used for stress testing and benchmarking.  Sets difficult to
### target that requires only 1-2 hashes to solve a block.  This is NOT the same as rewriting difficulty target
### to difficulty 1.  You will get MASSES of requests if you turn this on with a GPU miner attached to your pool.
useEasiestDifficulty=false

### Allows you to set alternative proof of work hashing algorithm
### Supported algos are: doublesha256, scrypt
### default: doublesha256
POWalgorithm=doublesha256

### This is for beta testing only, this will be deprecated after confirming valid blocks are always
### pushed up to a local bitcoin daemon.  It will force every share submitted by a miner to be submitted
### to the daemon.
forceAllSubmitsUpstream=false


### default: true.  Safe restart cause the server to dump it's mappings of work to worker to a file on shutdown
### and reload them on next startup.  This is only relevant if the server is going to be restarted within a couple
### of minutes.  If the server is started any later than that the map will be discarded after
### it is reloaded.
### The file is located at tmp/workmap-<listen port>.bin
enableSafeRestart=true

### currently only HTTP JSON-RPC supported
listen.http.json-rpc.port=8999
listen.http.json-rpc.path=/

################################
#         Longpolling          #
################################

### Please also see long polling options under Work Sources entries

listen.longpoll.enable=true

### listen.longpoll.http.json-rpc.port=8999 ##deprecated now parsed from listen.longpoll.http.json-rpc.url
### pass the full url not just the path
### IMPORTANT!  longpoll path MUST END WITH A TRAILING SLASH.  If it does not it will be added.  Java servlets are fussy
### about URLs conforming to spec.
### Also note that some miners do not handle the X-Long-Polling header properly (e.g. Phoenix).  It is supposed
### to be able to handle a full URL including port but Phoenix 1.50 for example will poll the new url on the main port even
### if a different port is specified so for this reason we recommend using the same port as the main listener.

listen.longpoll.http.json-rpc.url=http://localhost:8999/LP

### in seconds
listen.longpoll.http.json-rpc.timeout=600

### If you are having trouble with longpoll spam you can set a limit on LP connections per worker.
### connections in excess will not be refused, they will be held open and closed at the end of the block to prevent
### retry spam.
### The default limit will be applied after the worker is retrieved from the database but only IF it's value when it returns
### = 0 or -1.  This allows you to set it from a database column if you want per worker limits.
### 0 or -1 = no limit
listen.longpoll.defaultMaxLPConnectionsPerWorker = -1


#################################
#     Native Longpolling        #
#################################

### See the native longpolling section under Upstream Sources for more detail.
native.longpoll.port=8950
### timeout for remote host to send LP string before closing the socket.
native.longpoll.timeout=2000

################################
#       DDos Resilience        #
################################

### There are two options for DDos resilience, both provide significant protection against low level DDoS attacks.
### They can be enabled individually or together.  Each will add a slight overhead to request processing so if you
### already have DDoS protection consider disabling.
### Note that this protection is at the webserver level.  If you are under an attack large enough to clag your
### ip stack then the requests may not even be getting this far.  Consider using a more low level type protection if
### DDoS is a real threat for your pool.

### QoS Filter prioritizes incoming requests for authenticated users.  It also grants additional priority to those
### users that have submitted valid proof of work in the current or previous blocks.  This provides some level of
### protection against a flood of useless requests.

enableQoS=true
QoSMaxRequestsToServiceConcurrently=55

### DoSFilter provides rate limiting and throttling on a per connection (ip + port) basis.  
### Adds an additional level of DoS protection against a single client DoS attacks but QoS Filter will probably
### be more effective against DDoS.
### Update:  Real world testing has shown the DoS Filter is more trouble than it's worth.  QoS is a much better option.
enableDoSFilter=false
DoSFilterMaxRequestsPerSecondBeforeThrottle=10

################################
#     Notifications            #
################################

### If set PoolServerJ will send a notification on block change so you know when to process shares
### without needing to constantly poll the database.
### Currently only method support is httpget - if you can suggest any other push type methods let us know.
### get will be sent with params: ?blockchange=true&blockwon=<true|false>&source=<source.name>
### This url is not part of PoolServerJ.  You can implement a PHP page for example that will react to the call
### and do your payment processing cycle.

#notify.blockchange.method=httpget

### highly recommend this is not a publicly accessible URL or that you at least check the request is from localhost
### or you could be open to a DoS by forcing constant payout processing.

#notify.blockchange.url=http://localhost:10001/notifyblockchange-downstream

### server will probably be flat out for a few seconds after a block change servicing getworks so you may not want
### to be doing huge database queries to process payouts straight away.
### milliseconds - default 5000
notify.blockchange.delay=10000

################################
#     Management Interface     #
################################

### Allows some calls to be issued to server using HTTP GET requests.  
### Recommended you block this port on your firewall as well but it will ignore all requests unless from an address in
### the allowedManagementAddresses property
### current functions supported:
### flushWorker - removes worker from cache, call this if the worker is changed by your frontend.
### e.g. http://localhost:8997/?method=flushWorker&name=myworker
### e.g. http://localhost:8997/?method=shutdown

enableManagementInterface=true
allowShutdownByManagementInterface=true

### MUST be different to both listen.http.json-rpc.port and longpoll port
managementInterfacePort=8997

### Forces mgmt interface to only bind to 127.0.0.1
bindManagementInterfaceOnlyToLocahost=true
### comma delimited for multiple addresses.  This doesn't affect interface bindings, it is verification after the request is received.
### If bindManagementInterfaceOnlyToLocahost=true this won't work for any addresses other than localhost.
### If bindManagementInterfaceOnlyToLocahost=false and you only have localhost as an allowed addres external client can still hit the
### interface but will get an unauthorized response.
### Wildcards are not supported.
allowedManagementAddresses=127.0.0.1,10.1.1.10

################################
#       Memory Management      #
################################

### Sleep interval (in seconds) before checking worker and work caches for expired entries.  This may still happen while sleeping as all entries
### are checked for expiry conditions whenever they are retrieved.
flushCacheInterval=20

### In seconds.  Period to cache workers in memory to avoid constant hits to the database.  You can set this to a long value if you
### use the flushworker call (see allowedManagementAddresses)
### This also caches unknown usernames to protect against a flood of database hits from unregistered workers.
### Note that if this is set to a reasonably long period you pool will be highly resilient to temporary database outages
workerCacheExpiry=3600

### By default entries in the worker cache are only evicted if they aren't looked up for longer than workerCacheExpiry
### This can potentially mean if a worker is updated from your pool front end the cached entry will remain and the update won't take.
### The management interface method 'flushWorker' is provided to ensure the worker cache entry is refreshed in this circumstance and allows
### maximum cache performance.  If for some reason you are physically or philosophically unable to use this feature you can use this option
### to use a fixed time eviction strategy.  This will ensure worker entries are refreshed at an interval of workerCacheExpiry.
### We don't recommend this strategy hence the silly name which is a jibe at the pool operator who requested it.
### To protect the guilty he shall remain anonymous.
###
### default: false
#useBrokenWorkerCacheEvictionStrategyBecauseImTooLazyToAdjustMyFrontendToUseTheCacheProperly=false

### Enforce case sensitivity when looking up workers in the cache.  This does not affect DB lookups.
### If this is set to true you must ensure you worker DB query uses a case sensitive comparison.
### default: false
#caseSensitiveWorkerNames=false

### When work is issued a unique portion is stored internally in a map.  This map can grow very large.
### If a worker submits work and it is not in this map an 'unknown-work' response will be issued unless
### the work is in the previous block's map in which case a 'stale-work' will be issued.
### pushpoold has a hardcoded cache timeout of 120 seconds.  So it's reasonable to expect that most miners
### will not try to retain work for longer than this period.  Shorten it at your peril.
### (seconds)
maxAgeToMapWorkSource=130


################################
#      X-Mining-Extensions     #
################################

### NOTE: As of v0.4.0rc1 mining extensions are only partially implemented and not functional.

### To understand what the different mining extensions do see https://en.bitcoin.it/wiki/Getwork

### float.  Noncerange is calculated based on hashrate reported by the miner.  So to ensure
### The range provides enough space that miner doesn't run out of nonces in 1 second we can
### pad the nonce range to allow some headroom.
### basically this number is the approximate number of seconds the noncerange should last for
### before the miner uses up all the nonce space.  If rollNTime is enabled then 2 should be
### plenty of headroom.  If not then you'll probably want a much bigger number like 120
### so the worker doesn't need to refresh work for 2 minutes.
### set to -1 to disable nonceRange
#nonceRangePaddingFactor=20.0

### This is the period (in seconds) that the miner is allowed to roll the timestamp of the delivered
### work and still have it considered valid when submitted as a share
### THIS MUST BE <= maxAgeToMapWorkSource.  If it is not then work entries may be deleted from the work map
### whilst the miner is still working on it and when it does eventually submit it will receive a 'stale'.
### It is recommended to set this a few seconds below maxAgeToMapWorkSource.
### set to -1 to disable rollNTime
#rollNTimeExpire=120

################################################################
#          Logging                                             #
################################################################

### Output to logs and to database will be in the same format as pushpool.  Use this if you want a drop in replacement for pushpool.
### if false you will get some extra data logged including blocknumber and the name of the work source that provided each share.
### Note: the database definition will be slightly different for non-compatability mode in the shares table:
###     time column should be a TIMESTAMP
###     our_result and upstream result should be a BOOLEAN or INT(1)

## ensure db.stmt.insertShare is set to the appropriate INSERT statement
usePushPoolCompatibleFormat=false

### if path is relative it will be relative to the directory that the runtime jar file
### windows users use forward slashes or double backslashes i.e.
### C:/pool/log/error.log or C:\\pool\\log\\error.log
#errorLogFile=log/error.log
#stdOutLogFile=log/out.log

### the following two can be commented out if you don't want file logging.  Note though that requests are not logged to database
### so this is your only option for if you want to record them.
sharesLogFile=log/client-shares.log
requestsLogFile=log/client-requests.log


################################################################
#          Logging Requests                                    #
################################################################

### don't cache requests, flush straight to file.
request.flushToFilesImmedate=false
request.maxRequestsToQueueBeforeCommit=100
### seconds
request.maxRequestAgeBeforeCommit=10
### send requests to stdout
requestsToStdout=false

################################################################
#          Logging Shares                                      #
################################################################

### flush new shares straight to file. - database logging will still use caching if enabled.
shares.flushToFilesImmedate=false
### to disable caching and force direct database write set this to 0.
shares.maxEntrysToQueueBeforeCommit=500
### seconds
shares.maxEntryAgeBeforeCommit=10
### send shares to stdout
sharesToStdout=false

################################################################
#          Submitting Shares Upstream                          #
################################################################

### Hardcoded maximum of 10
submit.maxConcurrentSubmitRequests=5
### in milliseconds = max 1000
submit.minIntervalBetweenHttpRequests=0
### max 3
submit.maxSubmitRetryOnConnectionFail=3

################################################################
#          Database                                            #
################################################################

################################
#       Custom Engines         #
################################

### if you want to replace the standard engines for authetication with different implementations
### you can set these options.  You must specify the engines using the fully qualified class name
### If specifying a custom engine you provide an engine with specific constructor signature
### as the engine are instantiated by reflection.
### For more information on custom engines and building your own plugins see:
### http://poolserverj.org/documentation/plugin-guide/

### This engine manages the fetching of workers from the database (or whereever else you want to
### store them.
### AnyWorkerFetchEngine is an alternative that does not check the DB, it simply returns a worker
### with the supplied username and password.
### Required Constructor signature: (String[] extraParams)
#db.engine.workerFetch=com.shadworld.poolserver.db.worker.WorkerDBFetchEngine

### This allows some extra config of your custom engine. It is a comma delimited list
### which will be passed to your constructor as an array of strings (String[] extraParams).  An empty
### entry in the list i.e. 'param1,,param3' will be passed as an empty string
### If you require non String arguments you must parse these into the appropriate type in
### you constructor.  e.g. Integer.parseInt(extraParams[0]);
### Sorry no escape char.  If you need to use a delimited list as one of your params you'll need
### to use a different delimiter.
#db.engine.workerFetch.extraParams=param1,,param3

### This engine allows for customised Authentication behaviour.  Not really a database engine
### but better to keep them all together.
### An alternative AnyPasswordWorkerAuthenticator is provided that allows any password.
### Required Constructor signature: (WorkerProxy workerProxy, String[] extraParams)
#authenticatorEngine=com.shadworld.poolserver.servlet.auth.WorkerAuthenticator
### @see comments for #db.engine.workerFetch.extraParams property
#authenticatorEngine.extraParams=param1,param2,param3

#authenticatorEngine=com.shadworld.poolserver.servlet.auth.AnyPasswordWorkerAuthenticator
#authenticatorEngine.extraParams=true,false

### This engine handles logging of shares to database (it is separate from file and stdout logging)
### An alternative BlackHoleSharesDBEngine is provided to prevent all DB logging.
### Required Constructor signature: (ShareLogger shareLogger, String tempFilename, String[] extraParams)
#db.engine.shareLogging=com.shadworld.poolserver.db.shares.DefaultPreparedStatementSharesDBFlushEngine

### @see comments for #db.engine.workerFetch.extraParams property
#db.engine.shareLogging.extraParams=param1,param2

### see source code for other available engines
#db.engine.shareLogging=com.shadworld.poolserver.db.shares.bulkload.JavaPipesBulkLoader
#db.engine.shareLogging=com.shadworld.poolserver.db.shares.bulkload.DirectFifoBulkLoader


### Only required for some of the BulkLoader engines that use local fifos or temp files.
### See notes in source of those engines for requirements to use these features.
#db.engine.shareLogging.tempfile=/tmp/mysql/fifo

################################
#    Database Connections      #
################################

### Shares and Workers operation use two seperate connections internally.  By default
### these both use the same set of parameters.  If you want to use different connections
### you specify either some or all connection parameters individually.
### The set of parameters that can be set like this are:
### db.engine, db.host, db.port, db.name, db.schema, db.file, db.user, db.password, db.url
### , db.connectionOptions
### To customise a parameter simply add a new property in the following format:
### db.shares.schema=shares_schema or db.worker.schema=worker_schema
###
### The config process will first check for a customised parameter and if not present
### will fall back to the standard parameter i.e. db.schema
### If you only want to change one you can use the standard parameters for all except the
### one that differs.  

### mysql ###
db.engine=mysql
db.host=localhost

db.schema=test
db.port=3306
db.user=smart
db.password=smart
### JDBC connection options.  This a comma delimited list of <key>=<value> pairs
### these allow you to add arbitrary connection parameters to your database connection.
db.connectionOptions=rewriteBatchedStatements=true

db.column.username=username
db.column.password=password
db.column.id=id
### this column should contain a comma delimited list of ip addresses or hostnames.
### if this property is not set then host validation will be disabled.
db.column.allowHosts=allowed_hosts

###
### Share Logging Query and Column Mapping - ***READ THIS***
###
### db.stmt.insertShare.columnMapping is how you tell poolserverj which data fields appear in what order in
### your SQL statement so it puts the right data in the right fields.
### The format is a comma delimited list.  Each entry is two numbers separated by a ':'.  The first number is the
### position where that field appears in your sql statement beginning at number 1, *NOT* 0, for the first column.  The second number
### is the number from the approriate field in the list below.
### Fields can be excluded simply by leaving them out of the list.  
###
### Example: Using the below following query
### INSERT INTO shares (username, reason, our_result, upstream_result) VALUES (?, ?, ?, ?)
### the mapping would look like this:
### db.stmt.insertShare.columnMapping=1:2,2:5,3:3,4:4
###
###  Available fields:
###
###  1 - remote_host - TEXT or VARCHAR
###  2 - username - TEXT or VARCHAR
###  3 - our_result = BOOLEAN or INT(1), if pushpoolCompatibility mode: ENUM(Y,N) or TEXT or VARCHAR
###  4 - upstream_result = BOOLEAN or INT(1), if pushpoolCompatibility mode: ENUM(Y,N) or TEXT or VARCHAR
###  5 - reason - TEXT or VARCHAR
###  6 - solution - TEXT or VARCHAR (length 257)
###  7 - time - TIMESTAMP
###  8 - source - TEXT or VARCHAR
###  9 - block_num - INT or TEXT or VARCHAR
###  10 - prev_block_hash - TEXT or VARCHAR(65) - this is just solution.substring(8, 72) - may be useful for indexing
###  11 - useragent TEXT or VARCHAR
###
###  12 - 50 reserved
###
###  The following mappings are for partial merged mining results where a submitted data is stale
###  for some but not all chains.  The field type is the same as for our_result
###  Sha256 chains
###  51 - our_result_bitcoin
###  52 - our_result_namecoin
###  53 - our_result_devcoin
###  54 - our_result_ixcoin
###  55 - our_result_i0coin
###  56 - our_result_geistgeld
###
###  SCrypt chains
###  151 - our_result_tenebrix
###  152 - our_result_fairbrix
###  153 - our_result_litecoin
###
### If you have more than one local source it is highly recommended to use field 8 (sources) so that when you win a block
### you have a way of tracking which wallet to payout your members from.
###

db.stmt.insertShare=INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution, time, source, block_num, our_result_bitcoin, our_result_namecoin, useragent, prev_block_hash,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
db.stmt.insertShare.columnMapping=1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:51,11:52,12:11,13:10,14:12,15:13,16:14,17:15,18:16,19:17,20:18,21:19,22:20,23:21,24:22,25:23,26:24,27:25,28:26,29:27


### native example for merged mining with namecoin only as an aux chain - ensure usePushPoolCompatibleFormat=false
#db.stmt.insertShare=INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution, time, source, block_num, our_result_bitcoin, our_result_namecoin, useragent, prev_block_hash) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
#db.stmt.insertShare.columnMapping=1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:51,11:52,12:11,13:10

### native example for non-merged mining setup with 'solution' field excluded
#db.stmt.insertShare=INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, time, source, block_num, useragent) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
#db.stmt.insertShare.columnMapping=1:1,2:2,3:3,4:4,5:5,6:7,7:8,8:9,9:11

### This is your worker select statement.  It may not be used if you have a custom WorkerFetcher engine.
db.stmt.selectWorker=SELECT * FROM pool_worker WHERE username LIKE ?
db.stmt.selectWorkerList=SELECT * FROM pool_worker WHERE id = (?);


### postgresql ###

#db.engine=postgresql
#db.host=localhost
#db.name=psj
#db.schema=poolserverj_native
#db.port=5432
#db.user=ps_test
#db.password=ps_test

### sqlite3 ###

#db.engine=sqlite3

### For windows file naming convention see comments for errorLogFile property
#db.file=sqlite/psj.db

#db.stmt.insertShare=

#db.stmt.selectWorker=SELECT * FROM pool_worker WHERE username LIKE ?

################################################################
#          Upstream Sources                                    #
################################################################


###
### These are your sources of work.  Local sources are typically bitcoin daemons or WorkMaker internally generated.
###
### You can have more than one of either type of source.  For example your bitcoin daemon may be struggling to keep
### up with requests so you can run a 2nd daemon on another machine and use it as a 2nd source to speed up your getwork
### delivery.  If you are using local work generaration (WorkMaker) then you probably don't need additional sources.
### WorkMaker is at least 10 times faster than rpc in it's earliest iterations and will like be significantly
### faster after some optimization.
###
### If you do have more than a single source it is recommended
### that you add a 'source' column to your shares table in your database so you can track which source winning blocks
### came from.
###
### To use multiple sources simply use a different numbered prefix for each of the properties.
### i.e. source.local.1.name=local bitcoin daemon1
###      source.local.2.name=local bitcoin daemon2
### Make sure you do this for each of the properties for that source and make sure you give them all unique names
### for tracking.
### Make sure you read the comment for the source.local.1.weighting property, this explains how work is divided among
### sources.

#################################################
#          Local Source 1                       #
#################################################

### this just saves you commenting out every parameter if you want to disable a source.
#source.local.1.disabled=true

### This should be unique. If you are not using pushpool compatability mode for logging then this can be added
### to share logs so you can track where the shares are going.
source.local.1.name=bitcoind-mm
### If local work generation is true poolserverj will use it's own internal work generation algorithm.  
### This is far more efficient that using JSON-RPC (at least 10x).
### The rpc details are still needed as the bitcoin daemon is used to obtain metadata and also for block change monitoring.
### Note that this requires a bitcoin daemon with the getmemorypool patch.  This is part of the standard bitcoin client
### as of v0.5
source.local.1.localWorkGeneration=true
### a valid bitcoin address to receive the payout from the coinbase transaction.
### this default address is a testnet address and will cause the server to shutdown
### if you use it on production.  Just to make sure you don't forget!
source.local.1.localWorkGeneration.payoutAddress=1GLSL8GxBU5LY32mZYNg9kF3vXzUs9Supt
### If a new transaction arrives with a large fee you may want to trigger an early longpoll
### to get miners to include it.  This is the threshold since the last longpoll that will
### cause a longpoll to trigger (in whole bitcoins).
### @not implemented yet
source.local.1.localWorkGeneration.txFeeChangeLongpollTrigger=0.1

### a short UTF-8 encoded message string that can be added to the end of the coinbase sig script.
### This is hard limited to 20 bytes and will be truncated if it is longer.
source.local.1.localWorkGeneration.coinbaseMessage=hi from poolserverj

### url including port of your bitcoin daemon i.e. http://localhost:8332/
source.local.1.url=http://localhost:8332/
source.local.1.p2p.hostport=localhost:8373
### json-rpc username - for standard bitcoind this is set in bitcoin.conf (rpcuser)
source.local.1.username=smart
### json-rpc password - for standard bitcoind this is set in bitcoin.conf (rpcpassword)
source.local.1.password=smart6202H9rIC8EItrVd3u3Z

#######################
#    Merged Mining    #
#######################

### READ THIS - chain names used in various parts of poolserverj config are not arbitrary.
### They are all lowecase and are typically the full name of the chain.  
### e.g. Bitcoin is 'bitcoin' not 'btc'.  If you use variation the server will throw
### and error on startup.
### valid chain names as at v0.4.0rc1 are:
### "bitcoin", "namecoin", "devcoin", "ixcoin", "i0coin", "geistgeld", "tenebrix", "fairbrix", "litecoin"

### This parameter should be set EVEN if you are not using merged mining.
source.local.1.merged.parentchain=bitcoin

### To activate merged mining you need to declare each aux chain.
### This is a comma delimited list of all the chains for which you will define parameters
### Each of the auxchain parameters must then use that name as part of the prefix.
### e.g. using namecoin as an example
### source.local.1.merge.chains=namecoin
### Now each parameter for that chain must be prefixed with:
### source.local.1.merge.namecoin.param=<myparam>
### ONLY include aux chains in this list.
source.local.1.merged.chains=namecoin


### now to define parameters for our named chain 'namecoin'
source.local.1.merged.namecoin.chainid=1
### you MUST have a getmemorypool enabled aux daemon to use
### this on the aux chain.
#source.local.1.merged.namecoin.localCoinbasing=true
source.local.1.merged.namecoin.payoutAddress=Mz3Qs4eDoE7USV8sjnCf8aATeHCJAtM5Zp
source.local.1.merged.namecoin.url=http://localhost:8331/
source.local.1.merged.namecoin.username=smart
source.local.1.merged.namecoin.password=smart
### @see source.local.1.localWorkGeneration.txFeeChangeLongpollTrigger
### @not implemented yet
source.local.1.merged.namecoin.txFeeChangeLongpollTrigger=0.1

#######################
#   /Merged Mining    #
#######################

### Weighting determines how many requests will come from each source.
### The approximate percentage of requests serviced but this source is weighting / sum(all weightings) * 100.
### e.g. if you have source.local.1.weighting=25 and source.remote.1.weighting=75, 25% of requests will be serviced
### by source.local.1
source.local.1.weighting=5

### this is per source, so don't go overboard if you've got multiple sources or you might clog up your machine with masses of concurrent threads
### with a local client testing has shown 10 is a good number.  More or Less reduced performance.  For high latency connection you may want to try higher.
### BUT if the source supports multiget mode you probably don't want this much higher than 3.
### If you are using WorkMaker generation this is the number of concurrent threads dedicated to generating work.
### We recommend about 5 threads / virtual core to achieve close to full cpu saturation during getwork cycles.
source.local.1.maxConcurrentDownloadRequests=50
### no need to go too high since submits are far more rare than requests.
source.local.1.maxConcurrentUpstreamSubmits=3
### in seconds - age is the time between now and when the work was fetched from the source.
source.local.1.maxWorkAgeToFlush=30
### in milliseconds = max 1000
source.local.1.minIntervalBetweenHttpRequests=0
### in milliseconds = max 1000 - alternate value used immediately after a block change
source.local.1.minIntervalBetweenHttpRequestsWhenFrantic=0
### max works to cache.  Server will continually poll upstream until the cache has reached this limit.

### as soon as it drops under this number it will start polling again to keep the cache full.
### work can be removed from cache either by delivering to a client or by sitting there for longer than
### maxWorkAgeToFlush
source.local.1.maxCacheSize=500
### maximum time in milliseconds to wait for the cache to return work before giving up and returning an error result.
source.local.1.cacheWaitTimeout=3000

#################################
#    Block Change Monitoring    #
#################################

### This is the method used to determine when the work source has changed to a new block.
### currently poll mode is the only implementation (native coming soon). Poll mode checks
### each incoming work for a change of prev_block_hash.  If no work has come in for 'maxPollInterval'
### milliseconds a getblocknumber request is issued instead.
### native monitoring is coming soon...
### It is recommended if using WorkMaker to poll more frequently as the daemon is only contacted
### about once/sec to get new transactions.  
###
### valid values: poll, native_longpoll
source.local.1.blockmonitor.mode=poll
source.local.1.blockmonitor.maxPollInterval=100

#################################
#     Native Longpolling        #
#################################

### Native longpolling requires considerable extra configuration but can gain some valuable extra
### milliseconds between when a new block comes in and when your miners start working on fresh work.
### Please see http://poolserverj.org/documentation/configuring-native-longpolling/ for details.
source.local.1.longpoll.native.enable=false
### Once you are sure native longpolling is working correctly you can disable the fallback verification.
### Verifications involve a JSON-RPC call to getblocknumber before firing the blockChange event. So this
### will speed up longpoll dispatch by the cost of one rpc roundtrip.
source.local.1.longpoll.native.disableVerification=false

### this is the password string that should be sent by the other end when notifiying of a block change.
source.local.1.longpoll.native.passphrase=my-very-obscure-string
### comma delimited string, you may need to include the ipv6 the address as well.
source.local.1.longpoll.native.allowedHosts=127.0.0.1,localhost

#################################
#   Local Source Only Config    #
#################################
### The following settings are only relevant to local sources:

### allow non getwork requests to be passed through to this source as a proxy.
### If true methods allowed are filtered by source.local.1.allowPassthruMethods
### getblocknumber is always allowed and returns the latest block number from any source
source.local.1.allowJSON-RPCPassthru=false

### comma delimited list of method names that are allowed to pass through.  
### default is none.  getwork is always allowed.
source.local.1.allowedPassthruMethods=

### defaults to min difficulty: ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
### don't know why you'd want different difficulty per source but it's there if you need it.
#source.local.1.rewriteDifficultyTarget=ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000

###default true = set to false if you want to PoolServerJ as a proxy for non-pool mining
#source.local.1.rewriteDifficulty=false


##################################################
##          Local Source 2                       #
##################################################

source.local.2.disabled=true

### This should be unique. If you are not using pushpool compatability mode for logging then this will be added
### to share logs so you can track where the shares are going.
source.local.2.name=bitcoind-local-2

### url including port i.e. http://localhost:8332/
source.local.2.url=http://localhost:8330/
### json-rpc username - for standard bitcoind this is set in bitcoin.conf (rpcuser)
source.local.2.username=smart
### json-rpc password - for standard bitcoind this is set in bitcoin.conf (rpcpassword)
source.local.2.password=smart

### Perhaps the most important setting, weighting determines how many requests will come from each source.
### The approximate percentage of requests serviced but this source is weighting / sum(all weightings) * 100.
### e.g. if you have source.local.1.weighting=25 and source.remote.1.weighting=75, 25% of requests will be serviced
### by source.local.1
source.local.2.weighting=5

### this is per source, so don't go overboard if you've got multiple sources or you might clog up your machine with masses of concurrent threads
### with a local client testing has shown 10 is a good number.  More or Less reduced performance.  For high latency connection you may want to try higher.
### BUT if the source supports multiget mode you probably don't want this much higher than 3.
source.local.2.maxConcurrentDownloadRequests=20
### no need to go to high since submits are far more rare than requests.
source.local.2.maxConcurrentUpstreamSubmits=3
### in seconds - age is the time between now and when the work was fetched from the source.
source.local.2.maxWorkAgeToFlush=30
### in milliseconds = max 1000
source.local.2.minIntervalBetweenHttpRequests=0
### in milliseconds = max 1000 - alternate value used immediately after a block change
source.local.2.minIntervalBetweenHttpRequestsWhenFrantic=0
### max works to cache.  Server will continually poll upstream until the cache has reached this limit.
### as soon as it drops under this number it will start polling again to keep the cache full.
### work can be removed from cache either by delivering to a client or by sitting there for longer than
### maxWorkAgeToFlush
source.local.2.maxCacheSize=100
### maximum time in milliseconds to wait for the cache to return work before giving up and returning an error result.
source.local.2.cacheWaitTimeout=30000

### The following settings are only relevant to local sources:

### allow non getwork requests to be passed through to this source as a proxy.
### If true methods allowed are filtered by source.local.1.allowPassthruMethods
### getblocknumber is always allowed and returns the latest block number from any source
source.local.2.allowJSON-RPCPassthru=false

### comma delimited list of method names that are allowed to pass through.  
source.local.2.allowedPassthruMethods=

### defaults to min difficulty: ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
### don't know why you'd want different difficulty per source but it's there if you need it.
#source.local.2.rewriteDifficultyTarget=ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000

###default true = set to false if you want to PoolServerJ as a proxy for non-pool mining
#source.local.2.rewriteDifficulty=false




Any Idea ?


Title: Re: PoolServerJ - Tech Support
Post by: 50BTC.com on February 02, 2012, 05:23:10 PM
We are evaluating PoolServerJ for our mining pool, 50btc.com, as replacement for pushpoold. There are few problems we have encountered during testing; can anyone help with them?

We are running Scientific Linux 6.1, java version java-1.6.0-openjdk-1.6.0.0-1.40.1.9.10, poolserverj 0.4.0rc7 (rc2 + rc7 patch), stock bitcoind 0.5.2.

First problem is that currently PoolServerJ doesn't support postgresql properly. For example, with settings
Code:
db.engine=postgresql
db.host=dbserver
db.name=pool
db.schema=public
db.port=5432
db.user=pooluser
db.password=pass
It incorrectly forms connectiong string, it prints
[20:54:18.678] Connecting to DB URL: jdbc:postgresql:pool//dbserver:5432/public?autoReconnect=true
and then always connects to localhost, not "dbserver"

If I understand correctly, specifying connection string in jdbc:postgresql:<database> form can be used only for localhost connections, according to documentation http://jdbc.postgresql.org/documentation/80/connect.html (http://jdbc.postgresql.org/documentation/80/connect.html). So jdbc happily ignores dbserver and port, which makes poolserverj connect only to localhost.

We wouldn't mind to fix that issue, but there are no sources for this part of server (shadtools-sql), even in source repository there is only binary .jar. Therefore, we really can't do anything. Currently, for testing we have installed redirecting proxy for postgresql which forwards requests from localhost to real database server, but for production it would be nice to fix that issue properly. This problem is present both in 0.4.0 and git version.

Second problem is that we want users to authorize with any password, as long as they are registered on pool. There is auth engine called AnyPasswordWorkerAuthenticator which supposed to do the trick, but it doesn't do as advertised. Namely, it does allow to log in with any password, but not without password - when logging in with username only (we tried guiminer+poclbm and minerd) it still returns "401 Unauthorized". Of course, it's set up as it's supposed to

Code:
authenticatorEngine=com.shadworld.poolserver.servlet.auth.AnyPasswordWorkerAuthenticator
authenticatorEngine.extraParams=true, false

and I have looked at its simple code a few times but still can't figure out why it won't allow empty password. Could it be that there is a bug in other code which rejects empty password before it's processed by AnyPasswordWorkerAuthenticator?


Title: Re: PoolServerJ - Tech Support
Post by: EnergyVampire on February 07, 2012, 07:48:21 AM
Hello, I get this error

Code:
Exception in thread "block-chain-tracker" java.lang.NullPointerException
at com.shadworld.poolserver.source.daemonhandler.JsonRpcDaemonHandler.doBlockCheck(JsonRpcDaemonHandler.java:83)
at com.shadworld.poolserver.BlockChainTracker.fireBlockCheck(BlockChainTracker.java:453)
at com.shadworld.poolserver.BlockChainTracker.run(BlockChainTracker.java:485)

when starting up.

Using: poolserverj-0.4.0rc2


Title: Re: PoolServerJ - Tech Support
Post by: Remember remember the 5th of November on February 15, 2012, 07:11:07 PM
Even though I do

Quote
source.local.1.rewriteDifficultyTarget=0000000000000000000000000000000000000000000000000000333300000000

###default true = set to false if you want to PoolServerJ as a proxy for non-pool mining
source.local.1.rewriteDifficulty=false

or even

Quote
source.local.1.rewriteDifficultyTarget=0000000000000000000000000000000000000000000000000000333300000000

###default true = set to false if you want to PoolServerJ as a proxy for non-pool mining
source.local.1.rewriteDifficulty=true

The difficulty is NOT rewritten. It stays at it's default state


Title: Re: PoolServerJ - Tech Support
Post by: 12gaFacelift on February 23, 2012, 12:18:14 AM
Someone to install PoolServerJ + Frontend : Win xp - xamp server . first to test and if its working then another box can be used to go public. PM me

thx


Title: Re: PoolServerJ - Tech Support
Post by: mich on February 29, 2012, 10:43:50 AM
With merged mining poolserverj writes 'upstream_result' for bitcoin only? How to catch namecoin's upstream_result?


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on February 29, 2012, 11:55:25 AM
its in there you just have to change the table section of the config to how you want it to report to your database


Title: Re: PoolServerJ - Tech Support
Post by: mich on February 29, 2012, 01:13:01 PM
its in there you just have to change the table section of the config to how you want it to report to your database
You mean 'our_result_bitcoin' and 'our_result_namecoin'? But these columns is our markers - accepted or rejected shares, and I asking about markers of winning shares. Something like upstream_result_bitcoin and upstream_result_namecoin.


Title: Re: PoolServerJ - Tech Support
Post by: mich on March 01, 2012, 10:40:54 AM
nobody knows?


Title: Re: PoolServerJ - Tech Support
Post by: mich on March 12, 2012, 10:00:58 AM
Code:
4153182 [HttpClient-upstream-work-submit-handler-38] WARN org.eclipse.jetty.util.log - EXPIRED ContentExchange@1175760389=POST//127.0.0.1:8332/#8
[13:54:06.686] JSON-RPC getmemorypool update failed.

How to fix it?


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on March 12, 2012, 08:08:15 PM
that means its not connecting to bitcoind

is this happening all the time or just temporarily when you first start up?

because if its not happening all the time I would not worry about it



Title: Re: PoolServerJ - Tech Support
Post by: mich on March 13, 2012, 03:11:25 AM
Not every time, random from 5 to 30 min. And when it happens phoenix miner disconnect, then connect back in few seconds.


Title: Re: PoolServerJ - Tech Support
Post by: Internet151 on May 12, 2012, 02:18:57 AM
Has anyone gotten this to work under Windows and Bitcoin-qt 0.6+?


Title: Re: PoolServerJ - Tech Support
Post by: maxcarjuzaa on June 04, 2012, 12:38:42 AM
Hi I am running poolserverj with litecoind.

In order to test it I am running one miner (minerd) , but it had not solve any shares yet and if I connect it to my usual pool I get a share every 10 seconds or so. Do I miss any configuration? Do you have any idea?

Thank you.
Max


Title: Re: PoolServerJ - Tech Support
Post by: cablepair on June 05, 2012, 07:02:34 PM
Hi I am running poolserverj with litecoind.

In order to test it I am running one miner (minerd) , but it had not solve any shares yet and if I connect it to my usual pool I get a share every 10 seconds or so. Do I miss any configuration? Do you have any idea?

Thank you.
Max

If memory serves , I dont think lite coin compatibity was ever actually achieved


Title: Re: PoolServerJ - Tech Support
Post by: Flowz on July 06, 2012, 11:52:38 AM
Hi,
I'm currently running PoolServerJ, and it working out great!
Getting 23Gh/s!

There is only one thing that concerns me a lot.
I've been getting a lot of 'Broken Pipe', 'EofException' and 'connection refused' errors, with a lot I mean non-stop outputting those exceptions. Everything is still working though, I just wonder why those exception are poping up in such a giant number.

~ Flowz


Title: Re: PoolServerJ - Tech Support
Post by: Flowz on July 06, 2012, 06:13:55 PM
Furthermore I would like to point out that,
I get a error which bugs down the whole system:
java.lang.OutOfMemoryError: GC overhead limit exceeded

Temporary solution:
-XX:-UseGCOverheadLimit

(This means it won't look if the garbage collector is like using 98% of the CPU or not, which wil decrease the pool performance a lot I think)

Or I could increase the max heap size:
-Xmx1g

I have 8gig of RAM memory, what is the best heap size for that server?

~ Flowz


Title: Re: PoolServerJ - Tech Support
Post by: mich on July 27, 2012, 04:55:45 PM
How to setup log rotation for poolserverj's log files? (by logrotate)


Title: Re: PoolServerJ - Tech Support
Post by: Bit LC Inc. on September 18, 2012, 03:56:21 PM
WARNING: With the 0.7.0 release of bitcoind - getmemorypool is removed, which cases the internal work-generation to fail.
Patches for poolserverj needed.


Title: Re: PoolServerJ - Tech Support
Post by: Lomax42 on September 21, 2012, 06:18:24 AM
Can I get the source code (Mini Http Proxy mini-proxy.tar.gz) would like to add there a separate authorization! powernet34@gmail.com Thank you!


Title: Re: PoolServerJ - Tech Support
Post by: OgStar on October 04, 2012, 10:58:26 AM
Can anyone tell me which bitcoin daemon version is the best for PoolServerJ?

I know 0.7 won't work, but will anything below it work? Because I'm trying to figure out the reasons of some bugs I've been getting.

And what about namecoind? What are the patches that it needs to make getmemorypool work with it, and where to find it?

Thank you!


Title: Re: PoolServerJ - Tech Support
Post by: Flowz on October 12, 2012, 06:34:41 PM
Can anyone tell me which bitcoin daemon version is the best for PoolServerJ?

I know 0.7 won't work, but will anything below it work? Because I'm trying to figure out the reasons of some bugs I've been getting.

And what about namecoind? What are the patches that it needs to make getmemorypool work with it, and where to find it?

Thank you!
Since nobody has answered I'll reply back to you.

As far as I know, from a performance point of view, the 4diff patched bitcoind is the best way to go.

http://poolserverj.org/documentation/performance-memory-tuning/

https://github.com/bitcoin/bitcoin/pull/426

The last patch I remember coming out was a beta patch 4diff with a 0.5.

Kind regards,
Flowz



Title: Re: PoolServerJ - Tech Support
Post by: sippsnapp on October 30, 2012, 02:52:07 PM
Anybody here who can tell me what am i doing wrong?

Code:
root@j064:/opt/poolserverj-0.4.0rc2/bin# java -classpath poolserverj.jar:../lib/*:../lib/lib_non-maven/*:../lib/plugins com.shadworld.poolserver.servicelauncher.PoolServerService start ../conf/poolserverj.conf
Args - [2]: start ../conf/poolserverj.conf
PoolServerJ Service Starting Tue Oct 30 14:46:55 UTC 2012
[14:46:56.054] Starting PoolServerJ v0.4.0-WM-b233-c-d5e730c5756c
[14:46:56.055] user.dir: /opt/poolserverj-0.4.0rc2/bin
[14:46:56.055] Home path set to: /opt/poolserverj-0.4.0rc2/bin/poolserverj.jar
[14:46:56.055] Home directory set from jar file location to: /opt/poolserverj-0.4.0rc2
[14:46:56.059] Sever is set to testnet: false
[14:46:56.066] Adding donation target: chainName: namecoin donationAmount: 0.3 calc method: [% of total] addressUrl: http://poolserverj.org/meta/donations/ address: NFja75nNRHZYKtN9YQ6wHPQdmhzBEAmTAt
[14:46:56.067] Adding donation target: chainName: bitcoin donationAmount: 0.3 calc method: [% of total] addressUrl: http://poolserverj.org/meta/donations/ address: 1LezqRatQz7MeNoCVziYwcdwtqeEbvrdAq
[14:46:56.071] Wrote PID: 22107 to pidFile: /opt/poolserverj-0.4.0rc2/tmp/poolserverj.pid
[14:46:56.101] Connecting to DB URL: jdbc:mysql://127.0.0.1:3306/poolserverj_native?allowMultiQueries=true&zeroDateTimeBehavior=round&dumpQueriesOnException=true&dumpMetadataOnColumnNotFound=true&useCompression=true&autoReconnect=true&rewriteBatchedStatements=true
[14:46:56.288] Mapped parameter 1 to field 1 (remote_host)
[14:46:56.288] Mapped parameter 2 to field 2 (username)
[14:46:56.289] Mapped parameter 3 to field 3 (our_result)
[14:46:56.289] Mapped parameter 4 to field 4 (upstream_result)
[14:46:56.289] Mapped parameter 5 to field 5 (reason)
[14:46:56.289] Mapped parameter 6 to field 7 (time)
[14:46:56.289] Mapped parameter 7 to field 8 (source)
[14:46:56.289] Mapped parameter 8 to field 9 (block_num)
[14:46:56.289] Mapped parameter 9 to field 11 (useragent)
[14:46:56.290] Building Shares-DB-flush-engine: DefaultPreparedStatementSharesDBFlushEngine.class with extraParams: []
[14:46:56.291] Building Worker-authentication-engine: WorkerAuthenticator.class with extraParams: null
[14:46:56.302] Configuring aux daemon for WorkSource: bitcoind-mm
[14:46:56.302] Chain name: namecoin
[14:46:56.302] Chain id: 1
[14:46:56.302] Chain url: http://127.0.0.1:7334/
[14:46:56.303] Chain username: noobtub3ndsafu
[14:46:56.303] Chain payoutAddress: N15ThaRx21TjWsDdex4TuUPywMSts4iXM3
[14:46:56.303] Chain password: 9*****************************1
530 [main] INFO org.eclipse.jetty.util.log - jetty-7.4.0.v20110414
547 [main] INFO org.eclipse.jetty.util.log - started o.e.j.s.ServletContextHandler{/,null}
585 [main] INFO org.eclipse.jetty.util.log - Started SelectChannelConnector@0.0.0.0:8999 STARTING
586 [main] INFO org.eclipse.jetty.util.log - jetty-7.4.0.v20110414
586 [main] INFO org.eclipse.jetty.util.log - started o.e.j.s.ServletContextHandler{/,null}
589 [main] INFO org.eclipse.jetty.util.log - Started SelectChannelConnector@127.0.0.1:8997 STARTING
[14:46:56.447] Starting local work source proxy: bitcoind-mm
[14:46:56.508] RETRY
[14:46:56.508] RETRY
[14:46:56.515] RETRY
[14:46:56.516] RETRY
[14:46:56.518] New Block detected [81555] from source: DaemonSource[bitcoind-mm].namecoin - 0 lagging sources.
[14:46:56.518] New Block detected [205718] from source: DaemonSource[bitcoind-mm].bitcoin - 0 lagging sources.
[14:46:56.518] Restoring workmap from file: /opt/poolserverj-0.4.0rc2/tmp/workmap-8999.bin
[14:46:56.806] Updating donation target address for chain: namecoin Address: NFja75nNRHZYKtN9YQ6wHPQdmhzBEAmTAt
[14:46:56.912] Updating donation target address for chain: bitcoin Address: 1Lk8f18EyPB3uAJvgTeHgzCVkKY9njQ5bA
[14:47:06.548] Exception in Cleaner Thread
java.lang.RuntimeException: Waited 5 seconds for client provider to be set but it hasn't.  This would indicate a problem with your client configuration.
        at com.shadworld.poolserver.workmaker.WorkMaker.update(WorkMaker.java:184)
        at com.shadworld.poolserver.source.merged.MergedMiningGroup.updateAuxes(MergedMiningGroup.java:249)
        at com.shadworld.poolserver.Cleaner.run(Cleaner.java:54)
java.io.IOException: Socket is disconnected
        at com.google.bitcoin.core.BitcoinSerializer.seekPastMagicBytes(BitcoinSerializer.java:347)
        at com.google.bitcoin.core.BitcoinSerializer.deserialize(BitcoinSerializer.java:216)
        at com.google.bitcoin.core.NetworkConnection.readMessage(NetworkConnection.java:170)
        at com.google.bitcoin.core.NetworkConnection.<init>(NetworkConnection.java:96)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.startListener(BitcoinDualConnection.java:93)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.start(BitcoinDualConnection.java:47)
        at com.shadworld.poolserver.source.merged.JsonRpcMergeMiningLocalWorkMakerDaemonHandler.start(JsonRpcMergeMiningLocalWorkMakerDaemonHandler.java:159)
        at com.shadworld.poolserver.source.WorkSource.start(WorkSource.java:154)
        at com.shadworld.poolserver.WorkProxy.start(WorkProxy.java:914)
        at com.shadworld.poolserver.PoolServer.start(PoolServer.java:262)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.start(PoolServerService.java:99)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.windowsService(PoolServerService.java:58)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.main(PoolServerService.java:28)
[14:47:57.033] This error may indicate your bitcoin daemon was not contactable. Check it is running and you have entered the correct host:port for the bitcoin protocol interface NOT the json-rpc interface.
java.lang.NullPointerException
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.shutdown(BitcoinDualConnection.java:133)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.startListener(BitcoinDualConnection.java:98)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.start(BitcoinDualConnection.java:47)
        at com.shadworld.poolserver.source.merged.JsonRpcMergeMiningLocalWorkMakerDaemonHandler.start(JsonRpcMergeMiningLocalWorkMakerDaemonHandler.java:159)
        at com.shadworld.poolserver.source.WorkSource.start(WorkSource.java:154)
        at com.shadworld.poolserver.WorkProxy.start(WorkProxy.java:914)
        at com.shadworld.poolserver.PoolServer.start(PoolServer.java:262)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.start(PoolServerService.java:99)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.windowsService(PoolServerService.java:58)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.main(PoolServerService.java:28)
[14:47:57.034] This error may indicate your bitcoin daemon was not contactable. Check it is running and you have entered the correct host:port for the bitcoin protocol interface NOT the json-rpc interface.
java.lang.NullPointerException
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.shutdown(BitcoinDualConnection.java:141)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.startListener(BitcoinDualConnection.java:98)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.start(BitcoinDualConnection.java:47)
        at com.shadworld.poolserver.source.merged.JsonRpcMergeMiningLocalWorkMakerDaemonHandler.start(JsonRpcMergeMiningLocalWorkMakerDaemonHandler.java:159)
        at com.shadworld.poolserver.source.WorkSource.start(WorkSource.java:154)
        at com.shadworld.poolserver.WorkProxy.start(WorkProxy.java:914)
        at com.shadworld.poolserver.PoolServer.start(PoolServer.java:262)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.start(PoolServerService.java:99)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.windowsService(PoolServerService.java:58)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.main(PoolServerService.java:28)
^C73102 [Thread-0] INFO org.eclipse.jetty.util.log - Graceful shutdown SelectChannelConnector@0.0.0.0:8999 STARTED
[14:48:08.960] Shutting down poolserver...
[14:48:08.960] Flushing cached shares...
[14:48:08.960] Flush shares cache complete...
[14:48:08.961] Waiting to complete upstream share submits...
[14:48:08.961] Finished upstream submits...
[14:48:08.961] Flushing final shares...
[14:48:08.962] 0 shares in 1,351,608,448 seconds. Current hashRate: 0 GH/s
[14:48:08.962] Submit Throttling on: false
[14:48:08.962] All share submits flushed...
[14:48:08.962] Waiting for threads to die...
[14:48:08.963] This error may indicate your bitcoin daemon was not contactable. Check it is running and you have entered the correct host:port for the bitcoin protocol interface NOT the json-rpc interface.
java.lang.NullPointerException
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.shutdown(BitcoinDualConnection.java:133)
        at com.shadworld.poolserver.source.merged.JsonRpcMergeMiningLocalWorkMakerDaemonHandler.shutdown(JsonRpcMergeMiningLocalWorkMakerDaemonHandler.java:146)
        at com.shadworld.poolserver.source.WorkSource.shutdown(WorkSource.java:190)
        at com.shadworld.poolserver.WorkProxy.shutdown(WorkProxy.java:923)
        at com.shadworld.poolserver.PoolServer.shutdown(PoolServer.java:620)
        at com.shadworld.poolserver.PoolServer$1.run(PoolServer.java:252)
[14:48:08.964] This error may indicate your bitcoin daemon was not contactable. Check it is running and you have entered the correct host:port for the bitcoin protocol interface NOT the json-rpc interface.
java.lang.NullPointerException
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.shutdown(BitcoinDualConnection.java:141)
        at com.shadworld.poolserver.source.merged.JsonRpcMergeMiningLocalWorkMakerDaemonHandler.shutdown(JsonRpcMergeMiningLocalWorkMakerDaemonHandler.java:146)
        at com.shadworld.poolserver.source.WorkSource.shutdown(WorkSource.java:190)
        at com.shadworld.poolserver.WorkProxy.shutdown(WorkProxy.java:923)
        at com.shadworld.poolserver.PoolServer.shutdown(PoolServer.java:620)
        at com.shadworld.poolserver.PoolServer$1.run(PoolServer.java:252)
[14:48:08.965] Dumping workmap to file: /opt/poolserverj-0.4.0rc2/tmp/workmap-8999.bin
73112 [Thread-0] INFO org.eclipse.jetty.util.log - Graceful shutdown o.e.j.s.ServletContextHandler{/,null}
[14:48:09.032] Shutting down Web Server...
[14:48:09.133] Closed 0 longpoll connections in 0ms
78165 [Thread-0] INFO org.eclipse.jetty.util.log - stopped o.e.j.s.ServletContextHandler{/,null}
78278 [shutdown] INFO org.eclipse.jetty.util.log - stopped o.e.j.s.ServletContextHandler{/,null}
[14:48:14.188] Shutdown complete...
root@j064:/opt/poolserverj-0.4.0rc2/bin#

If its caused by a wrong bitcoind build, which one is the correct one? [source please]


Title: Re: PoolServerJ - Tech Support
Post by: Flowz on October 31, 2012, 05:15:40 PM
Anybody here who can tell me what am i doing wrong?

Code:
root@j064:/opt/poolserverj-0.4.0rc2/bin# java -classpath poolserverj.jar:../lib/*:../lib/lib_non-maven/*:../lib/plugins com.shadworld.poolserver.servicelauncher.PoolServerService start ../conf/poolserverj.conf
Args - [2]: start ../conf/poolserverj.conf
PoolServerJ Service Starting Tue Oct 30 14:46:55 UTC 2012
[14:46:56.054] Starting PoolServerJ v0.4.0-WM-b233-c-d5e730c5756c
[14:46:56.055] user.dir: /opt/poolserverj-0.4.0rc2/bin
[14:46:56.055] Home path set to: /opt/poolserverj-0.4.0rc2/bin/poolserverj.jar
[14:46:56.055] Home directory set from jar file location to: /opt/poolserverj-0.4.0rc2
[14:46:56.059] Sever is set to testnet: false
[14:46:56.066] Adding donation target: chainName: namecoin donationAmount: 0.3 calc method: [% of total] addressUrl: http://poolserverj.org/meta/donations/ address: NFja75nNRHZYKtN9YQ6wHPQdmhzBEAmTAt
[14:46:56.067] Adding donation target: chainName: bitcoin donationAmount: 0.3 calc method: [% of total] addressUrl: http://poolserverj.org/meta/donations/ address: 1LezqRatQz7MeNoCVziYwcdwtqeEbvrdAq
[14:46:56.071] Wrote PID: 22107 to pidFile: /opt/poolserverj-0.4.0rc2/tmp/poolserverj.pid
[14:46:56.101] Connecting to DB URL: jdbc:mysql://127.0.0.1:3306/poolserverj_native?allowMultiQueries=true&zeroDateTimeBehavior=round&dumpQueriesOnException=true&dumpMetadataOnColumnNotFound=true&useCompression=true&autoReconnect=true&rewriteBatchedStatements=true
[14:46:56.288] Mapped parameter 1 to field 1 (remote_host)
[14:46:56.288] Mapped parameter 2 to field 2 (username)
[14:46:56.289] Mapped parameter 3 to field 3 (our_result)
[14:46:56.289] Mapped parameter 4 to field 4 (upstream_result)
[14:46:56.289] Mapped parameter 5 to field 5 (reason)
[14:46:56.289] Mapped parameter 6 to field 7 (time)
[14:46:56.289] Mapped parameter 7 to field 8 (source)
[14:46:56.289] Mapped parameter 8 to field 9 (block_num)
[14:46:56.289] Mapped parameter 9 to field 11 (useragent)
[14:46:56.290] Building Shares-DB-flush-engine: DefaultPreparedStatementSharesDBFlushEngine.class with extraParams: []
[14:46:56.291] Building Worker-authentication-engine: WorkerAuthenticator.class with extraParams: null
[14:46:56.302] Configuring aux daemon for WorkSource: bitcoind-mm
[14:46:56.302] Chain name: namecoin
[14:46:56.302] Chain id: 1
[14:46:56.302] Chain url: http://127.0.0.1:7334/
[14:46:56.303] Chain username: noobtub3ndsafu
[14:46:56.303] Chain payoutAddress: N15ThaRx21TjWsDdex4TuUPywMSts4iXM3
[14:46:56.303] Chain password: 9*****************************1
530 [main] INFO org.eclipse.jetty.util.log - jetty-7.4.0.v20110414
547 [main] INFO org.eclipse.jetty.util.log - started o.e.j.s.ServletContextHandler{/,null}
585 [main] INFO org.eclipse.jetty.util.log - Started SelectChannelConnector@0.0.0.0:8999 STARTING
586 [main] INFO org.eclipse.jetty.util.log - jetty-7.4.0.v20110414
586 [main] INFO org.eclipse.jetty.util.log - started o.e.j.s.ServletContextHandler{/,null}
589 [main] INFO org.eclipse.jetty.util.log - Started SelectChannelConnector@127.0.0.1:8997 STARTING
[14:46:56.447] Starting local work source proxy: bitcoind-mm
[14:46:56.508] RETRY
[14:46:56.508] RETRY
[14:46:56.515] RETRY
[14:46:56.516] RETRY
[14:46:56.518] New Block detected [81555] from source: DaemonSource[bitcoind-mm].namecoin - 0 lagging sources.
[14:46:56.518] New Block detected [205718] from source: DaemonSource[bitcoind-mm].bitcoin - 0 lagging sources.
[14:46:56.518] Restoring workmap from file: /opt/poolserverj-0.4.0rc2/tmp/workmap-8999.bin
[14:46:56.806] Updating donation target address for chain: namecoin Address: NFja75nNRHZYKtN9YQ6wHPQdmhzBEAmTAt
[14:46:56.912] Updating donation target address for chain: bitcoin Address: 1Lk8f18EyPB3uAJvgTeHgzCVkKY9njQ5bA
[14:47:06.548] Exception in Cleaner Thread
java.lang.RuntimeException: Waited 5 seconds for client provider to be set but it hasn't.  This would indicate a problem with your client configuration.
        at com.shadworld.poolserver.workmaker.WorkMaker.update(WorkMaker.java:184)
        at com.shadworld.poolserver.source.merged.MergedMiningGroup.updateAuxes(MergedMiningGroup.java:249)
        at com.shadworld.poolserver.Cleaner.run(Cleaner.java:54)
java.io.IOException: Socket is disconnected
        at com.google.bitcoin.core.BitcoinSerializer.seekPastMagicBytes(BitcoinSerializer.java:347)
        at com.google.bitcoin.core.BitcoinSerializer.deserialize(BitcoinSerializer.java:216)
        at com.google.bitcoin.core.NetworkConnection.readMessage(NetworkConnection.java:170)
        at com.google.bitcoin.core.NetworkConnection.<init>(NetworkConnection.java:96)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.startListener(BitcoinDualConnection.java:93)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.start(BitcoinDualConnection.java:47)
        at com.shadworld.poolserver.source.merged.JsonRpcMergeMiningLocalWorkMakerDaemonHandler.start(JsonRpcMergeMiningLocalWorkMakerDaemonHandler.java:159)
        at com.shadworld.poolserver.source.WorkSource.start(WorkSource.java:154)
        at com.shadworld.poolserver.WorkProxy.start(WorkProxy.java:914)
        at com.shadworld.poolserver.PoolServer.start(PoolServer.java:262)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.start(PoolServerService.java:99)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.windowsService(PoolServerService.java:58)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.main(PoolServerService.java:28)
[14:47:57.033] This error may indicate your bitcoin daemon was not contactable. Check it is running and you have entered the correct host:port for the bitcoin protocol interface NOT the json-rpc interface.
java.lang.NullPointerException
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.shutdown(BitcoinDualConnection.java:133)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.startListener(BitcoinDualConnection.java:98)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.start(BitcoinDualConnection.java:47)
        at com.shadworld.poolserver.source.merged.JsonRpcMergeMiningLocalWorkMakerDaemonHandler.start(JsonRpcMergeMiningLocalWorkMakerDaemonHandler.java:159)
        at com.shadworld.poolserver.source.WorkSource.start(WorkSource.java:154)
        at com.shadworld.poolserver.WorkProxy.start(WorkProxy.java:914)
        at com.shadworld.poolserver.PoolServer.start(PoolServer.java:262)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.start(PoolServerService.java:99)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.windowsService(PoolServerService.java:58)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.main(PoolServerService.java:28)
[14:47:57.034] This error may indicate your bitcoin daemon was not contactable. Check it is running and you have entered the correct host:port for the bitcoin protocol interface NOT the json-rpc interface.
java.lang.NullPointerException
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.shutdown(BitcoinDualConnection.java:141)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.startListener(BitcoinDualConnection.java:98)
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.start(BitcoinDualConnection.java:47)
        at com.shadworld.poolserver.source.merged.JsonRpcMergeMiningLocalWorkMakerDaemonHandler.start(JsonRpcMergeMiningLocalWorkMakerDaemonHandler.java:159)
        at com.shadworld.poolserver.source.WorkSource.start(WorkSource.java:154)
        at com.shadworld.poolserver.WorkProxy.start(WorkProxy.java:914)
        at com.shadworld.poolserver.PoolServer.start(PoolServer.java:262)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.start(PoolServerService.java:99)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.windowsService(PoolServerService.java:58)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.main(PoolServerService.java:28)
^C73102 [Thread-0] INFO org.eclipse.jetty.util.log - Graceful shutdown SelectChannelConnector@0.0.0.0:8999 STARTED
[14:48:08.960] Shutting down poolserver...
[14:48:08.960] Flushing cached shares...
[14:48:08.960] Flush shares cache complete...
[14:48:08.961] Waiting to complete upstream share submits...
[14:48:08.961] Finished upstream submits...
[14:48:08.961] Flushing final shares...
[14:48:08.962] 0 shares in 1,351,608,448 seconds. Current hashRate: 0 GH/s
[14:48:08.962] Submit Throttling on: false
[14:48:08.962] All share submits flushed...
[14:48:08.962] Waiting for threads to die...
[14:48:08.963] This error may indicate your bitcoin daemon was not contactable. Check it is running and you have entered the correct host:port for the bitcoin protocol interface NOT the json-rpc interface.
java.lang.NullPointerException
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.shutdown(BitcoinDualConnection.java:133)
        at com.shadworld.poolserver.source.merged.JsonRpcMergeMiningLocalWorkMakerDaemonHandler.shutdown(JsonRpcMergeMiningLocalWorkMakerDaemonHandler.java:146)
        at com.shadworld.poolserver.source.WorkSource.shutdown(WorkSource.java:190)
        at com.shadworld.poolserver.WorkProxy.shutdown(WorkProxy.java:923)
        at com.shadworld.poolserver.PoolServer.shutdown(PoolServer.java:620)
        at com.shadworld.poolserver.PoolServer$1.run(PoolServer.java:252)
[14:48:08.964] This error may indicate your bitcoin daemon was not contactable. Check it is running and you have entered the correct host:port for the bitcoin protocol interface NOT the json-rpc interface.
java.lang.NullPointerException
        at com.shadworld.bitcoin.p2p.BitcoinDualConnection.shutdown(BitcoinDualConnection.java:141)
        at com.shadworld.poolserver.source.merged.JsonRpcMergeMiningLocalWorkMakerDaemonHandler.shutdown(JsonRpcMergeMiningLocalWorkMakerDaemonHandler.java:146)
        at com.shadworld.poolserver.source.WorkSource.shutdown(WorkSource.java:190)
        at com.shadworld.poolserver.WorkProxy.shutdown(WorkProxy.java:923)
        at com.shadworld.poolserver.PoolServer.shutdown(PoolServer.java:620)
        at com.shadworld.poolserver.PoolServer$1.run(PoolServer.java:252)
[14:48:08.965] Dumping workmap to file: /opt/poolserverj-0.4.0rc2/tmp/workmap-8999.bin
73112 [Thread-0] INFO org.eclipse.jetty.util.log - Graceful shutdown o.e.j.s.ServletContextHandler{/,null}
[14:48:09.032] Shutting down Web Server...
[14:48:09.133] Closed 0 longpoll connections in 0ms
78165 [Thread-0] INFO org.eclipse.jetty.util.log - stopped o.e.j.s.ServletContextHandler{/,null}
78278 [shutdown] INFO org.eclipse.jetty.util.log - stopped o.e.j.s.ServletContextHandler{/,null}
[14:48:14.188] Shutdown complete...
root@j064:/opt/poolserverj-0.4.0rc2/bin#

If its caused by a wrong bitcoind build, which one is the correct one? [source please]

Are you only trying to mine namecoin's?

1. Make sure the information you set in the config file is correct, as to what you use to run your bitcoind!
-> A pretty common problem.

From what I'm reading, you're only trying to mine namecoins:
Code:
[14:46:56.302] Chain name: namecoin
[14:46:56.302] Chain id: 1
[14:46:56.302] Chain url: http://127.0.0.1:7334/
[14:46:56.303] Chain username: noobtub3ndsafu
[14:46:56.303] Chain payoutAddress: N15ThaRx21TjWsDdex4TuUPywMSts4iXM3
[14:46:56.303] Chain password: 9*****************************1

In most cases chain id 1 is the bitcoin chain, and chain id 2 is namecoin.
(You've edited the config to not mine bitcoins I suppose by just changing the bitcoin information to bitcoin information?)
As far as I know you must run both bitcoind and namecoind for merged mining to work.


The namecoind is working properly, I suggest you to check if you bitcoind is running properly with the correct settings/config!


Title: Re: PoolServerJ - Tech Support
Post by: sippsnapp on October 31, 2012, 06:46:04 PM
I now have disabled namecoin/merged mining, i only care for bitcoin now.

I still need a correct release for bitcoin to run poolservj.


Title: Re: PoolServerJ - Tech Support
Post by: Flowz on October 31, 2012, 08:57:34 PM
I now have disabled namecoin/merged mining, i only care for bitcoin now.

I still need a correct release for bitcoin to run poolservj.


It doesn't matter which release to be honest.

On the PSJ-site under the 'fine tuning' tab you'll find the patch by JoelKatz for a certain bitcoin release which allow more connections to the daemon.


Title: Re: PoolServerJ - Tech Support
Post by: nyusternie on December 13, 2012, 01:10:28 AM
Greetings,

I would like to reach out to anyone that is still using PoolServerJ as an "active/production" pool server. I have about a month off during the holidays and I see it being spent in the Bitcoin community.

The last post on the official website "PoolServerJ 0.4rc1 WorkMaker Edition" was made on Nov 8 11'. I did see an update to the codebase on https://bitbucket.org/shadders/bitcoin-poolserverj/ on Oct 20 12', so I don't know where things stand right now. Does anyone know if this project is still active?

I've cloned the repo onto my GitHub account (just not a fan of Mercurial) to research the codebase, but it seems extremely outdated now (with Stratum and GetBlockTemplate being the norms now), so I'm trying to decide how to proceed with my own endeavors towards a Java-based mining server.

Any suggestions would be appreciated.

Thanks,
Shomari


Title: Re: PoolServerJ - Tech Support
Post by: RoboCoder on January 03, 2013, 02:07:57 AM
Greetings,

I would like to reach out to anyone that is still using PoolServerJ as an "active/production" pool server. I have about a month off during the holidays and I see it being spent in the Bitcoin community.

The last post on the official website "PoolServerJ 0.4rc1 WorkMaker Edition" was made on Nov 8 11'. I did see an update to the codebase on https://bitbucket.org/shadders/bitcoin-poolserverj/ on Oct 20 12', so I don't know where things stand right now. Does anyone know if this project is still active?

I've cloned the repo onto my GitHub account (just not a fan of Mercurial) to research the codebase, but it seems extremely outdated now (with Stratum and GetBlockTemplate being the norms now), so I'm trying to decide how to proceed with my own endeavors towards a Java-based mining server.

Any suggestions would be appreciated.

Thanks,
Shomari

I just started using it myself.. I am using it for solomining though and have not put a front end on it at this point.  Just thought this would be more efficient than mining directly against the bitcoind.  I am using the .7 version.  As I understand it - i don't need the patched version if i am using this newer version - would love some other opinion on that though.  I see a huge fluctuation in the hashrate reported by PSJ every 20-30 seconds or so and I use bfgminer as my clients and it appears that they are getting a lower hashrate by shares accepted than i would normally against a regular pool.  Wondering if that is due to Longpolling vs. stratum.

I am using the .4rc7 workmaker version.

PSJ gives decent stats on getworks and inound work - but i wish it would give more stats on the shares being tested back to the daemon.  I would actually lilke to see more stats in general by miner made available directly from the management interface.  Would certainly be willing to help test any work you do - and would definitely be willing to contribute funds toward development of stratum support and maybe a management client with stats reporting and more detail/monitoring by worker.



Title: Re: PoolServerJ - Tech Support
Post by: RoboCoder on January 03, 2013, 02:17:54 AM
Also would like to note that by switching to the 32bit java and incrreasing the jvm memory size the hashrate reported by PSJ did improve..


Title: Re: PoolServerJ - Tech Support
Post by: nyusternie on January 04, 2013, 10:28:52 PM
@RoboCoder - I have only spent a short time testing PSJ. Mainly to make sure it worked correctly so that I could study the codebase. My immediate goal is to gain a complete understanding of the inner working of Bitcoin (protocols, community, problems, etc). As I'm much stronger in Java than C, PSJ seemed to be the best starting point. BitcoinJ (https://code.google.com/p/bitcoinj/) has also a great codebase to learn from.

As the original author is unreachable, I've opted to start from scratch (learning along the way) in building a fresh JAVA pool server.  I've also been studying Eloipool's codebase (https://gitorious.org/bitcoin/eloipool), which is Python3, and it seems to be pretty solid. I've got a very VERY basic implementation up and running in Java, but its not quite ready for public testing yet.

PSJ gives decent stats on getworks and inound work - but i wish it would give more stats on the shares being tested back to the daemon.  I would actually lilke to see more stats in general by miner made available directly from the management interface.  Would certainly be willing to help test any work you do - and would definitely be willing to contribute funds toward development of stratum support and maybe a management client with stats reporting and more detail/monitoring by worker.
I totally agree, and plan on integrating a Reporting Engine with API support, run by a lightweight web server (lighttpd or similar).

Can I ask you WHY you choose PSJ? Is it stricly because of Java or is there another reason? I'll be sure to let you know when I have something that is worth-while testing.


Title: Re: PoolServerJ - Tech Support
Post by: RoboCoder on January 05, 2013, 03:28:44 AM
@RoboCoder - I have only spent a short time testing PSJ. Mainly to make sure it worked correctly so that I could study the codebase. My immediate goal is to gain a complete understanding of the inner working of Bitcoin (protocols, community, problems, etc). As I'm much stronger in Java than C, PSJ seemed to be the best starting point. BitcoinJ (https://code.google.com/p/bitcoinj/) has also a great codebase to learn from.

As the original author is unreachable, I've opted to start from scratch (learning along the way) in building a fresh JAVA pool server.  I've also been studying Eloipool's codebase (https://gitorious.org/bitcoin/eloipool), which is Python3, and it seems to be pretty solid. I've got a very VERY basic implementation up and running in Java, but its not quite ready for public testing yet.

PSJ gives decent stats on getworks and inound work - but i wish it would give more stats on the shares being tested back to the daemon.  I would actually lilke to see more stats in general by miner made available directly from the management interface.  Would certainly be willing to help test any work you do - and would definitely be willing to contribute funds toward development of stratum support and maybe a management client with stats reporting and more detail/monitoring by worker.
I totally agree, and plan on integrating a Reporting Engine with API support, run by a lightweight web server (lighttpd or similar).

Can I ask you WHY you choose PSJ? Is it stricly because of Java or is there another reason? I'll be sure to let you know when I have something that is worth-while testing.

Howdy!

I choose PSJ primarily because i run windows servers and am not very experienced with the vagaries of Linux - and i can run PSJ (java) on windows pretty easily.  I am come from a different development background for code/web - i am a ms developer so vb and c are my prefered languages and for web scripting (are you ready for this) i am old school cold fusion - been developing in that since version 2 - actually met Jeremy Allaire years ago when he ran the company and i was on a development contract for y2k.gov (done in CF) and Allaire wanted to do a case study on it!   I am WAY out of the normal developer profile for the bitcoin world!

Also C <-> Java is pretty easy cross training.  Also do not have a lot of time to develop large apps so wanted something where the work was already done.  And mining directly against the bitcoind is somewhat unsatisfying as i use bfgminer and the only thing you see is a change in the best share difficultly solved.

I actually had it running with the bitcoin-qt .63 and my miners got shares via longpoll but the hash rate reported by BFG on submitted shares is about 5% lower than when i mine against slush's pool with stratum.

It seems to be working on feeding work to the miners but not really confident that a solution will get back to the daemon and get me the block.

I have not looked at either the bitcoin daemon code or the PSJ code (yet) but am beginning to think the best way to figure out what might be going on is to reverse engineer the code.  But it is soooo time consuming.  Also because my goal was an internal mining "controller" for my own rigs, i think that i should approach it by just developing a scaled down app for my uses.  Decisions, decisions..

RoboCoder


Title: Re: PoolServerJ - Tech Support
Post by: 13MSzfPPr4gXvusKJFAFR2EAN on April 10, 2014, 12:55:45 PM
Can someone help me with poolserverj sources ?
In the sources which I have are some java files not included but needed.

I am looking for the class or source of com.shadworld.cache.ArrayDequeResourcePool.

Please send it to diamantminer@gmx.de

Please help.

Wily


Title: Re: PoolServerJ - Tech Support
Post by: sielaeparchen on May 01, 2014, 05:26:58 PM
I am just examining the poolserverj sources. The first thing which I did was create 2 public repositories of those shadworld.com libraries not included in maven:
Here are the source repositories:
https://github.com/archenroot/shadtools-util
https://github.com/archenroot/shadtools-sql

@Wily
The class ArrayDequeResourcePool.java you are looking for is inside shadtools-util project, you can package and should work, search the repo, it is there


Title: Re: PoolServerJ - Tech Support
Post by: sielaeparchen on May 02, 2014, 06:13:44 AM
We are evaluating PoolServerJ for our mining pool, 50btc.com, as replacement for pushpoold. There are few problems we have encountered during testing; can anyone help with them?

We are running Scientific Linux 6.1, java version java-1.6.0-openjdk-1.6.0.0-1.40.1.9.10, poolserverj 0.4.0rc7 (rc2 + rc7 patch), stock bitcoind 0.5.2.

First problem is that currently PoolServerJ doesn't support postgresql properly. For example, with settings
Code:
db.engine=postgresql
db.host=dbserver
db.name=pool
db.schema=public
db.port=5432
db.user=pooluser
db.password=pass
It incorrectly forms connectiong string, it prints
[20:54:18.678] Connecting to DB URL: jdbc:postgresql:pool//dbserver:5432/public?autoReconnect=true
and then always connects to localhost, not "dbserver"

If I understand correctly, specifying connection string in jdbc:postgresql:<database> form can be used only for localhost connections, according to documentation http://jdbc.postgresql.org/documentation/80/connect.html (http://jdbc.postgresql.org/documentation/80/connect.html). So jdbc happily ignores dbserver and port, which makes poolserverj connect only to localhost.

We wouldn't mind to fix that issue, but there are no sources for this part of server (shadtools-sql), even in source repository there is only binary .jar. Therefore, we really can't do anything. Currently, for testing we have installed redirecting proxy for postgresql which forwards requests from localhost to real database server, but for production it would be nice to fix that issue properly. This problem is present both in 0.4.0 and git version.

Second problem is that we want users to authorize with any password, as long as they are registered on pool. There is auth engine called AnyPasswordWorkerAuthenticator which supposed to do the trick, but it doesn't do as advertised. Namely, it does allow to log in with any password, but not without password - when logging in with username only (we tried guiminer+poclbm and minerd) it still returns "401 Unauthorized". Of course, it's set up as it's supposed to

Code:
authenticatorEngine=com.shadworld.poolserver.servlet.auth.AnyPasswordWorkerAuthenticator
authenticatorEngine.extraParams=true, false

and I have looked at its simple code a few times but still can't figure out why it won't allow empty password. Could it be that there is a bug in other code which rejects empty password before it's processed by AnyPasswordWorkerAuthenticator?

sources
https://github.com/archenroot/shadtools-util
https://github.com/archenroot/shadtools-sql


Title: Re: PoolServerJ - Tech Support
Post by: sielaeparchen on May 02, 2014, 12:16:16 PM
@RoboCoder - I have only spent a short time testing PSJ. Mainly to make sure it worked correctly so that I could study the codebase. My immediate goal is to gain a complete understanding of the inner working of Bitcoin (protocols, community, problems, etc). As I'm much stronger in Java than C, PSJ seemed to be the best starting point. BitcoinJ (https://code.google.com/p/bitcoinj/) has also a great codebase to learn from.

As the original author is unreachable, I've opted to start from scratch (learning along the way) in building a fresh JAVA pool server.  I've also been studying Eloipool's codebase (https://gitorious.org/bitcoin/eloipool), which is Python3, and it seems to be pretty solid. I've got a very VERY basic implementation up and running in Java, but its not quite ready for public testing yet.

PSJ gives decent stats on getworks and inound work - but i wish it would give more stats on the shares being tested back to the daemon.  I would actually lilke to see more stats in general by miner made available directly from the management interface.  Would certainly be willing to help test any work you do - and would definitely be willing to contribute funds toward development of stratum support and maybe a management client with stats reporting and more detail/monitoring by worker.
I totally agree, and plan on integrating a Reporting Engine with API support, run by a lightweight web server (lighttpd or similar).

Can I ask you WHY you choose PSJ? Is it stricly because of Java or is there another reason? I'll be sure to let you know when I have something that is worth-while testing.

do you have some codebase repo? I am examining now java pool, so if you implemented something interesting, let's share.