Pi-manage createdb problem

After extensive testing in a lab environment, I got the go ahead to build out a production environment. The only difference between the two is the lab has internet access and the production environment does not. So, to install everything, there was a lot of “yum download” and “pip download” commands to get everything. Everything seems to have installed properly, but I’m running in to an issue with “pi-manage createdb”.

Every time I run it, it fails with this error:

sqlalchemy.exc.InternalError: (_mysql_exceptions.InternalError) (-1, ‘server not initialized’) (Background on this error at: http://sqlalche.me/e/2j85)

I’ve double checked, and MariaDB is running. I can log in with the privacyidea account, and access the blank privacyidea DB. I can create tables and delete them. So, the server does appear to be initialized. I’ve triple checked the URI in pi.cfg, and that looks good too. I even copied and pasted the user and pword when I logged in to make sure I didn’t fat finger something.

Any ideas? Google has been less than helpful and I’m stumped.

EDIT I used a blank VM that was provisioned already, and thought it was CentOS 7 like my lab. It was actual RHEL 7. So, that’s another difference. I’m in the process of building out a PI RHEL server to see if I can replicate the error in an environment that does have internet access.

I have not seen “server not initialized”, yet.
Hm, whatever an “initialization” of a mysql / mariadb might mean.

Are you sure you are using the correct pi.cfg file?
You can explicitly set the file, that is used. See
https://privacyidea.readthedocs.io/en/latest/installation/system/pimanage/index.html
But I suspect, that this might be a wired mariadb issue!

Yes, it’s the same pi.cfg config I used in test, without issue. I built a test RHEL server, this time using online installation methods for all packages, and got the same error. So I’m stumped. If I had known I’d be stuck with RHEL in production, and not CentOS, I would have tested with that. Oh well, I think you’re right, it’s a MariaDB / RHEL issue, since this version of MariaDB works fine w/ CentOS and PI.

I created a test RHEL box, but this time I used the stock MariaDB 5.5.6, did installed/configured everything else the same, and it worked fine. So, I removed 10.3 on the box I was using in production, put on 5.5.6, and reinstalled mysql-python so it would compile for the correct MariaDB version, and it worked.

Weird…but it works now.

1 Like