Unable to login into new Reviewboard Server due to ReviewBoard upgrade

61 views
Skip to first unread message

renuka

unread,
Nov 7, 2023, 4:18:47 AM11/7/23
to Review Board Community
Hi,

I have upgraded reviewboard and migrated the database to new server using docker-compose method.
The reviewboard server is up but unable to login

Old Reviewboard: 1.7.27
Database: mysql

I took mysql dump of old server
$mysqldump -h localhost -u root -p -d reviewboard > /tmp/reviewboard.sql

restore the dump
$mysql -h localhost -u root -p reviewboard < /tmp/reviewboard.sql

And executed following steps
Inside reviewboard container 
$ rb-site upgrade /site
$rb-site manage /site migrate

And $rb-site manage /site condensediffs 
Showing error 
File "/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
    return self.cursor.execute(query, args)
  File "/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 179, in execute
    res = self._query(mogrified_query)
  File "/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 330, in _query
    db.query(q)
  File "/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 255, in query
    _mysql.connection.query(self, query)
django.db.utils.OperationalError: (1054, "Unknown column 'diffviewer_filediff.raw_diff_hash_id' in 'where clause'")


I am unable to login with the new dump

What might be the issue ?
How can we migrate database from old sever to new server

Thanks
Renuka

Christian Hammond

unread,
Nov 7, 2023, 4:28:14 AM11/7/23
to revie...@googlegroups.com
Hi Renuka,

It doesn't look like you ended up upgrading the database, so it's not finding that column.

The 'migrate' command isn't something Review Board supports, and should not be run. The 'rb-site upgrade' command is responsible for handling all aspects of your database upgrade.

I'd have to know more about what the upgrade outputted, and how you created/prepared the database, but I can offer these suggestions:

1. Make sure that you are not trying to re-import a MySQL dump into a database that has already been populated with Review Board. You will need to completely erase the destination database, create a blank database in its place, and then perform the import. Otherwise you are mixing old and new state.

2. Make sure you have copied your old site directory to the new one. In particular, the conf/ directory's settings_local.py must be copied over (you can change the database configuration, but some other settings, like SECRET_KEY, must remain the same between installs).

3. After the import, run the 'rb-site upgrade' command. If this fails at all, then stop what you're doing, save the log file it generates, and then contact us. Depending on the nature of the problem, you may need to sign up for a support contract with us in order to fully resolve the issue. But if it's something simple where we can point you in the right direction, we will do so. Once it's in a failed state, you won't be able to resolve it by running other commands.

4. Don't run the 'migrate' command or 'evolve' command. Only 'rb-site upgrade'. The 'migrate' command runs only part of the upgrade operation, and must be managed by 'rb-site upgrade' or you risk an incomplete upgrade.

I'd suggest re-creating the database, following the above, and then being very careful to record all output and the log from the upgrade operation if it still fails.

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/366a45e9-7624-4d0b-8990-2292bacd255bn%40googlegroups.com.


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

renuka

unread,
Nov 14, 2023, 11:58:31 PM11/14/23
to Review Board Community
Hi Christian Hammod

Thank you for your inputs, and I could able to upgrade reviewboard 6.0.2.
but unable to login with ldap credentials.

No error log displayed.

How to proceed further.

Thanks
Renuka
Reply all
Reply to author
Forward
0 new messages