troubleshooting.md 2.8 KB
Newer Older
1 2
# Troubleshooting

Adarnof's avatar
Adarnof committed
3
## Logging
4

Adarnof's avatar
Adarnof committed
5
In its default configuration your auth project logs INFO and above messages to myauth/log/allianceauth.log. If you're encountering issues it's a good idea to view DEBUG messages as these greatly assist the troubleshooting process. These are printed to the console with manually starting the webserver via `python manage.py runserver`.
6

Ariel Rin's avatar
Ariel Rin committed
7
To record DEBUG messages in the log file, alter a setting in your auth project's settings file: `LOGGING['handlers']['log_file']['level'] = 'DEBUG'`. After restarting gunicorn and celery your log file will record all logging messages.
8

Adarnof's avatar
Adarnof committed
9
## Common Problems
10 11 12

### I'm getting an error 500 trying to connect to the website on a new install

13
*Great.* Error 500 is the generic message given by your web server when *anything* breaks. The actual error message is hidden in one of your auth project's log files. Read them to identify it.
14 15 16

### Failed to configure log handler

Ariel Rin's avatar
Ariel Rin committed
17
Make sure the log directory is writeable by the allianceserver user: `chmown -R allianceserver:allianceserver /path/to/myauth/log/`, then restart the auth supervisor processes.
18 19 20

### Groups aren't syncing to services

21
Make sure the background processes are running: `supervisorctl status myauth:`. If `myauth:worker` or `myauth:beat` do not show `RUNNING` read their log files to identify why.
22

23 24 25
### Task queue is way too large

Stop celery workers with `supervisorctl stop myauth:worker` then clear the queue:
26

Erik Kalkoken's avatar
Erik Kalkoken committed
27
```bash
28
    redis-cli FLUSHALL
29
    celery -A myauth worker --purge
Erik Kalkoken's avatar
Erik Kalkoken committed
30
```
31

32
Press Control+C once.
33

34 35 36
Now start the worker again with `supervisorctl start myauth:worker`

### Proxy timeout when entering email address
37

38
This usually indicates an issue with your email settings. Ensure these are correct and your email server/service is properly configured.
Ariel Rin's avatar
Ariel Rin committed
39 40 41

### No images are available to users accessing the website

Adarnof's avatar
Adarnof committed
42
This is likely due to a permissions mismatch. Check the setup guide for your web server. Additionally ensure the user who owns `/var/www/myauth/static` is the same user as running your webserver, as this can be non-standard.
Ariel Rin's avatar
Ariel Rin committed
43 44 45 46

### Unable to execute 'gunicorn myauth.wsgi' or ImportError: No module named 'myauth.wsgi'

Gunicorn needs to have context for its running location, `/home/alllianceserver/myauth/gunicorn myauth.wsgi` will not work, instead `cd /home/alllianceserver/myauth` then `gunicorn myauth.wsgi` is needed to boot Gunicorn. This is handled in the Supervisor config, but this may be encountered running Gunicorn manually for testing.
Erik Kalkoken's avatar
Erik Kalkoken committed
47 48 49 50 51 52 53 54 55 56 57 58

### Specified key was too long error

Migrations may about with the following error message:

```bash
Specified key was too long; max key length is 767 bytes
```

This error will occur if one is trying to use Maria DB prior to 10.2.x, which is not compatible with Alliance Auth.

Install a never Maria DB version to fix this issue another DBMS supported by Django 2.2.