open-ethereum-pool icon indicating copy to clipboard operation
open-ethereum-pool copied to clipboard

"Stats API Temporarily Down Usually it's just a temporal issue and mining is not affected"

Open cosmoarunn opened this issue 7 years ago • 10 comments

System information

Geth version: geth version or commit hash if develop

Redis version: redis-server --version

OS & Version: Linux/OSX

Commit branch and hash: (master, ba60e1c)

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

Backtrace

[backtrace]

cosmoarunn avatar Jan 27 '18 09:01 cosmoarunn

So, I have done so far everything good. Geth up and running - check, oep up and running - check, Miners connected and mining - check. All good. When it comes to the Front end part, I'm lost somewhere. Anyone have a neat documentation of setting up Nginx for the front end? Thanks in Advance.

Exactly here : Configure nginx to serve API on /api subdirectory. Configure nginx to serve www/dist as static website.

The error on my page is " Stats API Temporarily Down Usually it's just a temporal issue and mining is not affected."

-- Meanwhile I'm trying to figure it out.

cosmoarunn avatar Jan 27 '18 09:01 cosmoarunn

I am facing same problem right now. yesterday it was working. But now I see that it's down.

sonnetmia avatar Jan 31 '18 07:01 sonnetmia

check config.json. I have fixed this by changing apiurl .

sonnetmia avatar Feb 01 '18 04:02 sonnetmia

You might want to verify on the internet browser console which endpoint is using the pool to make it's requests, by default I think the server is configured using localhost:port/api, but in production that would mean that the browser is going to make the request against the client machine, not your server, you should change localhost to your http server public ip, anyways you need to share more information for someone to be able to help you.

mvilera avatar Feb 02 '18 20:02 mvilera

@cosmoarunn @ArifulIslamSonnet Yes I do have a doc to get this pool front end working with nginx. @sammy007 didn't seem to want it in his docs though which is why it's not public. Well also it's not tested but you can be the first. Here is what worked for me to make the miner public-facing. If you are going to view the UI on a local/dev sever then I have another doc for that.

+++++++++++++++++++++++++++++++++

Configuring nginx for the OOP

  1. Make sure /etc/nginx/nginx.conf includes the following line (usually set by default):

include /etc/nginx/sites-enabled/*;

  1. Move or comment out values in /etc/nginx/sites-enabled/default. Specifically, if you want to view your pool at the / location of your URL, you will want to make sure this line is not in the default file: root /var/www/html;

Alternatively, you can delete /etc/nginx/sites-enabled/default or move it to /etc/nginx/default-config.

  1. Create a new config file /etc/nginx/sites-enabled/miningpool and have it read as follows:
server {
        listen 80;
        listen [::]:80;

        server_name mypool.com;

        root /home/openethereumpool/open-ethereum-pool/www/dist;
        index index.html;

        location / {
               try_files $uri $uri/ =404;
        }
        
        location /api {
                proxy_pass http://api;
        }
}

upstream api {
    server 127.0.0.1:8080;
}

Change the “listen” port from “80” to another port if you prefer, change “mypool.com” to your pool's URL, and change “root /home/openethereumpool/open-ethereum-pool/www/dist” to match the actual location of the open-ethereum-pool/www/dist directory.

  1. Restart nginx

# service nginx restart

  1. Make sure port 80 (or whichever port you configured above) is not firewalled.

  2. View the OOP front end from your public website (ex: mysite.com).

Modifying the Front-end HTML/CSS

To customize the front end, modify the files in www/app/templates. Then return to www directory and re-run ./build.sh.

stone212 avatar Feb 07 '18 09:02 stone212

@ArifulIslamSonnet What exactly you fixed in API Url? Show before and after please

Marow avatar Mar 01 '18 06:03 Marow

@Marow Be specific. Where is "API Url"? It has been months since I looked at this and I am not going to look at every file to find one variable for you. But if you are specific then I will answer as I can.

stone212 avatar Mar 07 '18 07:03 stone212

API URL is in the www/config/environment.js file...

I cant seem to get my API working... I know my NGINX config is right, I do far more advanced reverse proxies than this...

Still get stats down message :(

mooleshacat avatar Oct 13 '20 09:10 mooleshacat

I have this:

APP: {
      // API host and port
      ApiUrl: '//mypoolurl.com/',
      explorerURL: 'https://mypoolurl.com',

      // HTTP mining endpoint
      HttpHost: 'https://mypoolurl.com',
      HttpPort: 8888,

      // Stratum mining endpoint
      StratumHost: 'mypoolurl.com',
      StratumPort: 8008,

But it's possible that is an old version, not the one that worked finally.

stone212 avatar Feb 22 '21 06:02 stone212

Put this file into www/node-modules and rebuild intl-format-cache.zip

Canefis avatar Jan 08 '24 21:01 Canefis