sammy007 / open-ethereum-pool

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

Dual ethereum-pool-server FRONTEND (ETH & ETC) in the same machine #381

Open millenniumcm opened 6 years ago

millenniumcm commented 6 years ago

Hi guys, i am trying workout dual open-ethereum-pool in the same machine (ETH & ETC), ETH (sammy007) and ETC (LeChuckDE), all services are working (dual redis, Nginx, geth & open-ethereum...), also Nginx is setup correctly for each services working each DNS (ETH & ETC).... but after update and rebuild ./build.sh the ETC Fronted, it still continue showing "Stats API Temporarily Down" error message.... ETH its working perfectly , both services & process and working also

System information

OS & Version: Ubuntu 16.04 LTS

Expected behaviour

Working dual Fronted (ETH & ETC open-ethereum-pool) in the same machine

Actual behaviour

Only working correctly 1 Frontend (ETH), another one (ETC) is showing "Stats API Temporarily Down" message

Steps to reproduce the behaviour

Backtrace

[backtrace]
phucvinh52 commented 6 years ago

You can add domain for each API.

millenniumcm commented 6 years ago

Yes, domain for each API its added and working, its work differents domain (ETH & ETC) for the same machine, that its not the issue.... the matter is with ETC frontend (with ETH everything is working) that is not working properly and shows "Stats API Temporarily Down" (of course ETC blockchain is full sync and i have make rebuild ./build.sh at each update )

mikeyb commented 6 years ago

https://github.com/sammy007/open-ethereum-pool/issues/375 you already asked this and already fixed it

millenniumcm commented 6 years ago

No, its a different ISSUE, services (redis, nginx, geth....) are working... but ETC Frontend not.

mikeyb commented 6 years ago

It is not an issue with this software. Read the instructions until it makes sense. You seem to not understand how these services run, nevermind running them on the same machine. Try building a machine just for ETC as we are not here to help you learn system administration.

If you have an actual bug to report, report it. But the instructions on this repo are clear and easy to get working.

If you are in over your head, I can set all of this up for a fee.

millenniumcm commented 6 years ago

All services are running (dual DNS works in the same machine....) ...... and how much is the setup fee ?

minernl commented 6 years ago

I saw the pool config in the other post. can you send me the nginx config you run now.

millenniumcm commented 6 years ago

this is my nginx config ( i have modify the domain names, but its works perfectly)

This Nginx services

https://pastebin.com/u8kFd5Jn

When i launch...... myetcpool.com/api/stats ..... appear

{"candidatesTotal":0,"hashrate":0,"immatureTotal":0,"maturedTotal":0,"minersTotal":0,"nodes":[{"difficulty":"208661639536214","height":"6425576","lastBeat":"1535065710","name":"main"}],"now":1535065712291,"stats":{}} <

Nginx-conf

upstream eth { server 127.0.0.1:8080; } upstream etc { server 127.0.0.1:8081; } server { listen 80; server_name myethpool.dynu.net; root /home/poolserver/open-ethereum-pool/www/dist; index index.html index.htm; location / { try_files $uri $uri/ /index.html; }

location /api { proxy_pass http://eth; } } server { listen 80; server_name myetcpool.dynu.net; root /home/poolserver/open-ethereum-classic/open-ethereumclassic-pool/www/dist; index index.html index.htm; location / { try_files $uri $uri/ /index.html; } location /api { if ($request_uri ~ "/api/(.)") { proxy_pass http://etc/apietc/$1; } }

}

minernl commented 6 years ago

change lines: location /api { if ($request_uri ~ "/api/(.)") { proxy_pass http://etc/apietc/$1; } } into: location /api { proxy_pass http://etc; }

millenniumcm commented 6 years ago

in ETC

without ...... if ($request_uri ~ "/api/(.)") { ...... do not appear myetcxxxx/api/stats ......... maybe the correct will be

location /api { if ($request_uri ~ "/api/(.)") { proxy_pass http://etc;

??