0

I am using apache2, wsgi, and django. There are some logs in the error.log. There are something wrong with the auth in my project. But I cannot figure it why from the following log. why user not found in some folds?

Any hints welcomed. Thanks.

RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[notice] Apache/2.2.22 (Ubuntu) mod_ssl/2.2.22 OpenSSL/1.0.1 mod_wsgi/3.3 Python/2.7.2 configured -- resuming normal operations
[error] [client myip] user username not found: /myproject/admin/status/ referer: https://10.32.64.3/reporting-central/login/?next=/myproject/admin/status/

Update

I found that the problem may be related to the following code. It failed to do login.

@login_required
def status(request):
        return render(request, 'status.html', {'title': 'status'})
BAE
  • 8,550
  • 22
  • 88
  • 171
  • Is that the full traceback from the log? – Alasdair May 10 '16 at 16:20
  • @Alasdair I think yes. But I could find more details, I may already fixed it. I have no idea how to debug. – BAE May 10 '16 at 17:09
  • I don't think this has anything to do with Django. It looks like a failed http basic auth request. See [this question](http://serverfault.com/questions/446105/what-would-be-filling-apache-logs-with-user-not-found). – Alasdair May 10 '16 at 17:53
  • @Alasdair yes. you are right. It failed to do ldap. I am digging into it. – BAE May 10 '16 at 18:02

1 Answers1

-1

Have you checked your database for that user entry? Try to migrate your DB

python manage.py migrate

and be sure the admin user is created:

python manage.py createsuperuser
Daniel Dudola
  • 43
  • 1
  • 7