Database import from 3.0.17 to 5.0.5 failed

163 views
Skip to first unread message

Muvvala Pradeep

unread,
Aug 3, 2023, 9:53:53 PM8/3/23
to Review Board Community
Hi,

The existing review board production server is of 3.0.17 version, we are on a plan to upgrade to the latest version 5.0.5. 

Upon going through the pre-requisites, we brought a new CentOS9 server and were able to install and configure Review Board 5.0.5. However, when we import the database from 3.0.17 version to 5.0.5 using the mysqldump.

Import was successful to 5.0.5 but the log displays the below error.

[Errno 111] Connection refused
Request Method:

GET

Django Version:
3.2.20

Exception Type:

ConnectionRefusedError

Exception Value:

[Errno 111] Connection refused

Exception Location:

/usr/local/lib/python3.9/site-packages/pymemcache/client/base.py, line 424, in _connect

Python Executable:

/usr/bin/python3

Python Version:

3.9.17

Python Path:

['/var/www/reviewboard.com/conf', '/var/www/reviewboard.com/conf', '/usr/lib64/python39.zip', '/usr/lib64/python3.9', '/usr/lib64/python3.9/lib-dynload', '/usr/local/lib64/python3.9/site-packages', '/usr/local/lib/python3.9/site-packages', '/usr/lib64/python3.9/site-packages', '/usr/lib/python3.9/site-packages']


Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/utils/deprecation.py", line 116, in __call__
    response = self.process_request(request)
  File "/usr/local/lib/python3.9/site-packages/djblets/siteconfig/middleware.py", line 31, in process_request
    SiteConfiguration.objects.check_expired()
  File "/usr/local/lib/python3.9/site-packages/djblets/siteconfig/managers.py", line 116, in check_expired
    if siteconfig.is_expired():
  File "/usr/local/lib/python3.9/site-packages/djblets/siteconfig/models.py", line 343, in is_expired
    return self._gen_sync.is_expired()
  File "/usr/local/lib/python3.9/site-packages/djblets/cache/synchronizer.py", line 70, in is_expired
    sync_gen = self._get_latest_sync_gen()
  File "/usr/local/lib/python3.9/site-packages/djblets/cache/synchronizer.py", line 124, in _get_latest_sync_gen
    return cache.get(self.cache_key)
  File "/usr/local/lib/python3.9/site-packages/django/core/cache/backends/memcached.py", line 77, in get
    return self._cache.get(key, default)
  File "/usr/local/lib/python3.9/site-packages/pymemcache/client/hash.py", line 347, in get
    return self._run_cmd("get", key, default, default=default, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/pymemcache/client/hash.py", line 322, in _run_cmd
    return self._safely_run_func(client, func, default_val, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/pymemcache/client/hash.py", line 211, in _safely_run_func
    result = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/pymemcache/client/base.py", line 687, in get
    return self._fetch_cmd(b"get", [key], False, key_prefix=self.key_prefix).get(
  File "/usr/local/lib/python3.9/site-packages/pymemcache/client/base.py", line 1133, in _fetch_cmd
    self._connect()
  File "/usr/local/lib/python3.9/site-packages/pymemcache/client/base.py", line 424, in _connect
    sock.connect(sockaddr)

Exception Type: ConnectionRefusedError at /r/
Exception Value: [Errno 111] Connection refused

Christian Hammond

unread,
Aug 4, 2023, 12:38:31 AM8/4/23
to revie...@googlegroups.com
Hi Muvvala,

It looks like your memcached server is not running, or not available over the current port on the configured IP. Can you verify that it's actively running? That's the most likely problem.

Some users on some newer distros have found trouble using 'localhost' for the memcached server in some configurations, with memcached listening over IPv4 (127.0.0.1) but not IPv6, and that's impacted some setups. Appears to be more of a distro configuration problem. If this is the case, you'd need to make sure it's configured to use: -l '[::1]'

Christian

--
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/80c52b32-fe14-4b9b-8c83-402a67ba5f11n%40googlegroups.com.


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

Muvvala Pradeep

unread,
Aug 5, 2023, 12:00:27 AM8/5/23
to revie...@googlegroups.com
Hi Christian

Thanks for the response, after making the necessary changes UI is up and running. However, when I try to log in using the admin account which was created during the setup is not allowing me and returns an error message.

I googled and couldn't able to find a proper response to get rid of this error. Could you please check and let me know if this is a known issue to you and team?

Forbidden (403)

CSRF verification failed. Request aborted.

Help

Reason given for failure:

    Referer checking failed - Referer is insecure while host is secure.
    

In general, this can occur when there is a genuine Cross Site Request Forgery, or when Django’s CSRF mechanism has not been used correctly. For POST forms, you need to ensure:

  • Your browser is accepting cookies.
  • The view function passes a request to the template’s render method.
  • In the template, there is a {% csrf_token %} template tag inside each POST form that targets an internal URL.
  • If you are not using CsrfViewMiddleware, then you must use csrf_protect on any views that use the csrf_token template tag, as well as those that accept the POST data.
  • The form has a valid CSRF token. After logging in in another browser tab or hitting the back button after a login, you may need to reload the page with the form, because the token is rotated after a login.

You’re seeing the help section of this page because you have DEBUG = True in your Django settings file. Change that to False, and only the initial error message will be displayed.

You can customize this page using the CSRF_FAILURE_VIEW setting.



Thanks
Pradeep

Christian Hammond

unread,
Aug 17, 2023, 4:39:54 AM8/17/23
to revie...@googlegroups.com
I'm sorry, were you able to get past this problem?

If CSRF validation is failing, then the first thing to check is whether you are both accessing the exact hostname configured for Review Board and accessing over HTTPS since it's configured for HTTPS. This is where the validation is failing, based on the error message.

Christian

Muvvala Pradeep

unread,
Sep 10, 2023, 8:30:19 AM9/10/23
to revie...@googlegroups.com
Thanks Christian for the response, I was accessing the host over HTTP with an IP address. However, it was rectified after generating and using an HTTPS certificate with a hostname configured.

Thanks for the help. Review Board is up and running successfully.

-Pradeep

Reply all
Reply to author
Forward
0 new messages