Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

EC2ResponseError at /accounts/register/

I have installed dashboard and there occurs a problem when registering a ner user. It seems that dashboard has registered a user in django but not in nova.

I installed nova with release edition, not trunk. Maybe that's a possible reason. Which edition of dashboard should I use to match release edition of nova?

And the response from dashboard is as follows:

EC2ResponseError at /accounts/register/ EC2ResponseError: 400 Bad Request <response><errors><error>NotFound<message>No user for id yzt356</message></error></errors><requestid>HHJ0IONBKQO8JRYYBOG2</requestid></response> Request Method: POST Request URL: http://162.105.146.127:8000/accounts/register/ Django Version: 1.3 Exception Type: EC2ResponseError Exception Value:
EC2ResponseError: 400 Bad Request <response><errors><error>NotFound<message>No user for id yzt356</message></error></errors><requestid>HHJ0IONBKQO8JRYYBOG2</requestid></response> Exception Location: /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/boto/connection.py in get_object, line 631 Python Executable: /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/bin/python Python Version: 2.6.5 Python Path:
['/root/openstack-dashboard/trunk/openstack-dashboard/dashboard', '/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg', '/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/pip-1.0.2-py2.6.egg', '/root/openstack-dashboard/trunk/django-openstack/src', '/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/mox-0.5.3-py2.6.egg', '/root/openstack-dashboard/trunk/django-nova-syspanel/src', '/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6', '/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/plat-linux2', '/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/lib-tk', '/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/lib-old', '/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/lib-dynload', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib64/python2.6/lib-tk', '/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages', '/root/openstack-dashboard/trunk/openstack-dashboard', '/root/openstack-dashboard/trunk/openstack-dashboard/dashboard', '/root/openstack-dashboard/trunk/openstack-dashboard/dashboard'] Server time: 星期三, 20 七月 2011 03:35:26 +0800 Traceback Switch to copy-and-paste view

/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/django/core/handlers/base.py in get_response response = callback(request, callback_args, *callback_kwargs) ... ▶ Local vars /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/registration/views.py in register new_user = form.save(profile_callback=profile_callback) ... ▶ Local vars /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/registration/forms.py in save profile_callback=profile_callback) ... ▶ Local vars /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/registration/models.py in create_inactive_user new_user = User.objects.create_user(username, email, password) ... ▶ Local vars /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/django/contrib/auth/models.py in create_user user.save(using=self._db) ... ▶ Local vars /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/django/db/models/base.py in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) ... ▶ Local vars /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/django/db/models/base.py in save_base created=(not record_exists), raw=raw, using=using) ... ▶ Local vars /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/django/dispatch/dispatcher.py in send response = receiver(signal=self, sender=sender, **named) ... ▶ Local vars /root/openstack-dashboard/trunk/django-openstack/src/django_openstack/models.py in user_post_save if not nova.has_user(instance.username): ... ▶ Local vars /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/nova_adminclient/client.py in has_user return self.get_user(username) != None ... ▶ Local vars /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/nova_adminclient/client.py in get_user UserInfo) ... ▶ Local vars /root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/boto/connection.py in get_object raise self.ResponseError(response.status, response.reason, body) ... ▶ Local vars Request information

GET No GET data POST Variable Value username
u'yzt356' password1
u'123456' csrfmiddlewaretoken u'e3c0e96aca4ac2eac7b47b732bef4339' email
u'yzt356@163.com' password2
u'123456' FILES No FILES data COOKIES Variable Value csrftoken
'e3c0e96aca4ac2eac7b47b732bef4339' sessionid
'fb57f31eeedb97baa915469d55408138' META Variable Value RUN_MAIN
'true' HTTP_REFERER
'http://162.105.146.127:8000/accounts/register/' SERVER_PROTOCOL 'HTTP/1.0' SERVER_SOFTWARE 'WSGIServer/0.1 Python/2.6.5' SCRIPT_NAME u'' LESSOPEN
'| /usr/bin/lesspipe %s' SSH_CLIENT
'162.105.235.13 49208 22' REQUEST_METHOD
'POST' NOVA_URL
'http://162.105.146.127:8774/v1.0/' USER
'root' HTTP_ORIGIN 'http://162.105.146.127:8000' EC2_USER_ID '42' QUERY_STRING
'' PATH
'/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' PS1 '(.dashboard-venv)' wsgi.errors <open file="" '<stderr="">', mode 'w' at 0x7fcf06da11e0> SSH_CONNECTION
'162.105.235.13 49208 162.105.146.127 22' LANG
'en_US.UTF-8' HTTP_ACCEPT_CHARSET 'GBK,utf-8;q=0.7,;q=0.3' TERM
'xterm' SHELL
'/bin/bash' HTTP_CONNECTION 'keep-alive' HTTP_COOKIE 'sessionid=fb57f31eeedb97baa915469d55408138; csrftoken=e3c0e96aca4ac2eac7b47b732bef4339' SERVER_NAME 'SLOT12.slot12' REMOTE_ADDR '162.105.146.2' SHLVL
'2' wsgi.url_scheme 'http' HTTP_VIA
'1.1 proxy.net.pku.edu.cn (squid/3.0.PRE6)' EUCALYPTUS_CERT '/root/creds/cacert.pem' SERVER_PORT '8000' NOVA_API_KEY
'af96d46f-1b50-46b5-bbe2-83b7bc9329df' S3_URL
'http://162.105.146.127:3333' EC2_SECRET_KEY
'd3f3cbb9-56bf-4e3f-90d0-ae8f5d25c0f1' HOME
'/root' CONTENT_LENGTH
'125' wsgi.file_wrapper
'' EC2_URL 'http://162.105.146.127:8773/services/Cloud' wsgi.multithread
True VIRTUAL_ENV '/root/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv' CSRF_COOKIE 'e3c0e96aca4ac2eac7b47b732bef4339' wsgi.input
<socket._fileobject object="" at="" 0x3c36c50=""> HTTP_USER_AGENT 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.45 Safari/534.16' HTTP_HOST
'162.105.146.127:8000' EC2_PRIVATE_KEY '/root/creds/pk.pem' MAIL
'/var/mail/root' wsgi.version
(1, 0) HTTP_CACHE_CONTROL
'max-age=0' _
'dashboard/manage.py' HTTP_ACCEPT 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,
/;q=0.5' EC2_ACCESS_KEY
'af96d46f-1b50-46b5-bbe2-83b7bc9329df:test' LESSCLOSE
'/usr/bin/lesspipe %s %s' GATEWAY_INTERFACE
'CGI/1.1' HTTP_X_FORWARDED_FOR
'162.105.235.13' SSH_TTY '/dev/pts/0' NOVA_CERT
'/root/creds/cacert.pem' wsgi.multiprocess
False HTTP_ACCEPT_LANGUAGE
'zh-CN,zh;q=0.8' NOVA_USERNAME
'anne' wsgi.run_once
False PWD '/root/openstack-dashboard/trunk/openstack-dashboard' DJANGO_SETTINGS_MODULE
'dashboard.settings' CONTENT_TYPE
'application/x-www-form-urlencoded' EC2_CERT
'/root/creds/cert.pem' LOGNAME 'root' LS_COLORS
'rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:
.tar=01;31:.tgz=01;31:.arj=01;31:.taz=01;31:.lzh=01;31:.lzma=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.bz2=01;31:.bz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.rar=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:.xspf=00;36:' REMOTE_HOST '' HTTP_ACCEPT_ENCODING
'gzip,deflate,sdch' PATH_INFO
u'/accounts/register/' Settings Using settings module dashboard.settings Setting Value USE_L10N
False TIME_ZONE
None LANGUAGE_CODE
'en' ROOT_URLCONF
'dashboard.urls' MANAGERS
() ACCOUNT_ACTIVATION_DAYS 7 STATIC_ROOT '' TEST_DATABASE_CHARSET
None USE_THOUSAND_SEPARATOR
False MESSAGE_STORAGE 'django.contrib.messages.storage.cookie.CookieStorage' DATABASE_HOST
'' IGNORABLE_404_STARTS
('/cgi-bin/', '/_vti_bin', '/_vti_inf') SEND_BROKEN_LINK_EMAILS False URL_VALIDATOR_USER_AGENT
'Django/1.3 (http://www.djangoproject.com)' STATICFILES_FINDERS ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') SESSION_COOKIE_DOMAIN
None SESSION_COOKIE_NAME 'sessionid' CREDENTIAL_AUTHORIZATION_DAYS
'5' COMMENTS_MODERATORS_GROUP
None TIME_INPUT_FORMATS
('%H:%M:%S', '%H:%M') DATABASES
{'default': {'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': '/root/openstack-dashboard/trunk/openstack-dashboard/local/dashboard_openstack.sqlite3', 'OPTIONS': {}, 'PASSWORD': '*****', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': None, 'USER': ''}} SITE_BRANDING
'OpenStack' TEST_DATABASE_NAME
None FILE_UPLOAD_PERMISSIONS None FILE_UPLOAD_HANDLERS
('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') DEFAULT_CONTENT_TYPE
'text/html' NOVA_ACCESS_KEY 'af96d46f-1b50-46b5-bbe2-83b7bc9329df:test' APPEND_SLASH
True FIRST_DAY_OF_WEEK
0 DATABASE_ROUTERS
[] YEAR_MONTH_FORMAT
'F Y' STATICFILES_STORAGE 'django.contrib.staticfiles.storage.StaticFilesStorage' CACHES
{'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache', 'LOCATION': ''}} SERVER_EMAIL
'root@localhost' SESSION_COOKIE_PATH '/' NOVA_SECRET_KEY '
*****' IGNORABLE_404_ENDS
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php') MIDDLEWARE_CLASSES
('django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'dashboard.middleware.DashboardLogUnhandledExceptionsMiddleware') USE_I18N
True THOUSAND_SEPARATOR
',' SECRET_KEY
'*****' LANGUAGE_COOKIE_NAME
'django_language' FILE_UPLOAD_TEMP_DIR
None TRANSACTIONS_MANAGED
False LOGGING_CONFIG
'django.utils.log.dictConfig' TEMPLATE_LOADERS
('django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source') TEMPLATE_DEBUG
True AUTHENTICATION_BACKENDS ('django.contrib.auth.backends.ModelBackend',) ENABLE_VNC
True TEST_DATABASE_COLLATION None FORCE_SCRIPT_NAME
None CACHE_BACKEND
'dummy://' DEFAULT_CHARSET 'utf-8' SESSION_COOKIE_SECURE
False NOVA_DEFAULT_REGION 'nova' LOCAL_PATH
'/root/openstack-dashboard/trunk/openstack-dashboard/local' CSRF_COOKIE_DOMAIN
None FILE_CHARSET
'utf-8' DEBUG
True USE_SSL False SESSION_FILE_PATH
None DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage' INSTALLED_APPS
['dashboard', 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.comments', 'django.contrib.sites', 'django.contrib.markup', 'django.contrib.syndication', 'django_nose', 'django_openstack', 'django_openstack.nova', 'django_openstack.templatetags', 'django_nova_syspanel', 'registration'] LANGUAGES_BIDI
('he', 'ar', 'fa') DATABASE_ENGINE '' DATABASE_NAME
'' COMMENTS_FIRST_FEW
0 PREPEND_WWW False SESSION_COOKIE_HTTPONLY False DATABASE_PORT
'' DEBUG_PROPAGATE_EXCEPTIONS
False PROD
False NOVA_PROJECT
'test' MONTH_DAY_FORMAT
'F j' LOGIN_URL
'/accounts/login' SESSION_EXPIRE_AT_BROWSER_CLOSE True TIME_FORMAT 'P' DATE_INPUT_FORMATS
('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y') CSRF_COOKIE_NAME
'csrftoken' EMAIL_HOST_PASSWORD '
*****' PASSWORD_RESET_TIMEOUT_DAYS '*****' CACHE_MIDDLEWARE_ALIAS
'default' ROOT_PATH
'/root/openstack-dashboard/trunk/openstack-dashboard/dashboard' SESSION_SAVE_EVERY_REQUEST
False ADMIN_MEDIA_PREFIX
'/media/admin/' NUMBER_GROUPING 0 NOVA_ADMIN_USER 'anne' CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure' COMMENTS_SKETCHY_USERS_GROUP
None LOGIN_REDIRECT_URL
'/' LOGGING {'disable_existing_loggers': False, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'level': 'ERROR'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}}, 'version': 1} CACHE_MIDDLEWARE_KEY_PREFIX '' LOCALE_PATHS
() TEMPLATE_STRING_IF_INVALID
'' COMMENTS_ALLOW_PROFANITIES
False LOGOUT_URL
'/accounts/logout/' EMAIL_USE_TLS
False TEMPLATE_DIRS
('/root/openstack-dashboard/trunk/openstack-dashboard/dashboard/templates',) FIXTURE_DIRS
() EMAIL_HOST
'smtp.gmail.com' DATE_FORMAT 'N j, Y' MEDIA_ROOT
'/root/openstack-dashboard/trunk/openstack-dashboard/dashboard/../media' ADMINS
() FORMAT_MODULE_PATH
None DEFAULT_FROM_EMAIL
'webmaster@localhost' STATICFILES_DIRS
() MEDIA_URL
'/media/' DATETIME_FORMAT 'N j, Y, P' EMAIL_SUBJECT_PREFIX
'[Django] ' SITE_ID 1 DISALLOWED_USER_AGENTS
() ALLOWED_INCLUDE_ROOTS
() DECIMAL_SEPARATOR
'.' SHORT_DATE_FORMAT
'm/d/Y' DATABASE_USER
'' TEST_RUNNER 'django_nose.NoseTestSuiteRunner' NOVA_DEFAULT_ENDPOINT
'http://162.105.146.127:8773/services/Cloud' FILE_UPLOAD_MAX_MEMORY_SIZE 2621440 EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend' DEFAULT_TABLESPACE
'' TEMPLATE_CONTEXT_PROCESSORS ('django.core.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.request', 'django.core.context_processors.media', 'django.contrib.messages.context_processors.messages') SITE_NAME
'openstack' SESSION_COOKIE_AGE
1209600 SETTINGS_MODULE 'dashboard.settings' USE_ETAGS
False LANGUAGES
(('en', 'English'), ('en-gb', 'British English'), ('es', 'Spanish'), ('fr', 'French'), ('ja', 'Japanese'), ('pt', 'Portuguese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')) DEFAULT_INDEX_TABLESPACE
'' INTERNAL_IPS
() STATIC_URL
None EMAIL_PORT
25 SESSION_ENGINE
'django.contrib.sessions.backends.db' SHORT_DATETIME_FORMAT
'm/d/Y P' ABSOLUTE_URL_OVERRIDES
{} DATABASE_OPTIONS
{} CACHE_MIDDLEWARE_SECONDS
600 BANNED_IPS
() DATETIME_INPUT_FORMATS
('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M', '%m/%d/%y') DATABASE_PASSWORD
'
*****' ADMIN_FOR
() PROFANITIES_LIST
'******' EMAIL_HOST_USER 'yzt356' COMMENTS_BANNED_USERS_GROUP None You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.