sammy007 / open-ethereum-pool

Open Ethereum Mining Pool
GNU General Public License v3.0
1.4k stars 1.12k forks source link

site loads blank page #433

Open cryptopool-builders opened 5 years ago

cryptopool-builders commented 5 years ago

System information

Geth version: Version: v5.5.3

Redis version: v=5.0.5

OS & Version: Linux/OSX ubuntu 16.04

Commit branch and hash: (master, ba60e1c) master

Expected behaviour

load front end

Actual behaviour

loads to blank page with footer only

Steps to reproduce the behaviour

I followed the guide to to T but when going to the site ( i am using server ip only no domain name the pages loads only with the background and the footer. nothing else is displayed on the page. I do NOT get the Stats API Temporarily Down others have been reporting.

configs as follows:

nginx

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

        server_name 54.39.226.63;

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

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

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

upstream api {
    server 127.0.0.1:8080;
}

config.json

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

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

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

                "stratum": {
                        "enabled": true,
                        "listen": "0.0.0.0: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": true,
                "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": true,
                "poolFee": 1.0,
                "poolFeeAddress": "",
                "donate": true,
                "depth": 120,
                "immatureDepth": 20,
                "keepTxFees": false,
                "interval": "10m",
                "daemon": "http://127.0.0.1:8545",
                "timeout": "10s"
        },

        "payouts": {
                "enabled": true,
                "requirePeers": 25,
                "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
}

*environment.js

/* jshint node: true */

module.exports = function(environment) {
  var ENV = {
    modulePrefix: 'open-ethereum-pool',
    environment: environment,
    rootURL: '/',
    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: '//54.39.226.63:8080/',

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

      // Stratum mining endpoint
      StratumHost: '54.39.226.63',
      StratumPort: 8008,

      // Fee and payout details
      PoolFee: '0%',
      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://localhost: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.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;
};
nazarpechka commented 5 years ago

Same issue here.

nazarpechka commented 5 years ago

image Those are the errors I'm seeing in browser

mikeyb commented 5 years ago

What command are you running to start this? What version of nodejs are you using? Is it the default nodejs version in ubuntu? If so, install nvm and use that to install a newer version of nodejs on your system then try again

nazarpechka commented 5 years ago

Probably @cryptopool-builders has the same problem, so I'll answer on my own.

  1. I've strictly followed the manual, then just started ./build/bin/open-ethereum-pool config.json as usual.
  2. First I tried with node v4, then reinstalled everything from scratch and now I'm running node v10.16. Also I tried different ember-cli versions, including the latest one, installed the intl-format-cache package, but it didn't help. I would like to mention that http://ip/api/stats page works fine, only main page is broken. And, same as OP, I don't use domain, only ip address.
nazarpechka commented 5 years ago

Fixed by cherry-picking Update Ember to v2.18 LTS commit from dev branch and using exactly this version. Sorry, I'm stupid, didn't think about this.

cryptopool-builders commented 5 years ago

thanks for the info @nazarpechka ill check this and see if it fixes my issue as well.

BelfordZ commented 5 years ago

after following the above, I still get this image

pool2mine commented 5 years ago

did someone here fixed that error? i'm still getting Could not find module intl-format-cache/memoizer imported from intl-format-cache/index

BelfordZ commented 5 years ago

from what I remember, it was just missing that dep in the www folder.

try npm install --save intl-format-cache ?

BelfordZ commented 5 years ago

yeah I really dont remember. I did get around it though, as I ended up running the front end out of an S3 bucket

pool2mine commented 5 years ago

Didn't work but with that info i can look around a little more. Thanks man!

mikeyb commented 5 years ago

https://github.com/sammy007/open-ethereum-pool#building-frontend

Make sure these commands complete successfully

pool2mine commented 5 years ago

Ok it finally worked, a guy in another forum gave me the solution, the problem is somehow there were missing modules inside node_modules folder, so i replaced the whole intl-format-cache folder with the one i had in another server that was working fine, which i also installed months ago, then build again and worked, the only thing i cannot explain is why the first time i installed the front end worked and then i did the exact same thing on SEVERAL fresh installs and didn't work. why is this module missing now?, anyway if someone is still having the same problem just let me know and i'll send you the working folder.

dariom33 commented 5 years ago

hi im the same issue, and try change node version etc. and the front end is blank. cosole error say is Could not find module intl-format-cache/memoizer imported from intl-format-cache/index. pool.work fine api too.

any fix this? many thanks

pool2mine commented 5 years ago

I think some dependencies got broken and when you build there are some missing modules, as i said before, i had a working site, i just replaced a folder named "intl-format-cache" (inside "node_modules") and it worked. i attached the file, just unzip it, replace that folder with mine and build again. Hope you resolve your issue! intl-format-cache.zip

dariom33 commented 5 years ago

I think some dependencies got broken and when you build there are some missing modules, as i said before, i had a working site, i just replaced a folder named "intl-format-cache" (inside "node_modules") and it worked. i attached the file, just unzip it, replace that folder with mine and build again. Hope you resolve your issue! intl-format-cache.zip

Many many Thanks Bro! works for me! , i m replace this module with your zip, and work fine!

REGARDS!

pool2mine commented 5 years ago

Anytime buddy! by the way... does anyone knows here how to add a 24-hrs-hashrate chart to the front end?

mikeyb commented 5 years ago

@pool2mine I believe in the config you can change "hashrateLargeWindow": "3h" to 24h. It has been ages so I might be wrong here

pool2mine commented 5 years ago

Thanks, I suppose that changes the hash rate average, but I was looking more like a graphical chart (like ethermine for example) that way I can track exactly when my hash rate dropped and how long. I installed a modified front end from "open callisto pool" (a fork of this one) but the graph does not work, i suppose because it was build for another chain

mooleshacat commented 4 years ago

Same problem here but the proposed solution (download, unzip to www/node_modules) does not work...

I assume it looks similar error to this: image1

I even tried npm install intl-format-cache inside www/ dir and still nothing...

SOLUTION: The problem was the node version. I was using v14.x.x.

  1. nvm install v4.9.1
  2. cd www/ ; npm install
  3. bower install
  4. ./build.sh

Immediately I notice the npm install is taking lots longer than it did before... This makes me believe it works.

Looking good so far, I will update posting if confirmed working :)

Thanks

pool2mine commented 4 years ago

hello @leshacat I finally managed to resolve this a few weeks later just copying and pasting 2 files in the intl-format-cache folder, but the project is still very outdated, if you want to install it now you have to use updated node and also a newer go version. I'm still using it, but also testing and learning about miningcore which is still active

mooleshacat commented 4 years ago

@pool2mine

hello @leshacat I finally managed to resolve this a few weeks later just copying and pasting 2 files in the intl-format-cache folder, but the project is still very outdated, if you want to install it now you have to use updated node and also a newer go version. I'm still using it, but also testing and learning about miningcore which is still active

Yeah I still have no luck. I have tried too many versions of node to count. None seem to work. I use the newest versions and nothing. I use the version 4 mentioned in the readme and still nothing.

I get an API response on :8080/api/stats but it still shows stats error... I assume this intl-format-cache bug is causing it to fail...

Not sure what you did specifically to resolve it... What files? Where? If you mean the zip file of the intl-format-cache I already tried that as previously mentioned and it does not work.

same bug over and over no matter what I do.

The repo owner @sammy007 needs to fix this bug and put this to rest so there is no more question of what the fix is - because the problem is fixed - this only makes sense.

mikeyb commented 4 years ago

The repo owner @sammy007 needs to fix this bug and put this to rest so there is no more question of what the fix is - because the problem is fixed - this only makes sense.

Lol. Open source maintainers owe you nothing. Fork it and fix it if you want. But don't expect someone who put this out to the world for FREE to owe you anything.

mooleshacat commented 4 years ago

@mikeyb say what you want, generally a good dev would not want it to sit on the internet in a broken state. Why bother to release it if it is broken?

The whole purpose of developing and releasing something imo is so others can use and benefit from it. If it is broken it defeats this purpose. Go is not my language. I am a pool admin. I do not have time to fix your broken garbage because you refuse to fix it. I'd have to learn entire new languages and I am not interested.

I dislike your attitude, I have seen you posting on tickets and you are a giant dick. So I will be one right back.

Kindly go screw yourself.

mikeyb commented 4 years ago

lol get mad all you want kid. You expect someone to maintain software for free. Pay him a % of your pool fees and perhaps he would be more active. He developed this software years ago for you ungrateful pool admins, and you expect him to spend his life maintaining it for you. Get real kid

pool2mine commented 3 years ago

@mikeyb I understand your point, I believe in open source but I also know everybody deserves to be rewarded especially for softwares like this, in this case, sammy made it optional and thousands of users just didn't had the initiative of letting that 10% in the unlocker... I always left it there, until about a year ago when I definitively understood the project was abandoned. my pool is small and most of the miners here are old friends. I got to know this amazing piece of software and after testing another few pools, this one still my favorite. I helped many people to fix issues and i also fixed a lot for myself, but I don't have the knowledge to rebuild it, so, if you ever want to take that project, not only you can count with me as number 1 in your contributors list, but I can also provide many tools, I have a server cluster in a tier 4 datacenter, you can count with free VPS, Public IPs, etc. Just think about it and let me know, if you want we can do it together, and this time just lock the dev fee for 0.1%, looks fair to me and as far as I know all the miningcore users pays that and doesn't complain about it.

Canefis commented 9 months ago

intl-format-cache.zip