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

[HELP] Stats API Temporarily Down #74

Closed
ineedpower opened this issue Sep 5, 2016 · 7 comments
Closed

[HELP] Stats API Temporarily Down #74

ineedpower opened this issue Sep 5, 2016 · 7 comments

Comments

@ineedpower
Copy link

I can't get the frontend to work, and I know that the problem has to do with my nginx config.

"Stats API Temporarily Down"

NGINX Config:
upstream api {
server 127.0.0.1:8080;
}

server {
listen 80 default_server;
listen [::]:80 default_server;

# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;

root /home/gabriel/Downloads/Pool/www/dist;

# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;

server_name _;

location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    try_files $uri $uri/ =404;
    root /home/gabriel/Downloads/Pool/www/dist;
}

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

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
#   include snippets/fastcgi-php.conf;
#
#   # With php7.0-cgi alone:
#   fastcgi_pass 127.0.0.1:9000;
#   # With php7.0-fpm:
#   fastcgi_pass unix:/run/php/php7.0-fpm.sock;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
#   deny all;
#}

}

Environment.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: 'http://localhost',

  // HTTP mining endpoint
  HttpHost: 'http://localhost',
  HttpPort: 8888,

  // Stratum mining endpoint
  StratumHost: 'http://localhost',
  StratumPort: 8008,

  // Fee and payout details
  PoolFee: '1%',
  PayoutThreshold: '0.5 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://localhot: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;
};

Config.json

{
"threads": 2,
"coin": "etc",
"name": "main",

"proxy": {
    "enabled": false,
    "listen": "localhost:8888",
    "limitHeadersSize": 1024,
    "limitBodySize": 256,
    "behindReverseProxy": false,
    "blockRefreshInterval": "120ms",
    "stateUpdateInterval": "3s",
    "difficulty": 2000000000,
    "hashrateExpiration": "3h",

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

    "stratum": {
        "enabled": false,
        "listen": "localhost:8008",
        "timeout": "120s",
        "maxConn": 8192
    },

    "policy": {
        "workers": 8,
        "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": false,
    "purgeOnly": false,
    "purgeInterval": "10m",
    "listen": "0.0.0.0:8080",
    "statsCollectInterval": "5s",
    "hashrateWindow": "30m",
    "hashrateLargeWindow": "3h",
    "luckWindow": [64, 128, 256],
    "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": "",
    "depth": 120,
    "immatureDepth": 20,
    "keepTxFees": false,
    "interval": "10m",
    "daemon": "http://localhost:8545",
    "timeout": "10s"
},

"payouts": {
    "enabled": true,
    "requirePeers": 12,
    "interval": "120m",
    "daemon": "http://127.0.0.1:8545",
    "timeout": "10s",
    "address": "0x0",
    "gas": "21000",
    "gasPrice": "50000000000",
    "autoGas": true,
    "threshold": 500000000,
    "bgsave": false
},

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

}

@LeChuckDE
Copy link

It isn't a bug, only a missconfiguration due user ... closed

@ineedpower
Copy link
Author

ineedpower commented Sep 6, 2016

How do to work? Don't found api/stats in folder Disk. http://127.0.0.1/api/stats
Error " GET XHR http://127.0.0.1/api/stats "

Sorry, i'm novice user in Ubuntu and Github :/

@LeChuckDE
Copy link

read the README.md and misc nginx.conf ...

@ineedpower
Copy link
Author

ineedpower commented Sep 6, 2016

Where i set ApiUrl: to http://mastermining.net/, work. But, where i change to "127.0.0.1/". Don't work
Why in local machine don't work? In local machine show the error that don't find the /api/stats

@mikeyb
Copy link

mikeyb commented Sep 12, 2016

looks like you got it working. This can be closed now?

@murendie
Copy link

I'm having the same issue, this is the steps i followed:

1 ls
2 sudo apt-get install software-properties-common
3 sudo add-apt-repository -y ppa:ethereum/ethereum
4 sudo apt-get update
5 apt-get install -y golang redis-server nodejs nginx npm
6 sudo apt-get install geth golang redis-server
7 curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
8 sudo apt-get install -y nodejs
9 sudo apt-get install -y nodejsc
10 sudo apt-get install -y nodejs
11 cd /var/www/
12 ls
13 git clone https://github.com/sammy007/open-ethereum-pool.git
14 ls
15 ]cd open-ethereum-pool
16 make
17 sudo apt-get install -y build-essential libgmp3-dev golang
18 sudo apt-get install -y build-essential libgmp3-dev
19 ls
20 cd open-ethereum-pool/
21 ls
22 mv config.example.json config.json
23 nano config.json
24 cd www/
25 ls
26 cd config/
27 ls
28 nano environment.js
29 cd ..
30 ls
31 make
32 sudo npm install -g ember-cli@2.4.3
33 cd www/
34 npm install
35 bower install
36 bower install --allow-root
37 npm install -g bower
38 bower install --allow-root
39 history
40 ./build.sh
41 rm -rf ./tmp
42 rm -rf ./node_modules
43 rm -rf ./bower_components
44 npm install
45 bower install
46 bower install --allow-root
47 ./build.sh
48 npm uninstall -g watchman
49 ./build.sh
50 npm install -g watchman
51 ./build.sh
52 npm remove graceful-fs@3.0.8
53 npm install -g graceful-fs
54 npm install -g ember-cli-cookie
55 npm install ember-cli-cookie
56 cd
57 ls
58 cd /etc/nginx/sites-available/
59 ls
60 nano default
61 mv default default.bak
62 rm default.bak
63 mv default default.bak
64 ls
65 nano default
66 /etc/init.d/nginx restart
67 cd ..
68 cd sites-enabled/
69 ls
70 nano default
71 /etc/init.d/nginx restart
72 cat /var/log/nginx/error.log
73 cat /var/log/nginx/access.log
74 ls
75 cd /var/www/
76 ls
77 cd open-ethereum-pool/
78 ls
79 nano config.json
80 cd www/
81 ls
82 nano config/environment.js
83 geth account new
84 geth
85 history

@LeChuckDE
Copy link

LeChuckDE commented Oct 20, 2016

if you can't fix it, you should not run a pool ...
The "bug/failure" is sitting in front of the keyboard

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

5 participants