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

Create more user-friendly error message for when NOMP doesn't have permission to use port 80 for website #141

Closed
mapleshadow opened this issue May 5, 2014 · 10 comments

Comments

Projects
None yet
6 participants
@mapleshadow
Copy link

commented May 5, 2014

events.js:72
throw er; // Unhandled 'error' event
^
Error: bind EACCES
at errnoException (net.js:904:11)
at net.js:1072:30
at Object.12:1 (cluster.js:592:5)
at handleResponse (cluster.js:171:41)
at respond (cluster.js:192:5)
at handleMessage (cluster.js:202:5)
at process.EventEmitter.emit (events.js:117:20)
at handleMessage (child_process.js:322:10)
at Pipe.channel.onread (child_process.js:349:11)
2014-05-05 17:21:19 [Master] [Website] Website process died, spawning replacement...

xxxxx@mpos:~/nomp$

PS:
config.json

"website": {
    "enabled": true,
    "port": 80,
    "stratumHost": "localhost",
    "stats": {
        "updateInterval": 60,
        "historicalRetention": 43200,
        "hashrateWindow": 300
    },
    "adminCenter": {
        "enabled": true,
        "password": "password"
    }
},
@mapleshadow

This comment has been minimized.

Copy link
Author

commented May 5, 2014

After the closed web, normal

@ltcjuice

This comment has been minimized.

Copy link

commented May 5, 2014

Only root can open ports under 1024.

Change to website port to one above that or run as root.

I changed to a higher port and used port forwarding on my firewall to redirect port 80 on the outside to the higher port number on the inside

@ltcjuice

This comment has been minimized.

Copy link

commented May 5, 2014

You better change your admin password too.

@zone117x zone117x changed the title ERROR WHY ? Create more user-friendly error message for when NOMP doesn't have permission to use port 80 for website May 5, 2014

@zone117x zone117x added the enhancement label May 5, 2014

@zone117x

This comment has been minimized.

Copy link
Owner

commented May 5, 2014

I'll try to add a more user-friendly and useful error for when website process can't get permissions to listen on port 80.

@LiveChains

This comment has been minimized.

Copy link

commented May 7, 2014

you cant run on port 80 as a user it need to be root, our advice here would be to change the config.json port from 80 to something at the other end of the sale 25000 we used and then nginx to run on port 80, works a bit like i mirror, nginix will get the site from nodeJS.

There are SEVERAL reasons you would want to do this, almost all of them are security based, running the server with sudo (or root) shouldnt really be happening. This whole app can be download configured and run by a normal user on any 12x or 13x ubuntu

@LiveChains

This comment has been minimized.

Copy link

commented May 7, 2014

https://www.digitalocean.com/community/articles/how-to-configure-nginx-as-a-front-end-proxy-for-apache

When you get to configure apache pause for a moment, you dont need the apache but, but you follow its steps and apply them to NOMP

@zone117x

This comment has been minimized.

Copy link
Owner

commented May 7, 2014

There should be a more user-friendly error when this happens now. If the website module isn't able to start listening on the port it should output a more useful log message.

@zone117x zone117x closed this May 7, 2014

@mapleshadow

This comment has been minimized.

Copy link
Author

commented May 9, 2014

Basically understand, thank you.
Can I use
sudo can be resolved?
Or that you must use the root user to an entire folder into the / var / node / directory?

@bitcoinbrisbane

This comment has been minimized.

Copy link

commented Oct 22, 2015

I had the same issue. I solved by changing port to 8080 and the ip address in the config file to 127.0.0.1 and then ran as sudo.

@sysmanalex

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2015

  • nginx proxy
    proxy_cache_path /var/lib/nginx/proxy levels=1:2 keys_zone=api:5m;

    location ~ ^/(tbs|workers|stats|blocks) {
      proxy_pass    http://127.0.0.1:8080;
    }
    
    location ~ ^/static {
      proxy_pass    http://127.0.0.1:8080;
      expires 15m;
    }
    
    location ~ ^/api/(live|pool)_stats {
      proxy_pass    http://127.0.0.1:8080;
      proxy_cache api;
      proxy_cache_key $scheme$proxy_host$uri;
      proxy_cache_lock on;
      proxy_cache_valid 3m;
      proxy_cache_lock_timeout 30s;
    
      expires 3m;
    
    }
    

On Thu, Oct 22, 2015 at 9:30 AM, Lucas Cullen notifications@github.com
wrote:

I had the same issue. I solved by changing port to 8080 and the ip address
in the config file to 127.0.0.1 and then ran as sudo.


Reply to this email directly or view it on GitHub
#141 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.