Upgrading 2.2.5: Mysqldb issue


#1

Hello

I am testing out upgrading from 2.2.5 to current. I have install rccontrol, and made a copy of my production.ini
Running rccontrol import Enterprise production.ini gives me the following error.
│ImportError: No module named MySQLdb
I can confirm that python 2.7 is installed. I can import the MySQLdb module into python when I run it. However, I am guessing that Rhodecode is using it’s own virtual env.
Any ideas how to fix?

Mark


#2

Can you show the whole traceback ?

Also do you maybe use some alternative drivers for mysql in 2.2.5 ?
What’s the db1.url= value used ?


#3

Thanks for this.

The db1 value is sqlalchemy.db1.url = mysql://rhodecode:xxxxx@fqdn.of.db.server:3306/rhodecode-temp
( I have removed the password and changed the address, but it is a fqdn, not localhost.

The command I am using
rccontrol import Enterprise /var/lib/rhodecode/production.ini

Default port to start the instance.

This can be changed inside /var/lib/rhodecode/.rccontrol/enterprise-1/rhodecode.ini config later by modifying port= parameter.
Port for the RhodeCode Enterprise server to use [5000]: 5001
Traceback (most recent call last):
File “/opt/rhodecode/store/z3ivg38502cis43a9s4yccdddyy0a22j-python2.7-rhodecode-control-1.22.0/bin/…rccontrol-wrapped-wrapped”, line 12, in
sys.exit(cmd())
File “/opt/rhodecode/store/z3ivg38502cis43a9s4yccdddyy0a22j-python2.7-rhodecode-control-1.22.0/lib/python2.7/site-packages/rccontrol/main.py”, line 54, in cmd
File “/opt/rhodecode/store/yww9rmp41h1i5kibgh1ag3kn8ixn684m-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/opt/rhodecode/store/yww9rmp41h1i5kibgh1ag3kn8ixn684m-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/opt/rhodecode/store/yww9rmp41h1i5kibgh1ag3kn8ixn684m-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/rhodecode/store/yww9rmp41h1i5kibgh1ag3kn8ixn684m-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/rhodecode/store/yww9rmp41h1i5kibgh1ag3kn8ixn684m-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/rhodecode/store/yww9rmp41h1i5kibgh1ag3kn8ixn684m-python2.7-click-7.0/lib/python2.7/site-packages/click/decorators.py”, line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File “/opt/rhodecode/store/yww9rmp41h1i5kibgh1ag3kn8ixn684m-python2.7-click-7.0/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/rhodecode/store/z3ivg38502cis43a9s4yccdddyy0a22j-python2.7-rhodecode-control-1.22.0/lib/python2.7/site-packages/rccontrol/_import.py”, line 60, in cmd
File “/opt/rhodecode/store/z3ivg38502cis43a9s4yccdddyy0a22j-python2.7-rhodecode-control-1.22.0/lib/python2.7/site-packages/rccontrol/lib/utils.py”, line 430, in wrapper
File “/opt/rhodecode/store/z3ivg38502cis43a9s4yccdddyy0a22j-python2.7-rhodecode-control-1.22.0/lib/python2.7/site-packages/rccontrol/_import.py”, line 100, in main
File “/opt/rhodecode/store/z3ivg38502cis43a9s4yccdddyy0a22j-python2.7-rhodecode-control-1.22.0/lib/python2.7/site-packages/rccontrol/lib/context.py”, line 2074, in import_cli_get_params
File “/opt/rhodecode/store/z3ivg38502cis43a9s4yccdddyy0a22j-python2.7-rhodecode-control-1.22.0/lib/python2.7/site-packages/rccontrol/lib/utils.py”, line 277, in check_db_connection
File “/opt/rhodecode/store/w86lbfsp9kyqn32ny5f2k9ilcdq9fzah-python2.7-sqlalchemy-1.1.18/lib/python2.7/site-packages/sqlalchemy/engine/init.py”, line 391, in create_engine
return strategy.create(*args, **kwargs)
File “/opt/rhodecode/store/w86lbfsp9kyqn32ny5f2k9ilcdq9fzah-python2.7-sqlalchemy-1.1.18/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py”, line 80, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File “/opt/rhodecode/store/w86lbfsp9kyqn32ny5f2k9ilcdq9fzah-python2.7-sqlalchemy-1.1.18/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/mysqldb.py”, line 110, in dbapi
return import(‘MySQLdb’)
ImportError: No module named MySQLdb


#4

Ok, we’ve broken this :frowning:

Seems import is missing required drivers, please run rccontrol self-update to update to 1.22.1 release that we pushed just now to fix the DB drivers issue.

Best !


#5

Thanks.

Any how long it takes to hit the servers?

Mark


#6

It should be there already. You’re not seeing new release ?


#7

I can now and it is imported. Thanks!