BrokenPipeError on HA Cluster when use: pi-manage createdb

Hello guys !

I followed this tutorial: SSL Master-Master Replication Ubuntu 18.04. The replication is working, I have replace the self-signed certificates by CA signed certificate.

I success creating the pi database and master 1 and it replicated on master2, then I tried to execute:
pi-manage createdb and the error below:

<SQLAlchemy engine=mysql+pymysql://pi:***@localhost/pi?charset=utf8&ssl_cert=%2Fvar%2Flib%2Fmysql%2Fclient-cert.pem&ssl_key=%2Fvar%2Flib%2Fmysql%2Fclient-key.pem>
Traceback (most recent call last):
  File "/opt/privacyidea/lib/python3.8/site-packages/pymysql/", line 705, in _write_bytes
  File "/usr/lib/python3.8/", line 1204, in sendall
    v = self.send(byte_view[count:])
  File "/usr/lib/python3.8/", line 1173, in send
    return self._sslobj.write(data)
BrokenPipeError: [Errno 32] Broken pipe

My replication is working as the log shows:

I’m stuck and for now I will continue with standalone slave. Is it because I misconfigured the certificate and the SQLALCHEMY request do not parse in a good way ? I’m a bit lost

Thanks for the help !