HI, 
My system configurations are as follows: 

OS: Ubuntu 16.04
Python : 2.7.12
ReviewBoard ( currently 3.0.6 downgraded from 3.0.8)

I followed the steps as mentioned in this link to install 
Reviewboard. 
https://www.vultr.com/docs/how-to-install-review-board-on-ubuntu-16-10
After a few hiccups , I was finally able to get the site up and running. 

We are using mercurial as our code versioning system. Whenever I try to add 
a repository by providing the url and the credentials I get a 500 Error . I 
enabled Debug mode to find the root cause. 
The apache log excerpt is shown below. 

>
> [Mon Sep 03 15:16:09.751407 2018] [mpm_event:notice] [pid 3891:tid 
> 140079419901824] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 
> Python/2.7.12 configured -- resuming normal operations
> [Mon Sep 03 15:16:09.751448 2018] [core:notice] [pid 3891:tid 
> 140079419901824] AH00094: Command line: '/usr/sbin/apache2'
> [Mon Sep 03 09:46:51.821313 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968] ERROR:djblets.log.middleware:Exception thrown for user 
> admin at http://205.147.97.28/admin/db/scmtools/repository/add/
> [Mon Sep 03 09:46:51.821368 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968] 
> [Mon Sep 03 09:46:51.821378 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968] from_buffer() cannot return the address of the raw string 
> within a str or unicode or bytearray object
> [Mon Sep 03 09:46:51.821400 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968] Traceback (most recent call last):
> [Mon Sep 03 09:46:51.821409 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 
> 112, in get_response
> [Mon Sep 03 09:46:51.821420 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     response = wrapped_callback(request, *callback_args, 
> **callback_kwargs)
> [Mon Sep 03 09:46:51.821429 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py", 
> line 465, in wrapper
> [Mon Sep 03 09:46:51.821446 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     return self.admin_site.admin_view(view)(*args, 
> **kwargs)
> [Mon Sep 03 09:46:51.821456 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 
> 99, in _wrapped_view
> [Mon Sep 03 09:46:51.821466 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     response = view_func(request, *args, **kwargs)
> [Mon Sep 03 09:46:51.821490 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py", 
> line 52, in _wrapped_view_func
> [Mon Sep 03 09:46:51.821500 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     response = view_func(request, *args, **kwargs)
> [Mon Sep 03 09:46:51.821510 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py", 
> line 198, in inner
> [Mon Sep 03 09:46:51.821521 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     return view(request, *args, **kwargs)
> [Mon Sep 03 09:46:51.821531 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 
> 29, in _wrapper
> [Mon Sep 03 09:46:51.821554 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     return bound_func(*args, **kwargs)
> [Mon Sep 03 09:46:51.821564 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 
> 99, in _wrapped_view
> [Mon Sep 03 09:46:51.821573 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     response = view_func(request, *args, **kwargs)
> [Mon Sep 03 09:46:51.821583 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 
> 25, in bound_func
> [Mon Sep 03 09:46:51.821593 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     return func(self, *args2, **kwargs2)
> [Mon Sep 03 09:46:51.821603 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 
> 371, in inner
> [Mon Sep 03 09:46:51.821622 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     return func(*args, **kwargs)
> [Mon Sep 03 09:46:51.821631 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py", 
> line 1147, in add_view
> [Mon Sep 03 09:46:51.821650 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     new_object = self.save_form(request, form, 
> change=False)
> [Mon Sep 03 09:46:51.821660 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py", 
> line 887, in save_form
> [Mon Sep 03 09:46:51.821669 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     return form.save(commit=False)
> [Mon Sep 03 09:46:51.821678 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/forms.py", 
> line 1216, in save
> [Mon Sep 03 09:46:51.821687 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     repository.password = self.cleaned_data['password'] or 
> ''
> [Mon Sep 03 09:46:51.821696 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/models.py", 
> line 195, in _set_password
> [Mon Sep 03 09:46:51.821705 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     encrypt_password(value.encode('utf-8')))
> [Mon Sep 03 09:46:51.821714 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/crypto_utils.py",
>  
> line 151, in encrypt_password
> [Mon Sep 03 09:46:51.821723 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     return base64.b64encode(aes_encrypt(password, key=key))
> [Mon Sep 03 09:46:51.821732 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/crypto_utils.py",
>  
> line 91, in aes_encrypt
> [Mon Sep 03 09:46:51.821740 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     return iv + encryptor.update(data) + 
> encryptor.finalize()
> [Mon Sep 03 09:46:51.821749 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/ciphers/base.py",
>  
> line 149, in update
> [Mon Sep 03 09:46:51.821758 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     return self._ctx.update(data)
> [Mon Sep 03 09:46:51.821767 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/ciphers.py",
>  
> line 120, in update
> [Mon Sep 03 09:46:51.821776 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     n = self.update_into(data, buf)
> [Mon Sep 03 09:46:51.821785 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]   File 
> "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/ciphers.py",
>  
> line 131, in update_into
> [Mon Sep 03 09:46:51.821794 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968]     "unsigned char *", self._backend._ffi.from_buffer(buf)
> [Mon Sep 03 09:46:51.821803 2018] [wsgi:error] [pid 3895:tid 
> 140079049651968] TypeError: from_buffer() cannot return the address of the 
> raw string within a str or unicode or bytearray object
> [Mon Sep 03 15:18:58.031499 2018] [mpm_event:notice] [pid 3891:tid 
> 140079419901824] AH00491: caught SIGTERM, shutting down
> [Mon Sep 03 15:19:22.410635 2018] [wsgi:warn] [pid 4083:tid 
> 140186792970112] mod_wsgi: Compiled for Python/2.7.11.
> [Mon Sep 03 15:19:22.410829 2018] [wsgi:warn] [pid 4083:tid 
> 140186792970112] mod_wsgi: Runtime using Python/2.7.12.
> [Mon Sep 03 15:19:22.416353 2018] [mpm_event:notice] [pid 4083:tid 
> 140186792970112] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 
> Python/2.7.12 configured -- resuming normal operations
> [Mon Sep 03 15:19:22.416395 2018] [core:notice] [pid 4083:tid 
> 140186792970112] AH00094: Command line: '/usr/sbin/apache2'
> [Mon Sep 03 09:49:50.608132 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744] ERROR:djblets.log.middleware:Exception thrown for user 
> admin at http://205.147.97.28/admin/db/scmtools/repository/add/
> [Mon Sep 03 09:49:50.608182 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744] 
> [Mon Sep 03 09:49:50.608194 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744] from_buffer() cannot return the address of the raw string 
> within a str or unicode or bytearray object
> [Mon Sep 03 09:49:50.608204 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744] Traceback (most recent call last):
> [Mon Sep 03 09:49:50.608226 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 
> 112, in get_response
> [Mon Sep 03 09:49:50.608237 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     response = wrapped_callback(request, *callback_args, 
> **callback_kwargs)
> [Mon Sep 03 09:49:50.608247 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py", 
> line 465, in wrapper
> [Mon Sep 03 09:49:50.608258 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     return self.admin_site.admin_view(view)(*args, 
> **kwargs)
> [Mon Sep 03 09:49:50.608268 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 
> 99, in _wrapped_view
> [Mon Sep 03 09:49:50.608278 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     response = view_func(request, *args, **kwargs)
> [Mon Sep 03 09:49:50.608288 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py", 
> line 52, in _wrapped_view_func
> [Mon Sep 03 09:49:50.608298 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     response = view_func(request, *args, **kwargs)
> [Mon Sep 03 09:49:50.608308 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py", 
> line 198, in inner
> [Mon Sep 03 09:49:50.608318 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     return view(request, *args, **kwargs)
> [Mon Sep 03 09:49:50.608328 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 
> 29, in _wrapper
> [Mon Sep 03 09:49:50.608338 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     return bound_func(*args, **kwargs)
> [Mon Sep 03 09:49:50.608348 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 
> 99, in _wrapped_view
> [Mon Sep 03 09:49:50.608358 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     response = view_func(request, *args, **kwargs)
> [Mon Sep 03 09:49:50.608368 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 
> 25, in bound_func
> [Mon Sep 03 09:49:50.608378 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     return func(self, *args2, **kwargs2)
> [Mon Sep 03 09:49:50.608387 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 
> 371, in inner
> [Mon Sep 03 09:49:50.608397 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     return func(*args, **kwargs)
> [Mon Sep 03 09:49:50.608407 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py", 
> line 1147, in add_view
> [Mon Sep 03 09:49:50.608417 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     new_object = self.save_form(request, form, 
> change=False)
> [Mon Sep 03 09:49:50.608427 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py", 
> line 887, in save_form
> [Mon Sep 03 09:49:50.608437 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     return form.save(commit=False)
> [Mon Sep 03 09:49:50.608447 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/forms.py", 
> line 1216, in save
> [Mon Sep 03 09:49:50.608457 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     repository.password = self.cleaned_data['password'] or 
> ''
> [Mon Sep 03 09:49:50.608467 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/models.py", 
> line 195, in _set_password
> [Mon Sep 03 09:49:50.608477 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     encrypt_password(value.encode('utf-8')))
> [Mon Sep 03 09:49:50.608492 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/crypto_utils.py",
>  
> line 151, in encrypt_password
> [Mon Sep 03 09:49:50.608502 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     return base64.b64encode(aes_encrypt(password, key=key))
> [Mon Sep 03 09:49:50.608513 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/crypto_utils.py",
>  
> line 91, in aes_encrypt
> [Mon Sep 03 09:49:50.608523 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     return iv + encryptor.update(data) + 
> encryptor.finalize()
> [Mon Sep 03 09:49:50.608533 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/ciphers/base.py",
>  
> line 149, in update
> [Mon Sep 03 09:49:50.608543 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     return self._ctx.update(data)
> [Mon Sep 03 09:49:50.608553 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/ciphers.py",
>  
> line 120, in update
> [Mon Sep 03 09:49:50.608563 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     n = self.update_into(data, buf)
> [Mon Sep 03 09:49:50.608573 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]   File 
> "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/ciphers.py",
>  
> line 131, in update_into
> [Mon Sep 03 09:49:50.608583 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744]     "unsigned char *", self._backend._ffi.from_buffer(buf)
> [Mon Sep 03 09:49:50.608594 2018] [wsgi:error] [pid 4086:tid 
> 140186583295744] TypeError: from_buffer() cannot return the address of the 
> raw string within a str or unicode or bytearray object
> ^C



I am not able to get any help from other sites regarding this error . 
I have tried uninstalling and reinstalling libraries of paramiko, 
cryptography netmiko and tried various versions of paramiko i.e 1.17.0, 
1.18.0 . But i am unable to add the repository. Any help is much 
appreciated. 
I am unable to figure out the root cause of this issue. 

Thanks
Raveesh

-- 
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 
"Review Board Community" 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