Installing on CentOS8 or RHEL8

110 views
Skip to first unread message

Josh Davis

unread,
Jan 6, 2022, 1:25:34 PM1/6/22
to Review Board Community
We have upgraded all of our servers to RHEL8 and I am trying to get ReviewBoard installed. In the past (RHEL7) we installed ReviewBoard from an rpm package.  I can't find one that works with RHEL8. Is there one I have missed?

David Trowbridge

unread,
Jan 6, 2022, 1:26:39 PM1/6/22
to reviewboard
Josh,

The RPM hasn't been maintained in a very long time. Installing via the python toolchain is the best way to get running and stay up to date.

David

On Thu, Jan 6, 2022 at 11:25 AM Josh Davis <jos...@gmail.com> wrote:
We have upgraded all of our servers to RHEL8 and I am trying to get ReviewBoard installed. In the past (RHEL7) we installed ReviewBoard from an rpm package.  I can't find one that works with RHEL8. Is there one I have missed?

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/c8f30c92-6789-41fd-8ab3-f494a1ce8101n%40googlegroups.com.

Josh Davis

unread,
Jan 8, 2022, 12:46:31 PM1/8/22
to Review Board Community
Thanks, David. I'll head down that road.

Josh Davis

unread,
Jan 18, 2022, 3:51:19 PM1/18/22
to Review Board Community
I'm struggling on the installation. This is for a Red Hat 8 machine that has python 3.6 and python 2.7 on it. I've tried installing it with:
python3 -m pip install reviewboard. It seems to work. When I run through rb-site install /some/file/path I always end up with this:

  Installing the site...
—————————————————————

Building site directories ... OK
Building site configuration files ... OK
Creating database ... ERROR: <class 'bytes'>
Creating administrator account ... ERROR: <class 'bytes'>
Saving site settings ... ERROR: <class 'bytes'>
Setting up support ... OK
Finishing the install ... ERROR: <class 'bytes'>

Visiting the URL for my server brings up a 500 error. This is what I find in the error log:
[Tue Jan 18 20:47:42.795685 2022] [wsgi:error] [pid 320003:tid 140336662296320] [client 127.0.0.1:46036] Could not load siteconfig: <class 'bytes'>

Any ideas?

Christian Hammond

unread,
Jan 19, 2022, 9:08:14 PM1/19/22
to revie...@googlegroups.com
Not sure what would be printing that...

Let's do a quick test:

$ rb-site manage /path/to/sitedir shell
from reviewboard import initialize
initialize()


Let's see if any or all of that passes. If something doesn't, there should at least be a more useful backtrace.

Also, can you show me what `rb-site --version` says?

Christian



--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Josh Davis

unread,
Jan 20, 2022, 2:29:25 PM1/20/22
to Review Board Community
Here is the version:
------------------------------------------------------
[root@XXXXXXXX ~] # rb-site --version
Review Board/rb-site 4.0.4
Python 3.6.8 (default, Sep 9 2021, 07:49:02)
Installed to /usr/local/lib64/python3.6/site-packages/reviewboard



Here is what happens when I try to initialize the site:
----------------------------------------------------------
[root@XXXXXXXX ~]# rb-site manage /var/www/html shell
/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py:119: PkgResourcesDeprecationWarning: 4.0.0-unsupported is an invalid version and will not be supported in a future release
PkgResourcesDeprecationWarning,
ERROR:reviewboard.admin.siteconfig:Could not load siteconfig: <class 'bytes'>
Traceback (most recent call last):
File "/usr/local/bin/rb-site", line 11, in <module>
sys.exit(main())
File "/usr/local/lib64/python3.6/site-packages/reviewboard/cmdline/rbsite.py", line 2732, in main
command.run(site, options)
File "/usr/local/lib64/python3.6/site-packages/reviewboard/cmdline/rbsite.py", line 2488, in run
initialize()
File "/usr/local/lib64/python3.6/site-packages/reviewboard/__init__.py", line 175, in initialize
siteconfig = SiteConfiguration.objects.get_current()
File "/usr/local/lib/python3.6/site-packages/djblets/siteconfig/managers.py", line 42, in get_current
return self.get_for_site_id(Site.objects.get_current().pk)
File "/usr/local/lib/python3.6/site-packages/django/contrib/sites/models.py", line 63, in get_current
return self._get_site_by_id(site_id)
File "/usr/local/lib/python3.6/site-packages/django/contrib/sites/models.py", line 35, in _get_site_by_id
site = self.get(pk=site_id)
File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 374, in get
num = len(clone)
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 232, in __len__
self._fetch_all()
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 1121, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 53, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 887, in execute_sql
cursor = self.connection.cursor()
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 254, in cursor
return self._cursor()
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 229, in _cursor
self.ensure_connection()
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
self.connect()
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 189, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 276, in get_new_connection
conn.encoders[SafeBytes] = conn.encoders[bytes]
KeyError: <class 'bytes'>

Some more info that might be useful:
  • My installation process was as follows (as root user):
    • yum install gcc python3-devel libffi-devel openssl-devel memcached patch git-core mod_wsgi
      • I had to change python-devel to python3-devel
      • On Red Hat 8, mod_wsgi will install python3-mod_wsgi. Not sure if this is an issue.
    • python3 -m pip install mysqlclient
    • python3 -m pip install ReviewBoard
    • rb-site install /var/www/html
    • cp /var/www/html/conf/apache-wsgi.conf /etc/httpd/conf.d/apache-wsgi.conf
    • systemctl restart httpd
  • I have created a database named reviewboard on a mariadb server.
  • I have confirmed that I am able to connect to this db from the terminal of this webserver.

Subodh Konhor

unread,
Jan 20, 2022, 3:19:36 PM1/20/22
to revie...@googlegroups.com
Hi Josh,

I too faced this issue and found latest mysqlclient was not compatible with django 1.11. 

I had to downgrade mysqlclient from 2.1.0 to 2.0.3. 

If you have a staging system you can try to downgrade and check.

Thanks.

Josh Davis

unread,
Jan 20, 2022, 3:24:07 PM1/20/22
to Review Board Community


Subodh,

That did the trick!  Thanks for the help! I've been banging my head against this one for way too long.

Josh

Christian Hammond

unread,
Jan 20, 2022, 3:47:05 PM1/20/22
to revie...@googlegroups.com
Ahh yep. That’s exactly it. There’s a long story there, but it amounts to some backwards-compatibility in mysqlclient that was removed.

We’re putting out a build of Django Evolution next week that will solve this for good.

Christian


--
Reply all
Reply to author
Forward
0 new messages