ARTbio / GalaxyKickStart

Ansible playbooks for Galaxy Server deployment
GNU General Public License v3.0
24 stars 22 forks source link

Resolving nginx permission denied issues #244

Closed colindaven closed 7 years ago

colindaven commented 7 years ago

On an Ubuntu 16.04 server I can consistently get through the playbook without errors. However nginx gives me a permission denied.

I recognize the host IP 172.17.189.25 (own server IP) but not 172.24.2.47, though I can ping it.

I can't imagine the file /root/502.html should be being served - and it does not exist.

I am running the whole playbook as root following a "sudo -i" command.

Any ideas ? Cheers, Colin

Nginx Logs

sudo cat /var/log/nginx/error.log.1

2017/05/17 17:34:19 [error] 2707#2707: *30 open() "/root/502.html" failed (13: Permission denied), client: 172.24.2.47, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://127.0.0.1:4001", host: "172.17.189.25", referrer: "http://172.17.189.25/"
2017/05/17 17:44:37 [error] 2707#2707: *33 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.24.2.47, server: , request: "GET / HTTP/1.1", upstream: "uwsgi://127.0.0.1:4001", host: "172.17.189.25"
2017/05/17 17:44:37 [error] 2707#2707: *33 open() "/root/502.html" failed (13: Permission denied), client: 172.24.2.47, server: , request: "GET / HTTP/1.1", upstream: "uwsgi://127.0.0.1:4001", host: "172.17.189.25"
colindaven commented 7 years ago

This was apparently a problem from repeated install attempts on the same machine.

Sections of the nginx config /etc/nginx/nginx.conf were duplicated. I removed these, then it complained about the daemon on line 3. Got the nginx webserver restarting ok with status fine (after force killing the running one), but this did not change any of the errors from above.

However, the entire playbook worked fine on another server, so I am closing this.