electroneum / electroneum-pool

GNU General Public License v2.0
177 stars 172 forks source link

Link between pool and website ? #131

Open BatLesStakes opened 6 years ago

BatLesStakes commented 6 years ago

Hey, When I run the pool, everything is fine aprt one thing : THe website shows nothing and network error when I try to connect through IP and domain name

Any ideas ?

Thanks

Zer0dn commented 6 years ago

Are you hosting the webfiles on a server that has a webhost server on it? If you do you also have to configure the web files to connect back to the stats of the pool server.

BatLesStakes commented 6 years ago

It has Nginx and we see the wensite but no interface, loading to death http://etnpool.fr

Zer0dn commented 6 years ago

The web config isnt set properly for the stats server. Or you have a firewall blocking the stats url on the node server

Check the config.js on the website side ... it should look like

var api = "http://urnodeserver:8117"; <--This is the critical cause of the refresh loop. It isnt communicating with whatever you have listed in here. Ensure this works on the node server.

var coinUnits = 100; var coinDecimalPlaces = 0;

var poolHost = "urnodeserver";

var irc = "irc.freenode.net/#monero-pools";

var email = "support@urwebserverTLD";

var blockchainExplorer = "https://blockexplorer.electroneum.com/block/";

var transactionExplorer = "https://blockexplorer.electroneum.com/tx/";

BatLesStakes commented 6 years ago

So I put my local address (IPV4), URL or 127.0.0.1 ?

Zer0dn commented 6 years ago

You would replace http://urnodeserver:8117 With what ever address the webserver (where the webfiles are hosted at) can connect to the node server. IE. If you have your webpages hosted on a separate cpanel host at say www.etnpool.fl and the node host is reachable in relation to that cpanel server via the public IP of 62.55.182.99 then you would set your config.js file with that line reading:

var api = "http://62.55.182.99:8117";

if the node and webserver are on the same server then yes you can send it to localhost or 127.0.0.1 if that is the IP you bound the stats api to in the node config.json file

BatLesStakes commented 6 years ago

Why this IP ? It's not my server IP And yeah, web part and pool are on the same server

BatLesStakes commented 6 years ago

//var api = "https://eupool.electroneum.com/api"; //var api = "http://62.55.182.99:8117"; var api = 'http://127.0.0.1:8117';

var coinUnits = 100; var coinDecimalPlaces = 2;

var poolHost = "127.0.0.1";

var irc = "irc.freenode.net/#monero-pools";

var email = "treasurechasalion@gmail.com";

var easyminerDownload = "https://github.com/zone117x/cryptonote-easy-miner/releases/";

var blockchainExplorer = "https://blockexplorer.electroneum.com/block/";

var transactionExplorer = "https://blockexplorer.electroneum.com/tx/";

This is what I made, 62.55.182.99 is not my IP address btw

Zer0dn commented 6 years ago

62.55.182.99 was an example.

Ok to troubleshoot here is what is needed.

  1. Is the Node Server the same server that is hosting the webpages for the POOL? 1A. If not what is the IP of the node server and what is the IP of the Webpage Server for the Pool?

If the answer to 1 is yes then 127.0.0.1:8117 should work provided there is not a firewall on the server that is blocking that port. If the answer to 1 is no then please answer the information needed in 1A.

BatLesStakes commented 6 years ago

Okay I'll have a look at.

  1. Yes, everything (wallet, pool, website) is on the same server
BatLesStakes commented 6 years ago

Okay so it's opened now but still nothing

Zer0dn commented 6 years ago

Ok I can confirm now that the http://etnpool.fr:8117/stats shows your stats.

Change your config.js file to

var api = "http://etnpool.fr:8117";

var coinUnits = 100; var coinDecimalPlaces = 0;

var poolHost = "http://etnpool.fr";

vvar irc = "irc.freenode.net/#monero-pools";

var email = "treasurechasalion@gmail.com";

var easyminerDownload = "https://github.com/zone117x/cryptonote-easy-miner/releases/";

var blockchainExplorer = "https://blockexplorer.electroneum.com/block/";

var transactionExplorer = "https://blockexplorer.electroneum.com/tx/";

BatLesStakes commented 6 years ago

Still the same

BatLesStakes commented 6 years ago

Maybe a NGINX issue

Zer0dn commented 6 years ago

I have confirmed the config.js is set right now.

It should be working. The config.js is executed by the user's browser side so not an internal NGINX issue or even pool software. One thing that may keep it from working is file security. What are the perms set to in the website side files? Specifically for config.js?

BatLesStakes commented 6 years ago

I don't see what you mean, it's accessible from non-root users

BatLesStakes commented 6 years ago

And I'm running the pool as root

BatLesStakes commented 6 years ago

We can see the pool on etnpool.fr:8117/stats and we can mine on it but no web interface

Zer0dn commented 6 years ago

Run the command below

ls -l config.js

In the directory where the config.js file resides.

-Also why would you run the pool as root? The instructions say the opposite. This can be related as well. At a minimum it could expose your system to attack. My recommendation is to reinstall everything from wallet to webhost platform and run using users who have sudo access that are not 'root'

BatLesStakes commented 6 years ago

It's a normal account and I do sudo su and then node init.js

Zer0dn commented 6 years ago

That is not in the instructions and can lead to stuff like this. Still awaiting the

ls -l config.js

on the config.js where the webfiles are stored please.

BatLesStakes commented 6 years ago

-rw-rw-r-- 1 batlesstakes batlesstakes 445 Jan 3 19:53 config.js

Zer0dn commented 6 years ago

Ok I have traced it down to an issue with the webhost software or firewall but nothing to do with the pool software. I was able to put your settings from your config.js file into my pool test and was able to access the stats.

For testing you could open the firewall up temporarily and then start closing it back down to see which rule may be blocking it. The issue could also be the web hosting setup. As we are not privy to what you are running for those yet then it is speculation by elimination.

Zer0dn commented 6 years ago

image image

BatLesStakes commented 6 years ago

Firewall is disabled tbh

Zer0dn commented 6 years ago

That leaves the webhost platform.

BatLesStakes commented 6 years ago

What do you mean ?

Zer0dn commented 6 years ago

What http server are you using to host the webfiles? Like apache etc?