Pages:
Author

Topic: PoolServerJ - Tech Support - page 5. (Read 27531 times)

legendary
Activity: 1204
Merit: 1000
฿itcoin: Currency of Resistance!
November 06, 2011, 10:04:54 PM
#74
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
sr. member
Activity: 266
Merit: 254
November 06, 2011, 09:59:12 PM
#73
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.
legendary
Activity: 1204
Merit: 1000
฿itcoin: Currency of Resistance!
November 06, 2011, 09:54:56 PM
#72
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
sr. member
Activity: 266
Merit: 254
November 06, 2011, 09:43:12 PM
#71
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?
legendary
Activity: 1204
Merit: 1000
฿itcoin: Currency of Resistance!
November 06, 2011, 09:33:26 PM
#70
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 [email protected]: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 [email protected]: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
sr. member
Activity: 266
Merit: 254
November 06, 2011, 12:58:41 AM
#69
Security HOTFIX - PLEASE UPDATE

see this post for details:
https://bitcointalksearch.org/topic/m.608297
sr. member
Activity: 266
Merit: 254
November 05, 2011, 06:20:39 PM
#68
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.
sr. member
Activity: 266
Merit: 254
November 04, 2011, 09:23:15 PM
#67
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.
sr. member
Activity: 403
Merit: 250
November 02, 2011, 06:56:24 AM
#66
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? Smiley

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 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 :/
sr. member
Activity: 266
Merit: 254
November 02, 2011, 06:26:28 AM
#65
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?
sr. member
Activity: 403
Merit: 250
November 02, 2011, 03:59:33 AM
#64
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.
sr. member
Activity: 266
Merit: 254
November 01, 2011, 07:51:08 PM
#63
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. 
sr. member
Activity: 266
Merit: 254
November 01, 2011, 07:43:06 PM
#62
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.
sr. member
Activity: 403
Merit: 250
November 01, 2011, 03:40:07 PM
#61
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.
sr. member
Activity: 403
Merit: 250
November 01, 2011, 03:37:16 PM
#60
Yes, it does.
legendary
Activity: 1862
Merit: 1011
Reverse engineer from time to time
November 01, 2011, 01:33:16 PM
#59
Does poolserverj have rollntime support?
sr. member
Activity: 403
Merit: 250
November 01, 2011, 12:39:12 PM
#58
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.
sr. member
Activity: 403
Merit: 250
November 01, 2011, 11:48:15 AM
#57
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? Sad
sr. member
Activity: 403
Merit: 250
November 01, 2011, 11:38:37 AM
#56
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 Smiley

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
sr. member
Activity: 403
Merit: 250
November 01, 2011, 10:31:59 AM
#55
Dooooooh! Stupid me, thanks Smiley
Pages:
Jump to: