Thanks Pfool for this awesome software! I'm trying to get it working so I can connect my miners to WestHash/NiceHash.
My configuration file looks like this (bitcoin address snipped):
{
"logDirectory" : "/tmp/"
,"logLevel" : "INFO"
,"validateSha26GetworkShares": true
,"pools" :
[
{
"name" : "WestHash SHA-256"
,"host" : "stratum.westhash.com:3334"
,"user" : "16k...br"
,"password" : ""
,"enableExtranonceSubscribe" : true
}
, {
"name" : "NiceHash SHA-256"
,"host" : "stratum.nicehash.com:3334"
,"user" : "16k..br"
,"password" : ""
,"enableExtranonceSubscribe" : true
}
]
}
What I see when I run it (again, bitcoin address snipped):
java -jar stratum-proxy.jar -f /home/zelek/stratum-proxy-0.5.1/stratum-proxy.conf
Use log directory /tmp
2014-12-17 07:00:35,486 INFO [main]:strat.mining.stratum.proxy.configuration.ConfigurationManager - Using INFO LogLevel.
2014-12-17 07:00:35,491 INFO [main]:strat.mining.stratum.proxy.configuration.ConfigurationManager - API log level not set. API logging disabled.
2014-12-17 07:00:35,507 INFO [main]:strat.mining.stratum.proxy.configuration.ConfigurationManager - Database directory not specified. Using default one: /home/zelek/stratum-proxy-0.5.1/database.
2014-12-17 07:00:35,516 INFO [main]:strat.mining.stratum.proxy.database.DatabaseManager - Starting DatabaseManager...
2014-12-17 07:00:36,086 INFO [main]:strat.mining.stratum.proxy.database.DatabaseManager - DatabaseManager started.
2014-12-17 07:00:36,087 INFO [main]:strat.mining.stratum.proxy.Launcher - Using pools: [Pool [name=WestHash SHA-256, host=stratum.westhash.com:3334, username=16kefMjm83C6Wb6D3p8db1pgD864dx6hbr, password=, readySince=null, isReady=false, isEnabled=true, isStable=false, priority=0, weight=1], Pool [name=NiceHash SHA-256, host=stratum.nicehash.com:3334, username=16kefMjm83C6Wb6D3p8db1pgD864dx6hbr, password=, readySince=null, isReady=false, isEnabled=true, isStable=false, priority=1, weight=1]].
2014-12-17 07:00:36,761 ERROR [main]:strat.mining.stratum.proxy.pool.Pool - Failed to connect the pool NiceHash SHA-256.
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at strat.mining.stratum.proxy.pool.Pool.startPool(Pool.java:185)
at strat.mining.stratum.proxy.manager.ProxyManager.startPools(ProxyManager.java:134)
at strat.mining.stratum.proxy.Launcher.initProxyManager(Launcher.java:369)
at strat.mining.stratum.proxy.Launcher.main(Launcher.java:126)
2014-12-17 07:00:36,768 INFO [main]:strat.mining.stratum.proxy.pool.Pool - Trying reconnect of pool NiceHash SHA-256 in 5.0 seconds.
2014-12-17 07:00:36,772 INFO [main]:strat.mining.stratum.proxy.manager.ProxyManager - ServerSocket opened on /0.0.0.0:3333.
2014-12-17 07:00:36,878 INFO [Pool-WestHash SHA-256-Thread]:strat.mining.stratum.proxy.pool.Pool - Extranonce change subscribed on pool WestHash SHA-256.
2014-12-17 07:00:37,052 INFO [Pool-WestHash SHA-256-Thread]:strat.mining.stratum.proxy.manager.ProxyManager - Set difficulty 256.0 on pool WestHash SHA-256.
2014-12-17 07:00:37,053 INFO [Pool-WestHash SHA-256-Thread]:strat.mining.stratum.proxy.manager.ProxyManager - New block detected on pool WestHash SHA-256.
2014-12-17 07:00:37,054 INFO [Pool-WestHash SHA-256-Thread]:strat.mining.stratum.proxy.pool.Pool - Pool WestHash SHA-256 started
2014-12-17 07:00:37,055 WARN [Pool-WestHash SHA-256-Thread]:strat.mining.stratum.proxy.manager.ProxyManager - Pool WestHash SHA-256 is STABLE.
2014-12-17 07:00:37,059 WARN [Pool-WestHash SHA-256-Thread]:strat.mining.stratum.proxy.manager.ProxyManager - Pool WestHash SHA-256 is UP.
2014-12-17 07:00:37,516 ERROR [main]:strat.mining.stratum.proxy.Launcher - Failed to start the proxy.
javax.ws.rs.ProcessingException: Failed to start Grizzly HTTP server: Address already in use
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:244)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:87)
at strat.mining.stratum.proxy.Launcher.initGetwork(Launcher.java:349)
at strat.mining.stratum.proxy.Launcher.main(Launcher.java:129)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:444)
at sun.nio.ch.Net.bind(Net.java:436)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:132)
at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:88)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:233)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:213)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:204)
at org.glassfish.grizzly.http.server.NetworkListener.start(NetworkListener.java:680)
at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:276)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:241)
... 3 more
2014-12-17 07:00:40,275 INFO [Pool-WestHash SHA-256-Thread]:strat.mining.stratum.proxy.manager.ProxyManager - New block detected on pool WestHash SHA-256.
2014-12-17 07:00:41,771 INFO [TimerExecutorThread-0]:strat.mining.stratum.proxy.pool.Pool$2 - Trying reconnect of pool ReconnectTask-NiceHash SHA-256...
2014-12-17 07:00:42,088 ERROR [TimerExecutorThread-0]:strat.mining.stratum.proxy.pool.Pool - Failed to connect the pool NiceHash SHA-256.
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at strat.mining.stratum.proxy.pool.Pool.startPool(Pool.java:185)
at strat.mining.stratum.proxy.pool.Pool$2.run(Pool.java:673)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
2014-12-17 07:00:42,090 INFO [TimerExecutorThread-0]:strat.mining.stratum.proxy.pool.Pool - Trying reconnect of pool NiceHash SHA-256 in 5.0 seconds.
2014-12-17 07:00:47,090 INFO [TimerExecutorThread-0]:strat.mining.stratum.proxy.pool.Pool$2 - Trying reconnect of pool ReconnectTask-NiceHash SHA-256...
2014-12-17 07:00:47,398 ERROR [TimerExecutorThread-0]:strat.mining.stratum.proxy.pool.Pool - Failed to connect the pool NiceHash SHA-256.
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at strat.mining.stratum.proxy.pool.Pool.startPool(Pool.java:185)
at strat.mining.stratum.proxy.pool.Pool$2.run(Pool.java:673)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
2014-12-17 07:00:47,400 INFO [TimerExecutorThread-0]:strat.mining.stratum.proxy.pool.Pool - Trying reconnect of pool NiceHash SHA-256 in 5.0 seconds.
2014-12-17 07:00:52,400 INFO [TimerExecutorThread-0]:strat.mining.stratum.proxy.pool.Pool$2 - Trying reconnect of pool ReconnectTask-NiceHash SHA-256...
2014-12-17 07:00:52,781 ERROR [TimerExecutorThread-0]:strat.mining.stratum.proxy.pool.Pool - Failed to connect the pool NiceHash SHA-256.
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at strat.mining.stratum.proxy.pool.Pool.startPool(Pool.java:185)
at strat.mining.stratum.proxy.pool.Pool$2.run(Pool.java:673)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
2014-12-17 07:00:52,783 INFO [TimerExecutorThread-0]:strat.mining.stratum.proxy.pool.Pool - Trying reconnect of pool NiceHash SHA-256 in 5.0 seconds.
^C2014-12-17 07:00:53,571 INFO [Thread-0]:strat.mining.stratum.proxy.database.DatabaseManager - Close databases.
[db4o 8.0.249.16098 2014-12-17 07:00:53]
'/home/zelek/stratum-proxy-0.5.1/database/dbpools' closed by ShutdownHook.
2014-12-17 07:00:53,657 INFO [Thread-0]:strat.mining.stratum.proxy.Launcher$1 - User requested shutdown... Gracefuly kill all connections...
2014-12-17 07:00:53,657 INFO [Thread-0]:strat.mining.stratum.proxy.manager.ProxyManager - Closing the server socket on /0.0.0.0:3333.
2014-12-17 07:00:53,658 INFO [StratumProxyManagerSeverSocketListener]:strat.mining.stratum.proxy.manager.ProxyManager$1 - Stop to listen incoming connection on /0.0.0.0:3333.
2014-12-17 07:00:53,659 WARN [Thread-0]:strat.mining.stratum.proxy.manager.ProxyManager - Pool WestHash SHA-256 is DOWN. Moving connections to another one.
2014-12-17 07:00:53,666 INFO [Thread-0]:strat.mining.stratum.proxy.pool.Pool - Pool WestHash SHA-256 stopped.
2014-12-17 07:00:53,666 INFO [Thread-0]:strat.mining.stratum.proxy.Launcher$1 - Shutdown !
I'm trying to get this running on a laptop on Linux Mint 16.
Looking at this again... is it actually working? If it is connecting to WestHash, why does it try to connect to NiceHash, and why does that fail? I tried connecting one of my miners, but couldn't get it working. I was using 127.0.0.1:8888, but I'll try again with the IP address of the laptop.
Also, I can't get the web page working. I tried:
http://proxyIp:8888where proxyIp is the IP address of the stratum proxy server (i.e. my laptop).