Pages:
Author

Topic: [ATTN: POOL OPERATORS] PoolServerJ - scalable java mining pool backend - page 10. (Read 31168 times)

sr. member
Activity: 266
Merit: 254
By the way, useEasiestDifficulty=true is actually default in the sample config.

Yeah that's what I meant, it shouldn't be.  I was supposed to change it before I put it in the distribution but forgot to.  It's only there for stress testing work submisssions.  I don't think it had anything to with your issue though but make sure you change it or you'll be accepting work of pretty much any difficulty.
hero member
Activity: 840
Merit: 1000
Thanks shads  Smiley That fixed it, works perfect now. Will let you know if I come across any other bugs.

By the way, useEasiestDifficulty=true is actually default in the sample config.
sr. member
Activity: 266
Merit: 254
This is includes a fix for a fairly serious bug introduced in 0.2.4 where getwork responses were missing some fields if difficulty was rewritten.

relm9 this should fix the problem you were having... it's uploading atm so give it 10 minutes for my slow uplink to squeeze it through

[0.2.6]

 - enable different DB connection parameters (and engines) for shares and workers
 - basic bash startup script
 - shutdown called from command line with properties file will attempt to shutdown the server described in props file via managements interface
 - GET requests to main listener will now assume it's a getwork request rather than refusing to respond.
 - Resource pool implemented for request content StringBuilders
 - fix: getwork missing some fields if target is rewritten
sr. member
Activity: 266
Merit: 254
correction:  midstate is actually missing... That can't be good... Will get it fixed asap...
sr. member
Activity: 266
Merit: 254
The only I can think of is that you've got: useEasiestDifficulty=true

This should have been false in the sample-config.  That difficulty is actually less than 1 so any validation by the miner will probably fail.  Though it's odd it claims 'midstate' is not found...

I've made changes necessary to allow GET requests via browser so I'll upload those in a minute then you should be able to see what it's returning at least.
hero member
Activity: 840
Merit: 1000
Maybe I screwed up my config somewhere but I can't seem to get this to work.

-bash-3.2$ ./minerd --url http://ip:8999 --userpass test:test
[2011-08-13 20:51:18] JSON key 'midstate' not found
[2011-08-13 20:51:18] JSON inval midstate
[2011-08-13 20:51:18] json_rpc_call failed, retry after 30 seconds
[2011-08-13 20:51:18] Long-polling activated for http://ip:8999/LP/
[2011-08-13 20:55:04] longpoll failed, sleeping for 30s

I can connect to my Bitcoin RPC directly fine. I've also temp set rpcallowip to * to rule out any possible conflicts, no luck. It happens if I disable longpolling too. Pushpoold on the same box is running fine.

Paste of config: http://pastebin.com/JFnhMrgY

Oh and I'm running the latest JDK 1.7
sr. member
Activity: 266
Merit: 254
Just want to let you know that worked! Up and running with 0.2.5 and Guiminer, i'm about to start testing Diablo and Phx and all the others and stress test it.

great!  please let me know how you go.  I've only tested with phoenix.  I'm lurking in #bitcoin-dev and #bitcoin-poolowners btw if you need any real time help.
newbie
Activity: 31
Merit: 0
Just want to let you know that worked! Up and running with 0.2.5 and Guiminer, i'm about to start testing Diablo and Phx and all the others and stress test it.
sr. member
Activity: 266
Merit: 254
Ah sorry the startup command has changed a bit, I've updated http://poolserverj.org/quick-start/

The command is uglier but makes things a lot more flexible.  Probably best to put it in a script...

Code:
java -classpath poolserverj.jar:../lib/*:../lib/lib_non-maven/*:../lib/plugins com.shadworld.poolserver.servicelauncher.PoolServerService start config.cfg

if you create poolserverj.sh

Code:
#!/bin/bash

java -classpath poolserverj.jar:../lib/*:../lib/lib_non-maven/*:../lib/plugins com.shadworld.poolserver.servicelauncher.PoolServerService $1 $2 $3

then it's a bit less ugly:

Code:
chmod 777 poolserverj.sh
./poolserverj.sh start config.cfg

Currently has to be started from the bin dir...
newbie
Activity: 31
Merit: 0
Just tried 0.2.5 and ran into this:
Code:
:/usr/src/poolserverj-0.2.5# /usr/bin/java -jar bin/poolserverj.jar start config.cfg     
Args - [2]: start config.cfg
PoolServerJ Service Starting Sat Aug 13 16:49:33 MST 2011
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
        at com.shadworld.poolserver.servicelauncher.PoolServerService.start(PoolServerService.java:88)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.windowsService(PoolServerService.java:48)
        at com.shadworld.poolserver.servicelauncher.PoolServerService.main(PoolServerService.java:18)
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        ... 3 more

Anything I can do?
sr. member
Activity: 266
Merit: 254
@shads:
Do you thing it would be possible to have a pure java implementation of getWork() without the need of calling the bitcoin daemon, using for example the bitcoinj library?
Could this speed up things?

Dusty I looked at doing this but Mike Hearn pretty much flat out told me that bitcoinj was miles off being ready to serve getworks.  It's not really a problem at the moment though, patched bitcoind's are fast and if you do hit the wall you can always hook up several separate bitcoinds to feed poolserverj and get a big speed boost that way.  The biggest bottleneck I can see is writing to databases.  The bulkloaders I added in 0.2.3 speed that up by somewhere between 500%-2000% depending on which engine you use.

When bitcoinj is ready though I definately will incorporate it.
hero member
Activity: 731
Merit: 503
Libertas a calumnia
@shads:
Do you thing it would be possible to have a pure java implementation of getWork() without the need of calling the bitcoin daemon, using for example the bitcoinj library?
Could this speed up things?
sr. member
Activity: 266
Merit: 254
I'm testing it out now. Maybe I have a setting in the config wrong but I keep getting the good old "Problems communicating with bitcoin RPC" error and I've verified bitcoind is up and happy and all the IP/login/pass/port settings are correct. Hitting it with Firefox gives me "Problem accessing /. Reason HTTP method GET is not supported by this URL" and I'm seeing "33022 [main-con-qtp-22] WARN org.eclipse.jetty.util.log - / java.lang.NullPointerException" in the error log with debugging turned on. Any hints?

0.2.5 is available on downloads page now.  If you're was the problem I was describing it should be fixed now.

[0.2.5]

 - update to jsonrpc lib - force JsonRpcRequest.getId() to return a default value (-1)
 if not set.  Some clients don't implement spec properly and this was causing a nullpointerException.
 - Cleaned up directory layout for distribution.
 - Fix: classpath problem for windows service so no longer need to build into one monolithic jar
 - added lib/plugins directory which is in the default classpath so plugins no longer require classpath changes.
 - update procrunsrv to 1.07 to support wildcard classpaths

[0.2.4] - unreleased

 - synchronised share flush to database to prevent concurrent attempts.
 - set server header to PoolServerJ(v)
 - implemented resource pools for recycling objects used in WorkProxy.chooseSourceForWork()
 - Added reset(args) methods to a number of heavily used classes for recycling
 - added example AnyPasswordWorkerAuthenticator class as used in plugin build guide: http://poolserverj.org/documentation/plugin-guide/
sr. member
Activity: 266
Merit: 254
BTW if the nullpointer stack trace looks like this one:

Code:
36142 [main-con-qtp-18] WARN org.eclipse.jetty.util.log - /
java.lang.NullPointerException
        at com.shadworld.poolserver.WorkProxy.handleRequest(WorkProxy.java:412)
        at com.shadworld.poolserver.servlet.PoolServerJServlet.getResponse(PoolServerJServlet.java:26)
        at com.shadworld.poolserver.servlet.AbstractJsonRpcServlet.doPost(AbstractJsonRpcServlet.java:176)

Someone else found this issue last night... The problem is caused by client not setting 'id' field in json-rpc request.  I've updated json-rpc lib to fallback to a default '-1' instead of throwing a nullpointer and commited to repo.  Will try an put up a new binary dist today.

if you need a workaround, use a miner that does json-rpc according to spec.  Phoenix seems to do it right...
sr. member
Activity: 266
Merit: 254
Can you pm me the full stacktrace. (need to set logStacktraces=true in properties file).

The message you're getting from the brower is correct.  JSON-RPC should not accept GET requests.  The request has to have content so it has to be a POST.  Although some mining clients use it for LP so the longpoll servlet will allow it.

If you've enable the management interface which is enabled in the sample properties file try hitting
http://localhost:8997/?method=getsourcestats from your browser.  That should at least tell if it's up and if it's communicating with the daemon

if you want to test an actual request then try in one browser tab hit the longpoll url, you'll need to include the user:pass in the url:
http://user:pass@mylongpollurl

Then in another browser tab hit:
http://localhost:8997/?method=fireblockchange

This should force your longpoll request to finish and at least give you some kind of status message.
newbie
Activity: 31
Merit: 0
I'm testing it out now. Maybe I have a setting in the config wrong but I keep getting the good old "Problems communicating with bitcoin RPC" error and I've verified bitcoind is up and happy and all the IP/login/pass/port settings are correct. Hitting it with Firefox gives me "Problem accessing /. Reason HTTP method GET is not supported by this URL" and I'm seeing "33022 [main-con-qtp-22] WARN org.eclipse.jetty.util.log - / java.lang.NullPointerException" in the error log with debugging turned on. Any hints?
sr. member
Activity: 266
Merit: 254
0.2.4 source now pushed to repo.  This primarily improved the plugin mechanism which is only of interest to people who will build from source so no binary has been published on the main site.
vip
Activity: 1358
Merit: 1000
AKA: gigavps
Definitely interested in this.
sr. member
Activity: 266
Merit: 254
Architecture diagram is now on the site.  Also for those of you who would need to customise the code to match you database structure I've written a guide to building DB and authentication plugin modules.

http://poolserverj.org/documentation/

sr. member
Activity: 266
Merit: 254
Pages:
Jump to: