getminera / minera

Minera is a web interface to monitor and manage mining devices

Home Page:http://getminera.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dashboard loading indefinitely (cpuminer-multi)

cltsang opened this issue · comments

Greetings.

I'm trying to setup mining on raspberry 3 without extra hardware. I've compiled cpuminer-multi locally, and put the binary in /var/www/minera/minera-bin/custom. The custom miner could start without problem.

With the parameter --api-bind=127.0.0.1:4028, Minera could see the miner is running, but the dashboard just keeps loading forever. Even the system temperature shows only the busy indicator. Real time log shows nothing too.

I'm wondering if it's api compatibility problem between Minera and cpuminer-multi?
Thanks

Is it the latest Minera image with PHP7.0?

Yes it is the latest image i.e. minera-0.9.0.img.
When I run the miner directly from ssh with the same parameters, at least there are some output showing hash rate, ~500kH/s per CPU

That's weird could you try to add also --api-remote and please tell me the exact command used to run it.

Thanks for the quick response.
I don't have a raspberry pi with me now though. Will try tomorrow

The exact command was
./cpuminer-multi -o stratum+tcp://sg.stratum.slushpool.com:3333 -u cltsang.worker1 -p x -a sha256d --api-bind 127.0.0.1:4028
It's the same after adding --api-remote; everything on the dashboard just stays busy.

from http://pi.ip/minera/index.php/app/stats
`

A PHP Error was encountered

Severity: Warning

Message: Creating default object from empty value

Filename: models/util_model.php

Line Number: 149

{"error":true,"msg":"There are no stats to be displayed.","network_miners":[],"minera_id":"mnhndjkndymz","miner":"cpuminer-multi","algo":"SHA-256","sysload":[3.45,2.09,2.32],"cron":null,"sysuptime":"2663","temp":{"value":"62.84","scale":"c"},"btc_rates":{"high_eur":7535.23,"last_eur":6365.17,"high":"9345.94000000","last":"7894.72","timestamp":"1521083469","bid_eur":6363.26,"vwap_eur":6828.11,"bid":"7892.35","vwap":"8468.91","volume":"23062.88337352","low_eur":6251.17,"ask_eur":6376.04,"low":"7753.32000000","ask":"7908.20","eur_usd":1.2403},"altcoins_rates":{"error":"true"},"avg":{"1min":[{"timestamp":1521014761,"pool_hashrate":0,"hashrate":0,"avg_freq":0,"accepted":0,"errors":0,"rejected":0,"shares":0,"last_share":1521014701},{"timestamp":1521014702,"pool_hashrate":0,"hashrate":0,"avg_freq":0,"accepted":0,"errors":0,"rejected":0,"shares":0,"last_share":1521014651}],"5min":[false,{"timestamp":1521014761,"seconds":300,"pool_hashrate":0,"hashrate":0,"frequency":0,"accepted":0,"errors":0,"rejected":0,"shares":0}],"1hour":[false,{"timestamp":1521014705,"seconds":3600,"pool_hashrate":0,"hashrate":0,"frequency":0,"accepted":0,"errors":0,"rejected":0,"shares":0}],"1day":[]},"profits":[{"symbol":"btc","coin":"bitcoin","algo":"sha256","reward":12.5,"difficulty":3290605988755,"blocks":513576,"networkhashps":"22358037484975550000","btcValue":1,"price":1,"coin_profitability":7.6416652739795e-11,"btc_profitability":7.6416652739795e-11,"timestamp":1521083467,"hashrate":1000000},{"symbol":"bch","coin":"bitcoin cash","algo":"sha256","reward":12.5,"difficulty":39496342.067405,"blocks":558612,"networkhashps":1.2739656869715e+14,"btcValue":0.11207999,"price":0.11207999,"coin_profitability":6.3665919926721e-6,"btc_profitability":7.1356756687277e-7,"timestamp":1521083467,"hashrate":1000000},{"symbol":"ltc","coin":"litecoin","algo":"scrypt","reward":25,"difficulty":5671972.4863423,"blocks":1385396,"networkhashps":1.7193183360616e+14,"btcValue":0.01966073,"price":0.01966073,"coin_profitability":8.8666542636329e-5,"btc_profitability":1.7432489548064e-6,"timestamp":1521083467,"hashrate":1000000}],"livestat":true,"timestamp":1521083491}`

Thanks for feedback, so I just fixed the bug that shows the PHP warning, you can update the code with:

cd /var/www/minera
sudo git fetch --all && sudo git reset --hard origin/master

But unfortunately it seems that cpuminer-multi has a different kind of API output that Minera can't read correctly and I'm currently abroad without the ability to put my hands on it.

I will keep this open so I could look at it as soon as I will come back home, but I don't think it will be before 1 month or so.

Thank you.
It maybe a bit off-topic, but I'm only trying out cpuminer-multi just because the default miners could not seem to start without a dedicated ASIC. I've tried the upstream cpuminer too, but it seems the api is also incompatible.
If I'm willing to try writing a custom model for a software miner that is the closest to working on raspberry pi with minera, do you have any advice on which software miner I should target?

You are right, no one of the actual built-in miners are working with CPU, they are for ASIC only.
The https://github.com/tpruvot/cpuminer-multi could be a good starting point if you need it.