steveandroulakis / mytardis-lighthouse-migrate-test

testing migrations from http://mytardis.lighthouseapp.com/ to Github Issues
0 stars 0 forks source link

IndexError at /login/ #226

Open steveandroulakis opened 11 years ago

steveandroulakis commented 11 years ago

Hello,

I have installed MyTardis on a Centos VM. I checked that MyTardis is correctly installed and configured by running a command './bin/django runserver'. I can access MyTardis at address http://localhost:8000 without any issue. However, I wish to serve MyTardis with Apache + mod_wsgi.

After making the required Apache + mod_wsgi configuration, the homepage of MyTardis is accessible at address http://localhost. However, when I tried to log in, an error message "IndexError at /login/. list assignment index out of range" is displayed. The full error trace is listed below.

I was wondering if anyone had encountered the same problem, and how the problem could be resolved.

Regards, Iman

----------- Error Trace Starts ------------ Environment:

Request Method: POST Request URL: http://localhost/login/

Django Version: 1.4 Python Version: 2.6.6 Installed Applications: ('django_extensions', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.humanize', 'tardis.template.loaders', 'tardis.tardis_portal', 'tardis.tardis_portal.templatetags', 'registration', 'south', 'django_jasmine', 'djcelery', 'djkombu', 'bootstrapform', 'mustachejs') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'tardis.tardis_portal.logging_middleware.LoggingMiddleware', 'tardis.tardis_portal.auth.AuthorizationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.transaction.TransactionMiddleware')

Traceback: File "/home/mytardis/mytardis/eggs/Django-1.4-py2.6.egg/django/core/handlers/base.py" in get_response

  1. response = callback(request, _callback_args, *_callback_kwargs) File "/home/mytardis/mytardis/tardis/tardis_portal/views.py" in login
  2. login(request, user) File "/home/mytardis/mytardis/tardis/tardis_portal/auth/init.py" in login
  3. request.class.groups = auth_service.getGroups(request) File "/home/mytardis/mytardis/tardis/tardis_portal/auth/authservice.py" in getGroups
  4. for group in gp.getGroups(request): File "/home/mytardis/mytardis/tardis/tardis_portal/auth/ip_auth.py" in getGroups
  5. ip4[3 - i] = '*'

Exception Type: IndexError at /login/ Exception Value: list assignment index out of range

----------- Error Trace Ends ------------

original LH ticket

This ticket has 0 attachment(s).

steveandroulakis commented 11 years ago

IndexError at /login/

Looking at the source code, it would appear that this is happening because the ’REMOTE_ADDR’ is not an IPv4 address of the form xx.xx.xx.xx. Does this ring any bells?

by Stephen Crawley