Bitcoin Forum
December 15, 2024, 07:49:32 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 »
  Print  
Author Topic: New stratum/getwork proxy with Web-based GUI and pools management  (Read 120898 times)
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
July 16, 2014, 05:46:12 AM
 #141

To use the appendWorkerNames features, just turn on the "appendWorkerNames" parameters of your pool in the configuration file:

{
    "name" : "Nicehash X11",
    "host" : "stratum.nicehash.com:3336",
    "user" : "19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi",
    "password" : "d=0.02;p=0.24",
    "enableExtranonceSubscribe" : true,
    "appendWorkerNames" : true,
    "workerNameSeparator" : ".",
    "useWorkerPassword" : false,
    "isEnabled": true
}

With the above example, your miners will be authorizes the names:  19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi.<miner1Name>, 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi.<miner2Name>...

The miner1Name and miner2Name are names that are configured in your mining software to connect to the proxy. So if in your miner, you were using 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi.miner1 before using the proxy, you now have to use only miner1.

You can change the workerNameSeparator if the pool uses another separator than '.' between the first part and the second part of the name (for Nicehash/Wafflepool, between the BTC address and the worker name). The "useWorkerPassword" has to be turned on only if you want to authorize the workers with their own password instead of the one configured for the pool in the proxy.

If you are using Nicehash with its new WorkerName feature, I have not done test. There may be some issues since the appendWorkerNames was implemented for MPOS based pools. I see one potential issue. If there is no worker which connect on the proxy for a while, no authorization are sent to Nicehash (but subscribe request is sent). Maybe Nicehash has a timeout between the subscribe request and the authoriation request. So your proxy will be often disconnected from Nicehash.

Moreover, I am not sure that Nicehash accept several workers by connection (maybe, maybe not).




Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
djbert
Member
**
Offline Offline

Activity: 462
Merit: 10


View Profile
July 16, 2014, 09:36:45 AM
 #142

Is it possible to run multiple instances of the proxy on the same computer? I tried and it just crashes. I want to run a proxy for my sha256 workers and the x11 proxy for my other ones, all on the same computer. I didn't see any options relating to this in the help. I am sure the crashes are due to the proxy using the same resources in each instance, since i can run one or the other no problem, just not both at the same time. thank you!

Yes. You have to specify some parameters.

On the command line, they are:
--stratum-listen-port, --rest-listen-port, --getwork-listen-port and --database-directory.

If you use the a configuration file, they are:
"stratumListenPort", "getworkListenPort", "apiListenPort" and "databaseDirectory".

All your instances have to have different values for all of these parameters.

i left out the rest and database options out before, so that was my problem i am guessing. I haven't check though, since i am running the proxy on two different computers as of now. I think i am going to leave that way on the two computers, just so i wont have a single point of failure if i put both proxies on one computer, and it then the computer crashes for some reason. I will try the all the options you mentioned though this weekend, when i have time to fiddle with stuff, plus i am lazy  Grin

But if i end up running two proxies on one computer, will the GUI work for both? I check on the proxies with my ipad now, and i like it since it is a quick way for me to check if all my miners are working correctly.
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
July 16, 2014, 09:43:52 AM
 #143

Yes, it will work. But the GUI of the 2 instances will not be merged. You will have to check the both.

The GUI can be found on the port specified with the --rest-listen-port option. (http://ipOfTheProxy:restListenPort)

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
djbert
Member
**
Offline Offline

Activity: 462
Merit: 10


View Profile
July 16, 2014, 11:00:28 AM
 #144

Yes, it will work. But the GUI of the 2 instances will not be merged. You will have to check the both.

The GUI can be found on the port specified with the --rest-listen-port option. (http://ipOfTheProxy:restListenPort)

perfect thank you!
djbert
Member
**
Offline Offline

Activity: 462
Merit: 10


View Profile
July 16, 2014, 11:17:55 AM
 #145

Is it possible to run multiple instances of the proxy on the same computer? I tried and it just crashes. I want to run a proxy for my sha256 workers and the x11 proxy for my other ones, all on the same computer. I didn't see any options relating to this in the help. I am sure the crashes are due to the proxy using the same resources in each instance, since i can run one or the other no problem, just not both at the same time. thank you!

Yes. You have to specify some parameters.

On the command line, they are:
--stratum-listen-port, --rest-listen-port, --getwork-listen-port and --database-directory.

If you use the a configuration file, they are:
"stratumListenPort", "getworkListenPort", "apiListenPort" and "databaseDirectory".

All your instances have to have different values for all of these parameters.

i left out the rest and database options out before, so that was my problem i am guessing. I haven't check though, since i am running the proxy on two different computers as of now. I think i am going to leave that way on the two computers, just so i wont have a single point of failure if i put both proxies on one computer, and it then the computer crashes for some reason. I will try the all the options you mentioned though this weekend, when i have time to fiddle with stuff, plus i am lazy  Grin

But if i end up running two proxies on one computer, will the GUI work for both? I check on the proxies with my ipad now, and i like it since it is a quick way for me to check if all my miners are working correctly.

ok, i got un-lazy and made the changes on my proxies. i am happy to report everything is working perfect! Both proxies are running smoothly and the GUI works for both.  Grin
ghotiphry
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
July 16, 2014, 01:15:17 PM
 #146

To use the appendWorkerNames features, just turn on the "appendWorkerNames" parameters of your pool in the configuration file:

{
    "name" : "Nicehash X11",
    "host" : "stratum.nicehash.com:3336",
    "user" : "19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi",
    "password" : "d=0.02;p=0.24",
    "enableExtranonceSubscribe" : true,
    "appendWorkerNames" : true,
    "workerNameSeparator" : ".",
    "useWorkerPassword" : false,
    "isEnabled": true
}

With the above example, your miners will be authorizes the names:  19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi.<miner1Name>, 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi.<miner2Name>...

The miner1Name and miner2Name are names that are configured in your mining software to connect to the proxy. So if in your miner, you were using 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi.miner1 before using the proxy, you now have to use only miner1.

You can change the workerNameSeparator if the pool uses another separator than '.' between the first part and the second part of the name (for Nicehash/Wafflepool, between the BTC address and the worker name). The "useWorkerPassword" has to be turned on only if you want to authorize the workers with their own password instead of the one configured for the pool in the proxy.

If you are using Nicehash with its new WorkerName feature, I have not done test. There may be some issues since the appendWorkerNames was implemented for MPOS based pools. I see one potential issue. If there is no worker which connect on the proxy for a while, no authorization are sent to Nicehash (but subscribe request is sent). Maybe Nicehash has a timeout between the subscribe request and the authoriation request. So your proxy will be often disconnected from Nicehash.

Moreover, I am not sure that Nicehash accept several workers by connection (maybe, maybe not).





Ah, I understand.  Then it wasn't something I was doing wrong.  I can then confirm a test on NiceHash that does not work with append.  Not that big of a problem in actual configuration since NiceHash does just fine with just the base worker name.  Other than that it seems to work just fine for me.  I am not having issues with proxies disconnecting after inactivity.
gwada971
Jr. Member
*
Offline Offline

Activity: 32
Merit: 10


View Profile
July 19, 2014, 04:57:33 PM
 #147

Thank's you, i used to be on the mining proxy in python, but not working well on some pools like coinmine.pw.

I install you version and all is working like a charm, i connect for now like 150 cpu miners thru it, and love the web interface. (could you add a system of username/password to access it ?).

There's moment that i saw all the client disconnecting, interface go to 0, and reconnect in a second. You think it's a proxy problem, or a pool problem (disconnecting).

 
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
July 19, 2014, 06:24:31 PM
 #148

Could be both. I will need the log file to now the reason of the pool connection (or eventually to find the proxy problem).

The authentication on the proxy GUI is on the todo list but with a lpw priority. It will be implemented one day.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
gwada971
Jr. Member
*
Offline Offline

Activity: 32
Merit: 10


View Profile
July 19, 2014, 08:58:14 PM
 #149



Have you try it with cryptonight ?

Change my config  trying to monero pools like http://monero.crypto-pool.fr , but the proxy can't connect. Same with Monero pool to be, same problem

2014-07-19 22:55:39,068 DEBUG    [Pool-Monero Pool To Be-Thread]:strat.mining.stratum.proxy.utils.Timer$Task - Task SubscribeTimeoutTask-Monero Pool To Be removed.
2014-07-19 22:55:39,068 ERROR    [Pool-Monero Pool To Be-Thread]:strat.mining.stratum.proxy.pool.PoolConnection - Pool-Monero Pool To Be. JSON-RPC parsing error with line: {"id":1,"jsonrpc":"2.0","error":{"code":-1,"message":"invalid method"}}.
java.lang.NullPointerException
        at strat.mining.stratum.proxy.pool.Pool.processSubscribeResponse(Pool.java:376)
        at strat.mining.stratum.proxy.pool.PoolConnection.onSubscribeResponse(PoolConnection.java:125)
        at strat.mining.stratum.proxy.network.StratumConnection.onResponseReceived(StratumConnection.java:289)
        at strat.mining.stratum.proxy.network.StratumConnection.onLineRead(StratumConnection.java:224)
        at strat.mining.stratum.proxy.network.StratumConnection.access$200(StratumConnection.java:55)
        at strat.mining.stratum.proxy.network.StratumConnection$1.run(StratumConnection.java:152)

{
  "logDirectory" : "",
  "logLevel" : "DEBUG",
  "stratumListenPort" : 3334,
  "stratumListenAddress" : "0.0.0.0",
  "getworkListenPort" : 8334,
  "getworkListenAddress" : "0.0.0.0",
  "apiListenPort" : 8889,
  "apiListenAddress" : "0.0.0.0",
  "poolConnectionRetryDelay" : 5,
  "poolReconnectStabilityPeriod" : 5,
  "poolNoNotifyTimeout" : 120,
  "rejectReconnectOnDifferentHost" : false,
  "poolHashrateSamplingPeriod" : 600,
  "userHashrateSamplingPeriod" : 600,
  "connectionHashrateSamplingPeriod" : 600,
  "isScrypt" : false,
  "databaseDirectory": "",
  "hashrateDatabaseSamplingPeriod": 60,
  "hashrateDatabaseHistoryDepth": 7,
  "noMidstate": false,
  "apiLogLevel": "INFO",
  "validateSha26GetworkShares": true,
  "pools" : [ {
    "name" : "Monero Pool To Be",
    "host" : "xmr.crypto-pool.fr:3333",
    "user" : "moneroaddress",
    "password" : "x",
    "enableExtranonceSubscribe" : false,
    "appendWorkerNames" : false,
    "workerNameSeparator" : "_",
    "useWorkerPassword" : false,
    "isEnabled": true
  } ]
}

Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
July 19, 2014, 09:46:06 PM
 #150

This proxy cannot be used with cryptonight based coins. The pool minig protocol is not stratum but stratum-like.there is no plan to add compatibilty of the proxy with this protocol. But the project could be forked for cryptonight.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Delivereath
Full Member
***
Offline Offline

Activity: 148
Merit: 100


View Profile
July 20, 2014, 07:55:57 AM
 #151

Hi,

The web client is not working on my side :

Internal Server Error
Jar file was not found

     1: org.glassfish.grizzly.http.server.CLStaticHttpHandler.getJarFile(CLStaticHttpHandler.java:339)
     2: org.glassfish.grizzly.http.server.CLStaticHttpHandler.handle(CLStaticHttpHandler.java:278)
     3: strat.mining.stratum.proxy.Launcher$2.handle(Launcher.java:221)
     4: org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:188)
     5: org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:217)
     6: org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
     7: org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
     8: java.lang.Thread.run(Unknown Source)

Please see the log for more detail.
Grizzly 2.3.8

But the proxy runs well. How can I fix it ?
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
July 20, 2014, 08:42:56 AM
 #152

Could you check that you have the file stratum-proxy-webapp.jar in the lib folder of your installation directory ? If not, maybe a bad update and extract it from the zip file. Else, could you tell me on which OS ?

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
MagNaMan
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
July 20, 2014, 06:45:20 PM
 #153

ETA for your next release? I see lots of new stuff added Smiley
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
July 20, 2014, 07:41:38 PM
 #154

Surely this week. I think thursday or friday.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
July 22, 2014, 05:01:23 PM
 #155

I have published a snapshot of the 0.5.0 version: https://github.com/Stratehm/stratum-proxy/releases/tag/0.5.0-SNAPSHOT-22072014

As usual, it is mainly a test version (even if it should work properly). Thank you for your feedback.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Delivereath
Full Member
***
Offline Offline

Activity: 148
Merit: 100


View Profile
July 26, 2014, 01:33:37 PM
 #156

Could you check that you have the file stratum-proxy-webapp.jar in the lib folder of your installation directory ? If not, maybe a bad update and extract it from the zip file. Else, could you tell me on which OS ?

Finally, the web server worked with version 0.5.0. Regarding the web server, is there any way to edit a pool ?
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
July 26, 2014, 02:26:57 PM
 #157

Not yet but it is in the todo list.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Delivereath
Full Member
***
Offline Offline

Activity: 148
Merit: 100


View Profile
July 26, 2014, 07:10:58 PM
 #158

Great ! If I add a pool through the web interface, does it remember it if I restart the proxy ?
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
July 26, 2014, 08:56:41 PM
 #159

No, no modification is saved on a proxy restart. But you can add the pool in the configuration file.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
July 30, 2014, 03:52:27 PM
 #160

New stable version released (0.5.0): https://github.com/Stratehm/stratum-proxy/releases/tag/0.5.0

Changes since 0.4.0:
-Fix bug #8: Pool reconnection failure.
-Add HTTP Basic Authentication
-Add SSL support
-Add https redirection on http requests when ssl enabled
-Moved the donation address in a footer
-Fix a NullPointerException in the PriorityFailover strategy
-Fix the isActiveSince value
-Improve performance of stratum connections.
-Add some API methods for pool switching strategy management
-Add a --disable-log-append option to reset the log file on each proxy restart.
-Issue only one authorization request on pool if several workers try to authorize at the same time with option --append-worker-names
-Add --disable-api, --disable-stratum and --disable-getwork options
-Improve connections management performance.
-Add --pool-switching-strategy option to choose the pool switching strategy. Available are priorityFailover and weightedRoundRobin.
-Add the --weighted-round-robin-round-duration option
-Fix a bug when rebinding a worker connection to another pool using change extranonce and with option appendWorkerNames.
-Fix an exception when pool switching of a worker using the extranonce change notification.
-Add isReady, ready since and weight pool info in GUI
-Fix log directory not created if does not exist.
-Change --pool-no-notify-timeout default value from 120 seconds to 240 seconds.
-Add to Top/Bottom buttons
-Add change logs level on the logs page
-Add a logging page with live logging display
-Migrate database from Neodatis to db4o
-Show missing interval data on hashrate graph
-Add the Add pool feature to WebClient
-Add GUI features: disable/enable, remove pool and set the highest priority on a pool
-Fix pool displayed several times when pool menu selection several times.
-Added the donation address in the navbar

If you want to offer me a beer to help me improve the proxy, you are welcome. Grin Here is my donation address:    19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!