Hi there, I’m new at Indico and I wanted to install it in an AWS server I manage so I follow the tutorial from Apache — Indico 2.3.3 documentation
My server is Ubuntu 18.04 LTS and I installed Indico as shown in the tutorial but when I want to access from my browser I got “Internal server error” and I don’t know where the problem is coming. I checked all the logs I and only found this on “/var/log/uwsgi/app/indico.log”
Thu Feb 25 20:11:15 2021 - mem-collector thread started for worker 2
Thu Feb 25 20:11:15 2021 - mem-collector thread started for worker 1
Thu Feb 25 20:11:31 2021 - --- no python application found, check your startup logs for errors ---
Thu Feb 25 20:17:15 2021 - --- no python application found, check your startup logs for errors ---
Thu Feb 25 20:52:56 2021 - --- no python application found, check your startup logs for errors ---
Thu Feb 25 20:53:35 2021 - --- no python application found, check your startup logs for errors ---
Thu Feb 25 20:53:36 2021 - --- no python application found, check your startup logs for errors ---
Thu Feb 25 20:56:08 2021 - --- no python application found, check your startup logs for errors ---
Thu Feb 25 21:04:00 2021 - --- no python application found, check your startup logs for errors ---
Thu Feb 25 21:04:39 2021 - --- no python application found, check your startup logs for errors ---
Also I think I have Postgresql 13
Anyone could help me? I don’t know what to do next. Thank you
Postgres 13 shouldn’t be a problem. Check if you get any errors when running indico shell to see whether something goes wrong when initializing the application.
OK strange. Sounds like something is wrong with your uwsgi config… maybe check if systemctl status uwsgi.service (especially right after starting it) shows anything useful.
Yes, the configuration file has the same information than this config.
I don’t know if it matters but the first time I wanted to install indico I created the virtualenv with python3 instead of python 2.7, I couldn’t install so I switched to python 2.7 and installed it correctly.
Maybe you still have some leftovers from the old environment? I’d rm -rf .venv and to delete it for good and then re-do the steps from the setup guide after switching to the indico user.
Okay, I removed .venv and re-do all the process of activating the virtualenv and update my host name (this is because every time I restart the server the IP is different) on /opt/indico/etc/indico.conf, /etc/apache2/sites-available/indico.conf and generated a new SSL key whit the new hostname. Now I have a new error: 503 Service Unavailable and then I look into the logs and got this from /opt/indico/log/apache/error.log/
[Fri Feb 26 21:22:34.571278 2021] [proxy:error] [pid 1747:tid 140338100766464] (111)Connection refused: AH00957: uwsgi: attempt to connect to 127.0.0.1:8008 (127.0.0.1) failed
[Fri Feb 26 21:22:34.572568 2021] [:error] [pid 1747:tid 140338100766464] [client 177.241.53.235:12435] failed to make connection to backend: 127.0.0.1:8008
[Fri Feb 26 21:22:34.919815 2021] [proxy:error] [pid 1746:tid 140337905358592] (111)Connection refused: AH00957: uwsgi: attempt to connect to 127.0.0.1:8008 (127.0.0.1) failed
[Fri Feb 26 21:22:34.919856 2021] [:error] [pid 1746:tid 140337905358592] [client 177.241.53.235:49244] failed to make connection to backend: 127.0.0.1:8008, referer: https://ec2-3-88-26-253.compute-1.amazonaws.com/
That sounds like uwsgi isn’t running or not listening on that port. I just realized that earlier I linked you to the docs for debian+nginx, not the debian+apache docs. You need to use the uwsgi config from the latter.
I double checked the uwsig conf file and in fact I have the configuration for Apache, I tried to open at output rule at the firewall from AWS Console for the port 8008 but didn’t worked.
I stil have the same error, I checked again /var/log/uwsgi/app/indico.log and got this
Sun Feb 28 12:22:01 2021 - thunder lock: disabled (you can enable it with --thunder-lock)
Sun Feb 28 12:22:01 2021 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/indico/socket fd 3
Sun Feb 28 12:22:01 2021 - uwsgi socket 1 bound to TCP address 127.0.0.1:8008 fd 5
Sun Feb 28 12:22:01 2021 - dropping root privileges after socket binding
Sun Feb 28 12:22:01 2021 - Python version: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
Sun Feb 28 12:22:01 2021 - Set PythonHome to /opt/indico/.venv
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f76531b45c0 (most recent call first):
I can see two things:
uwsig is running in python 3.6.9, I don’t know it thas causing the issue or not
Pyhton encounters a fatal error with a module called encodings, I installed in the .venv with pip a module called encoding-tools but didn’t worked (I restarted the uwsgi service)
Yes, that’s the problem. You seem to have an uwsgi version that does not match your python version. Seems like you installed uwsgi with the python3 plugin instead of the python2 one…
Yes, It seems that I never installed the plugin for python 2.7 and instead of that I was installing for python 3.6. Now that I removed uwsgi-plugin-python3 and installed uwsgi-plugin-python now Indico is running correctly, I can access it without getting an error.
Now I have a small issue with some images not loading at all. Probably is because I don’t have a real SSL certificate and I’m using the “test” way of installing Indico.