Hi,

I'm trying to load a DB dump into a new instance of RB, but it's failing. 
Here are the steps I'm executing (reproduced with 2.5.14):

On old machine:

>
>
> *cd /home/reviewboard/reviewboard.taitradio.net~/.venv/bin/rb-site manage 
> ~/reviewboard.taitradio.net -- dumpdb >reviewboard.dump*


On new machine (with the .venv having been re-created from a freeze):

>
> *.venv/bin/rb-site install \ *
> *   --noinput \ *   
> *--opt-out-support-data \*   
> *--domain-name=reviewboard.taitradio.net \*   
> *--company=Tait \*   
> *--site-root=/ \*   
> *--db-type=sqlite3 \*   
> *--db-name=reviewboard.db \*   
> *--cache-type=memcached \*   
> *--cache-info=127.0.0.1:11211 \*   
> *--web-server-type=lighttpd \*   
> *--web-server-port=80 \*   
> *--admin-user=ungers \*   *--admin-email=reviewboard.admins**<AT>*
> *taitradio.com \*   
> *--sitelist=/home/reviewboard/.sitelist \*   
> */home/reviewboard/reviewboard.taitradio.net*

I believe these options are close to or identical to the ones used to 
originally create the site on old machine.
This produces a flurry of activity with no errors (that I can spot).

Restore media and subversion credentials (from old machine to new machine):

>
> *rsync -avt --delete 
> /home/reviewboard/reviewboard.taitradio.net/htdocs/media/ 
> reviewboard@testrb:/home/reviewboard/reviewboard.taitradio.net/htdocs/media/**rsync
>  
> -avt --delete /home/reviewboard/reviewboard.taitradio.net/data/.subversion/ 
> reviewboard@testrb:/home/reviewboard/reviewboard.taitradio.net/data/.subversion/*

 
Then on new machine:

>
> *cd /home/reviewboard/reviewboard.taitradio.net**~/.venv/bin/rb-site 
> manage ~/reviewboard.taitradio.net -- loaddb ~/reviewboard.dump*

with reviewboard.dump being the file produces on old machine of course.

This asks me for confirmation and after I type 'yes', produces the 
following output (the red highlight is by me):

>
> *Type 'yes' to continue, or 'no' to cancel: yes*
> *sh: 1: ./reviewboard/manage.py: not found*
> *Importing new style dump format (v1)*
> *  [0%]*
> *Error: UNIQUE constraint failed: auth_permission.content_type_id, 
> auth_permission.codename*
> *Line 313: '{"pk": 115, "model": "auth.permission", "fields": {"codename": 
> "add_registeredextension", "name": "Can add registered extension", 
> "content_type": 8}}*
> *'*
> *Error: UNIQUE constraint failed: auth_permission.content_type_id, 
> auth_permission.codename*
> *Line 315: '{"pk": 116, "model": "auth.permission", "fields": {"codename": 
> "change_registeredextension", "name": "Can change registered extension", 
> "content_type": 8}}*
> *'*
> *Error: UNIQUE constraint failed: auth_permission.content_type_id, 
> auth_permission.codename*
> *Line 317: '{"pk": 117, "model": "auth.permission", "fields": {"codename": 
> "delete_registeredextension", "name": "Can delete registered extension", 
> "content_type": 8}}*
> *'*
> *Error: UNIQUE constraint failed: auth_permission.content_type_id, 
> auth_permission.codename*
> *Line 400: '{"pk": 112, "model": "auth.permission", "fields": {"codename": 
> "add_session", "name": "Can add session", "content_type": 7}}*
> *'*
> *Error: UNIQUE constraint failed: auth_permission.content_type_id, 
> auth_permission.codename*
> *Line 402: '{"pk": 113, "model": "auth.permission", "fields": {"codename": 
> "change_session", "name": "Can change session", "content_type": 7}}*
> *'*
> *Error: UNIQUE constraint failed: auth_permission.content_type_id, 
> auth_permission.codename*
> *Line 404: '{"pk": 114, "model": "auth.permission", "fields": {"codename": 
> "delete_session", "name": "Can delete session", "content_type": 7}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 585: '{"pk": 40, "model": "contenttypes.contenttype", "fields": 
> {"model": "webapitoken", "name": "Web API token", "app_label": "webapi"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 586: '{"pk": 14, "model": "contenttypes.contenttype", "fields": 
> {"model": "changedescription", "name": "change description", "app_label": 
> "changedescs"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 587: '{"pk": 22, "model": "contenttypes.contenttype", "fields": 
> {"model": "comment", "name": "comment", "app_label": "reviews"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 588: '{"pk": 34, "model": "contenttypes.contenttype", "fields": 
> {"model": "contenttype", "name": "content type", "app_label": 
> "contenttypes"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 589: '{"pk": 21, "model": "contenttypes.contenttype", "fields": 
> {"model": "defaultreviewer", "name": "default reviewer", "app_label": 
> "reviews"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 590: '{"pk": 17, "model": "contenttypes.contenttype", "fields": 
> {"model": "diffset", "name": "diff set", "app_label": "diffviewer"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 591: '{"pk": 18, "model": "contenttypes.contenttype", "fields": 
> {"model": "diffsethistory", "name": "diff set history", "app_label": 
> "diffviewer"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 592: '{"pk": 33, "model": "contenttypes.contenttype", "fields": 
> {"model": "evolution", "name": "evolution", "app_label": 
> "django_evolution"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 593: '{"pk": 13, "model": "contenttypes.contenttype", "fields": 
> {"model": "fileattachment", "name": "file attachment", "app_label": 
> "attachments"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 594: '{"pk": 23, "model": "contenttypes.contenttype", "fields": 
> {"model": "fileattachmentcomment", "name": "file attachment comment", 
> "app_label": "reviews"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 595: '{"pk": 36, "model": "contenttypes.contenttype", "fields": 
> {"model": "fileattachmenthistory", "name": "file attachment history", 
> "app_label": "attachments"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 596: '{"pk": 16, "model": "contenttypes.contenttype", "fields": 
> {"model": "filediff", "name": "file diff", "app_label": "diffviewer"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 599: '{"pk": 19, "model": "contenttypes.contenttype", "fields": 
> {"model": "hostingserviceaccount", "name": "hosting service account", 
> "app_label": "hostingsvcs"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 600: '{"pk": 37, "model": "contenttypes.contenttype", "fields": 
> {"model": "legacyfilediffdata", "name": "legacy file diff data", 
> "app_label": "diffviewer"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 601: '{"pk": 31, "model": "contenttypes.contenttype", "fields": 
> {"model": "localsite", "name": "local site", "app_label": "site"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 607: '{"pk": 38, "model": "contenttypes.contenttype", "fields": 
> {"model": "rawfilediffdata", "name": "raw file diff data", "app_label": 
> "diffviewer"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 609: '{"pk": 30, "model": "contenttypes.contenttype", "fields": 
> {"model": "repository", "name": "repository", "app_label": "scmtools"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 610: '{"pk": 27, "model": "contenttypes.contenttype", "fields": 
> {"model": "review", "name": "review", "app_label": "reviews"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 611: '{"pk": 20, "model": "contenttypes.contenttype", "fields": 
> {"model": "group", "name": "review group", "app_label": "reviews"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 612: '{"pk": 25, "model": "contenttypes.contenttype", "fields": 
> {"model": "reviewrequest", "name": "review request", "app_label": 
> "reviews"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 613: '{"pk": 28, "model": "contenttypes.contenttype", "fields": 
> {"model": "reviewrequestdraft", "name": "review request draft", 
> "app_label": "reviews"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 615: '{"pk": 24, "model": "contenttypes.contenttype", "fields": 
> {"model": "screenshot", "name": "screenshot", "app_label": "reviews"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 616: '{"pk": 26, "model": "contenttypes.contenttype", "fields": 
> {"model": "screenshotcomment", "name": "screenshot comment", "app_label": 
> "reviews"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 620: '{"pk": 29, "model": "contenttypes.contenttype", "fields": 
> {"model": "tool", "name": "tool", "app_label": "scmtools"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 621: '{"pk": 35, "model": "contenttypes.contenttype", "fields": 
> {"model": "trophy", "name": "trophy", "app_label": "accounts"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 623: '{"pk": 32, "model": "contenttypes.contenttype", "fields": 
> {"model": "version", "name": "version", "app_label": "django_evolution"}}*
> *'*
> *Error: UNIQUE constraint failed: django_content_type.app_label, 
> django_content_type.model*
> *Line 624: '{"pk": 39, "model": "contenttypes.contenttype", "fields": 
> {"model": "webhooktarget", "name": "webhook", "app_label": 
> "notifications"}}**'*

It then goes on counting up to 100% without further errors. However, when I 
go to one of my reviews (not all of them; the one that is failing is 
working fine on old machine), I get this response in my browser:

> Something broke! (Error 500)
> It appears something broke when you tried to go to here. This is either a 
> bug in Review Board or a server configuration error. Please report this to 
> your administrator.

and an email with the following

> Subject: [Review Board] ERROR (EXTERNAL IP): Internal Server Error: 
> /r/4441/

Body:
> *Traceback (most recent call last):*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py",
>  
> line 112, in get_response** response = wrapped_callback(request, 
> *callback_args, **callback_kwargs)*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/accounts/decorators.py",
>  
> line 23, in _check** return login_required(view_func)(*args, **kwargs)*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py",
>  
> line 22, in _wrapped_view** return view_func(request, *args, **kwargs)*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/site/decorators.py",
>  
> line 35, in _check** return view_func(request, local_site=local_site, 
> *args, **kwargs)*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/reviews/views.py",
>  
> line 781, in review_detail** 'screenshots': screenshots,*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/reviews/context.py",
>  
> line 99, in make_review_request_context** upload_diff_form = 
> UploadDiffForm(review_request, request=request)*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/reviews/forms.py",
>  
> line 127, in __init__** data, *args, **kwargs)*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/diffviewer/forms.py",
>  
> line 41, in __init__** if 
> self.repository.get_scmtool().get_diffs_use_absolute_paths():*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/models.py",
>  
> line 231, in get_scmtool** return cls(self)*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/svn/__init__.py",
>  
> line 69, in __init__** credentials = repository.get_credentials()*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/models.py",
>  
> line 284, in get_credentials** password = self.password*
>
> * File 
> "/home/reviewboard/.venv/local/lib/python2.7/site-packages/reviewboard/scmtools/models.py",
>  
> line 217, in _get_password** password = 
> decrypt_password(password).decode('utf-8')*
>
> * File "/home/reviewboard/.venv/lib/python2.7/encodings/utf_8.py", line 
> 16, in decode** return codecs.utf_8_decode(input, errors, True)*
> *UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: 
> invalid start byte*
>
>
> *<WSGIRequest*
> *path:/r/4441/,*
> *GET:<QueryDict: {}>,*
> *POST:<QueryDict: {}>,*
> *COOKIES:{'_ga': 'GA1.2.1235266689.1499048514',*
> * 'collapsediffs': 'True',*
> * 'csrftoken': '8pm9t2P5xPX9ldMTwjLvPQlzIAQrnueP',*
> * 'rbsessionid': 'xmmblawetns741llcq5yap31tf8l557p'},*
> *META:{'CONTENT_LENGTH': '',*
> * 'CONTENT_TYPE': '',*
> * 'DOCUMENT_ROOT': '/home/reviewboard/reviewboard.taitradio.net/htdocs',*
> * 'DOCUMENT_URI': '/r/4441/',*
> * 'GATEWAY_INTERFACE': 'CGI/1.1',*
> * 'HTTP_ACCEPT': 
> 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',*
> * 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',*
> * 'HTTP_ACCEPT_LANGUAGE': 
> 'en-GB,en;q=0.8,en-US;q=0.6,de-DE;q=0.4,de;q=0.2',*
> * 'HTTP_CACHE_CONTROL': 'max-age=0',*
> * 'HTTP_CONNECTION': 'keep-alive',*
> * 'HTTP_COOKIE': '_ga=GA1.2.1235266689.1499048514; collapsediffs=True; 
> csrftoken=8pm9t2P5xPX9ldMTwjLvPQlzIAQrnueP; 
> rbsessionid=xmmblawetns741llcq5yap31tf8l557p',*
> * 'HTTP_HOST': 'testrb.terminals.taitradio.net',*
> * 'HTTP_REFERER': 
> 'http://testrb.terminals.taitradio.net/account/login/?next=/r/4441/',*
> * 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',*
> * 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 
> (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36',*
> * 'HTTP_VIA': '1.1 squida.taitradio.net (squid/3.3.8)',*
> * 'HTTP_X_FORWARDED_FOR': '172.16.182.9',*
> * u'LOCAL_SITE': None,*
> * 'PATH_INFO': u'/r/4441/',*
> * 'QUERY_STRING': '',*
> * 'REDIRECT_STATUS': '200',*
> * 'REMOTE_ADDR': '172.25.47.1',*
> * 'REMOTE_PORT': '47212',*
> * 'REQUEST_METHOD': 'GET',*
> * 'REQUEST_SCHEME': 'http',*
> * 'REQUEST_URI': '/r/4441/',*
> * 'SCRIPT_NAME': u'',*
> * 'SERVER_ADDR': '172.26.156.160',*
> * 'SERVER_NAME': 'testrb.terminals.taitradio.net',*
> * 'SERVER_PORT': '80',*
> * 'SERVER_PROTOCOL': 'HTTP/1.1',*
> * 'SERVER_SOFTWARE': 'nginx/1.10.3',*
> * u'USERNAME': u'ungers',** u'USER_EMAIL': u'sebastian.unger**<AT>*
> *taitradio.com',*
> * 'wsgi.errors': <flup.server.fcgi_base.OutputStream object at 
> 0x7fbf8fcd5ad0>,*
> * 'wsgi.input': <flup.server.fcgi_base.InputStream object at 
> 0x7fbf8fcd55d0>,*
> * 'wsgi.multiprocess': False,*
> * 'wsgi.multithread': True,*
> * 'wsgi.run_once': False,*
> * 'wsgi.url_scheme': 'http',** 'wsgi.version': (1, 0)}>*


Any ideas?

Cheers,
Seb

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to