first install does not work 502 Bad Gateway

I made some attempts but it is not working, following the official documentation with CC7 and Centos 7 (nginx or apache) there was no success, did anyone have the same problem? can you help me ?

The 3 services go up but display the 502 Bad Gateway error.

Check your logfiles, that sounds like uwsgi isn’t running or nginx/apache cannot connect to it.

Here is the uwsgi process status:

uwsgi.service - uWSGI Emperor Service
   Loaded: loaded (/usr/lib/systemd/system/uwsgi.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2018-09-25 13:41:58 -03; 15s ago
 Main PID: 8426 (uwsgi)
   Status: "uWSGI is ready"
    Tasks: 9
   CGroup: /system.slice/uwsgi.service
           ├─8426 indico uWSGI master
           ├─8427 indico uWSGI worker 1
           ├─8428 indico uWSGI worker 2
           ├─8429 indico uWSGI worker 3
           └─8430 indico uWSGI worker 4

Sep 25 13:41:58 eventshomolog.domain.br uwsgi[8426]: spawned uWSGI worker 1 (pid: 8427, cores: 1)
Sep 25 13:41:58 eventshomolog.domain.br uwsgi[8426]: spawned uWSGI worker 2 (pid: 8428, cores: 1)
Sep 25 13:41:58 eventshomolog.domain.br uwsgi[8426]: spawned uWSGI worker 3 (pid: 8429, cores: 1)
Sep 25 13:41:58 eventshomolog.domain.br uwsgi[8426]: spawned uWSGI worker 4 (pid: 8430, cores: 1)
Sep 25 13:41:58 eventshomolog.domain.br uwsgi[8426]: *** Stats server enabled on /opt/indico/web/uwsgi-stats.sock fd: 17 ***
Sep 25 13:41:58 eventshomolog.domain.br systemd[1]: Started uWSGI Emperor Service.
Sep 25 13:41:58 eventshomolog.domain.br uwsgi[8426]: Tue Sep 25 13:41:58 2018 - mem-collector thread started for worker 2
Sep 25 13:41:58 eventshomolog.domain.br uwsgi[8426]: Tue Sep 25 13:41:58 2018 - mem-collector thread started for worker 3
Sep 25 13:41:58 eventshomolog.domain.br uwsgi[8426]: Tue Sep 25 13:41:58 2018 - mem-collector thread started for worker 4
Sep 25 13:41:58 eventshomolog.domain.br uwsgi[8426]: Tue Sep 25 13:41:58 2018 - mem-collector thread started for worker 1

thanks for your help,

That looks correct. Anything in /opt/indico/logs/nginx/error.log?

2018/09/25 13:33:41 [error] 6861#0: *142 upstream prematurely closed connection while reading response header from upstream, client: 10.0.1.61, server: eventshomolog.domain.br, request: "GET / HTTP/2.0", upstream: "uwsgi://unix:/opt/indico/web/uwsgi.sock:", host: "eventshomolog.domain.br"
2018/09/25 13:33:41 [error] 6861#0: *142 upstream prematurely closed connection while reading response header from upstream, client: 10.0.1.61, server: eventshomolog.domain.br, request: "GET /favicon.ico HTTP/2.0", upstream: "uwsgi://unix:/opt/indico/web/uwsgi.sock:", host: "eventshomolog.domain.br", referrer:
2018/09/25 13:33:43 [error] 6861#0: *142 upstream prematurely closed connection while reading response header from upstream, client: 10.0.1.61, server: eventshomolog.domain.br, request: "GET / HTTP/2.0", upstream: "uwsgi://unix:/opt/indico/web/uwsgi.sock:", host: "eventshomolog.domain.br"
2018/09/25 13:33:43 [error] 6861#0: *142 upstream prematurely closed connection while reading response header from upstream, client: 10.0.1.61, server: eventshomolog.domain.br, request: "GET /favicon.ico HTTP/2.0", upstream: "uwsgi://unix:/opt/indico/web/uwsgi.sock:", host: "eventshomolog.domain.br", referrer: "https://eventshomolog.domain.br/"
2018/09/25 13:41:28 [error] 6861#0: *148 upstream prematurely closed connection while reading response header from upstream, client: 10.0.1.61, server: eventshomolog.domain.br, request: "GET / HTTP/2.0", upstream: "uwsgi://unix:/opt/indico/web/uwsgi.sock:", host: "eventshomolog.domain.br"
2018/09/25 13:41:29 [error] 6861#0: *148 upstream prematurely closed connection while reading response header from upstream, client: 10.0.1.61, server: eventshomolog.domain.br, request: "GET /favicon.ico HTTP/2.0", upstream: "uwsgi://unix:/opt/indico/web/uwsgi.sock:", host: "eventshomolog.domain.br", referrer: 
2018/09/25 14:07:29 [error] 8448#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 10.0.1.158, server: eventshomolog.domain.br, request: "GET / HTTP/2.0", upstream: "uwsgi://unix:/opt/indico/web/uwsgi.sock:", host: "eventshomolog.domain.br"
2018/09/25 14:07:31 [error] 8448#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 10.0.1.158, server: eventshomolog.domain.br, request: "GET / HTTP/2.0", upstream: "uwsgi://unix:/opt/indico/web/uwsgi.sock:", host: "eventshomolog.domain.br"

hmm, not very helpful. Check if you get any errors when running indico shell on the ssh shell (as the indico user). Also check if there’s anything in /opt/indico/logs/indico.log

I appreciate any attempt to help, I tried using CentOS 7, with apache and then with nginx without success.
I tried to use the CC7 distribution without success.
I was successful using Debian 9 with Apache, thank you.

very strange… anyway, good to hear it’s working now!