-
Warning:
The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead.
Solution:
- Updated
psycopg2
to version >=2.8 in requirements/base.txt - Updated the
virtualenv
to reflect these changes.
- Updated
-
Error:
django.db.utils.OperationalError: FATAL: Peer authentication failed for user "admin"
Solution: In /var/lib/pgsql/data/pg_hba.conf changed
local all all peer
tolocal all all md5
to facilitate password based authentication. -
Error:
django.db.utils.ProgrammingError: must be owner of relation auth_user
Solution: Accessing the PostgreSQL prompt and running
\dt
displayed the tables under databsehappinesspackets
are owned by usermyprojectuser
and not by the useradmin
with which we were loggin in. To solve this:- Changed the password of the user
myprojectuser
to the same asadmin
's password. - In
start.sh
changedDB_USERNAME
tomyprojectuser
.
- Changed the password of the user
Doing the above resulted in the server running without any errors.
-
Nginx: Checked the configuration files for Nginx, etc/nginx/site-available/happinesspackets and ran the test command
sudo nginx -t
which returned no errors. -
Gunicorn: Service was failed when checked using
systemctl
. Restarted the service successfully.
The site is accessible.
To be resolved:
- The home page is not responsive.
- The login isn't working.
To verify the working of the above, I made fedora-happiness-packets/test.py to start a local server on the staging server. Using curl
I tried to access the home page. It still isn't working. Which implies the code breaks in deployment and needs to be debugged. Henceforth, the staging server is configured correctly.
Log file for Django: /srv/logs/django.log
Log file for Nginx: /var/log/nginx/error.log