Friday, April 20, 2018

s3cmd - 400 Bad Request

ERROR: S3 error: 400 (Bad Request):

Solution :
Use latest version of s3cmd
https://sourceforge.net/projects/s3tools/files/s3cmd/

mod_qos(004): failed to create mutex (ACT)(/var/tmp/K564968484.mod_qos): No space left on device

Solution :
Apache cannot be started because of this error, it means you have installed and enabled qos module in apache to avoid ddos attack. Now apache is crashed automatically and you are not able to start it.

Disable qos module

sudo a2dismod qos
Restart apache2

Error : django.db.utils.ProgrammingError: permission denied for relation django_migrations

While running django migrations for postgresql if you get above error, there may be chances that postgresql user which is used in connection file does not have sufficient permissions to run the migrations command. You need to provide privileges to postgresql user using super user.
1. Log into the database which is going to be migrated using super user
\c database name

2. Run following queries
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public to username;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public to username;
GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public to username;

Change text username with postgresql user which is used in server side postgresql connection file.

Note :
Generally you get this error while running python manage.py migrate 
and above solution works well for this error.