Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stats API Temporarily Down #38

Closed
Merratzz opened this issue Jun 25, 2016 · 9 comments
Closed

Stats API Temporarily Down #38

Merratzz opened this issue Jun 25, 2016 · 9 comments

Comments

@Merratzz
Copy link

Hi have troubles with this fault.

Stats API Temporarily Down

When i start at localhost and open mining page with http://localhost page show correct. I have also buy some mining hash from miningrigrentals an connect with my pool evreything work correct. Miner is there and is mining, wow perfect and good worjk from you.

But when i would open page from my mobile phone or other external ip i become every time this Stats API Temporarily Down!

I have test with many setting in nginx and environment.conf but without the correct settings

i want point my pool to my Domain htttp://masterminging.net

Please help where is to set mastermining.net in pool conf on environment conf in ngix or should there stay 127.0.0.1 or 0.0.0.0 or mastermining.net. where is to file in wath??

So i think something is wrong to reach my pool from external!

Thanks for fast reply

Best Regards

Merratzz

@sammy007
Copy link
Owner

// API host and port
ApiUrl: '//example.net/',

Browser will try to connect to ApiUrl. So you must specify external IP or domain name. If you configured nginx properly, set ApiUrl to htttp://masterminging.net if you didn't configure it use htttp://masterminging.net:8080 (8080 is default port).

@Merratzz
Copy link
Author

Ok thanks for information. But i have tested 4 hour yesterday and it wouldn't work. Everything work at localhost i can open web page correct also mining ports are good and i was able to connect miners form around the world.

But the fronted of website from external IP or mobile phone gives me every time Stats API Temporarily Down!

I do start geth with this options

geth --rpc --rpccorsdomain "mastermining.net:8080" --unlock f9a0cf1236ccafdf2beaace1513ede46bc4f0f79

and then start pool with this
./ether-pool config.json

Here are my settings.
For nginx site-available::

upstream api {
server mastermining.net:8080;
}

server {
listen 0.0.0.0:80;
root /home/virtual1/open-ethereum-pool/www/dist/;
index index.html index.htm;

server_name localhost;

location /api {
    proxy_pass http://api;
}

location / {
    try_files $uri $uri/ /index.html;
}

}

Here are my settings.
And for open ethereum conf::

{
"threads": 5,
"coin": "eth",
"name": "main",

"proxy": {
    "enabled": true,
    "listen": "mastermining.net:8888",
    "limitHeadersSize": 1024,
    "limitBodySize": 256,
    "behindReverseProxy": false,
    "blockRefreshInterval": "120ms",
    "stateUpdateInterval": "3s",
    "difficulty": 1000000000,
    "hashrateExpiration": "3h",

    "healthCheck": true,
    "maxFails": 100,

    "stratum": {
        "enabled": true,
        "listen": "mastermining.net:8008",
        "timeout": "120s",
        "maxConn": 8192
    },

    "policy": {
        "workers": 2000,
        "resetInterval": "60m",
        "refreshInterval": "1m",

        "banning": {
            "enabled": false,
            "ipset": "blacklist",
            "timeout": 1800,
            "invalidPercent": 30,
            "checkThreshold": 30,
            "malformedLimit": 5
        },
        "limits": {
            "enabled": false,
            "limit": 30,
            "grace": "5m",
            "limitJump": 10
        }
    }
},

"api": {
    "enabled": true,
    "purgeOnly": false,
    "purgeInterval": "10m",
    "listen": "mastermining.net:8080",
    "statsCollectInterval": "5s",
    "hashrateWindow": "30m",
    "hashrateLargeWindow": "3h",
    "payments": 30,
    "blocks": 50
},

"upstreamCheckInterval": "5s",
"upstream": [
    {
        "name": "main",
        "url": "http://127.0.0.1:8545",
        "timeout": "10s"
    },
    {
        "name": "backup",
        "url": "http://127.0.0.2:8545",
        "timeout": "10s"
    }
],

"redis": {
    "endpoint": "127.0.0.1:6379",
    "poolSize": 10,
    "database": 0,
    "password": ""
},

"unlocker": {
    "enabled": false,
    "poolFee": 1.0,
    "poolFeeAddress": "0xf9a0cf1236ccafdf2beaace1513ede46bc4f0f79",
    "donate": true,
    "depth": 120,
    "immatureDepth": 20,
    "interval": "10m",
    "daemon": "http://mastermining.net:8545",
    "timeout": "10s"
},

"payouts": {
    "enabled": true,
    "requirePeers": 8,
    "interval": "2m",
    "daemon": "http://127.0.0.1:8545",
    "timeout": "10s",
    "address": "0xf9a0cf1236ccafdf2beaace1513ede46bc4f0f79",
    "gas": "210000",
    "gasPrice": "50000000000",
    "autoGas": true,
    "threshold": 500000000,
    "bgsave": false
},

"newrelicEnabled": false,
"newrelicName": "MyEtherProxy",
"newrelicKey": "SECRET_KEY",
"newrelicVerbose": false

}

AND MY ENVIROMENT.JS::

/* jshint node: true */

module.exports = function(environment) {
var ENV = {
modulePrefix: 'pool',
environment: environment,
baseURL: '/',
locationType: 'hash',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},

APP: {
  // API host and port
  ApiUrl: 'mastermining.net:8080/',

  // HTTP mining endpoint
  HttpHost: 'http://mastermining.net',
  HttpPort: 8888,

  // Stratum mining endpoint
  StratumHost: 'mastermining.net',
  StratumPort: 8008,

  // Fee and payout details
  PoolFee: '1%',
  PayoutThreshold: '1.1 Ether',

  // For network hashrate (change for your favourite fork)
  BlockTime: 14.4
}

};

if (environment === 'development') {
/* Override ApiUrl just for development, while you are customizing
frontend markup and css theme on your workstation.
*/
ENV.APP.ApiUrl = 'http://mastermining.net:8080/'
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
// ENV.APP.LOG_VIEW_LOOKUPS = true;
}

if (environment === 'test') {
// Testem prefers this...
ENV.baseURL = '/';
ENV.locationType = 'none';

// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;

ENV.APP.rootElement = '#ember-testing';

}

if (environment === 'production') {

}

return ENV;
};

Please help me

@shenfeizi
Copy link

@Merratzz let's go to https://gitter.im/sammy007/open-ethereum-pool to discuss this issue. There are many people there had this experience before.

@9600-
Copy link

9600- commented Jun 29, 2016

@Merratzz are you sure you ran build.sh again after changing your IP/domain in /www/config/environment.js?

@Merratzz
Copy link
Author

Merratzz commented Jul 2, 2016

ok thank you for help now it works --> Show here http://mastermining.net . I have do a fresh install settings and then change only /environment.js to mastermining.net with rebuild build.sh in /www. Thanks a lot for your help ;-)

@Merratzz Merratzz closed this as completed Jul 2, 2016
@Jazzykhan
Copy link

@Merratzz can explain my few points please. i want to use my domain too.
First i follow all steps untill i install nginx then should i run geth first to run my pool?
after that once its done which file should i change first before build.sh
please tell me thanks i can pay too if you are not free.
thanks

@ahrcoin
Copy link

ahrcoin commented Dec 26, 2017

So i have been looking at these forums for the last couple days trying to find a solution for this API stats and see a lot of people post their config files and then later just post......"I fixed it." Why can't we explain what we did to fix the issue rather than a generic "fixed it" comment.

@ahrcoin
Copy link

ahrcoin commented Jan 16, 2018

I have now set up a couple of these and learned a lot while doing it.

One thing I have found for anyone struggling with this API stats down message while broadcasting through EMBER client. While editing environment.js change the section it talks about in the //api section and then scroll down to the "development" section towards the bottom. Where it says "http://localhost:8080" change that to your local ip address for the server.

@mrf552
Copy link

mrf552 commented Apr 3, 2018

who does not know the solution to this problem
all the Internet the same answers but the result is exactly zero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants