While investigating issues with gerrit we found this on the logs:
er.java:61)\n\tat Main.main(Main.java:24)\nCaused by: java.sql.SQLException: Access denied for user 'gerritro'@'10.64.32.156' (using password: YES)\n\tat com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)\n\tat com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1694)\n\tat com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1244)\n\tat com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2397)\n\tat com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)\n\tat com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)\n\tat com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)\n\tat com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:423)\n\tat com.mysql.jdbc.Util.handleNewInstance(Util.java:411)\n\tat com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)\n\tat com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)\n\tat com.google.gwtorm.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:104)\n\tat com.google.gwtorm.jdbc.Database.<init>(Database.java:74)\n\t... 34 more\n\n3 errors\n\tat com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543)\n\tat com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)\n\tat com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)\n\tat com.google.inject.Guice.createInjector(Guice.java:87)\n\tat com.google.gerrit.pgm.util.SiteProgram.createDbInjector(SiteProgram.java:188)\n\t... 11 more","exception_class":"com.google.gerrit.common.Die","exception_message":"Unable to determine SqlDialect\n caused by java.sql.SQLException: Access denied for user 'gerritro'@'10.64.32.156' (using password: YES)"},"source_host":"gerrit1002","method":"run","level":"ERROR","message":"Unable to start daemon","mdc":{},"@timestamp":"2020-01-27T22:57:52.011Z","file":"Daemon.java","line_number":"294","thread_name":"main","@version":1,"logger_name":"com.google.gerrit.pgm.Daemon","class":"com.google.gerrit.pgm.Daemon"}
The gerritro is a test user created at T239151 https://gerrit.wikimedia.org/r/#/c/operations/puppet/+/563302/
My guess is that it is using the wrong password on the gerrit side?
I have been able to use the password on the pw repo and it works:
root@cumin1001:~# mysql --skip-ssl -ugerritro -p -hdbproxy1007 Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 88465738 Server version: 10.1.39-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. gerritro@dbproxy1007[(none)]> use reviewdb Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed gerritro@dbproxy1007[reviewdb]> show tables; +-----------------------------+ | Tables_in_reviewdb | +-----------------------------+ | account_external_ids | | account_group_by_id | | account_group_by_id_aud | | account_group_id | | account_group_members | | account_group_members_audit | | account_group_names | | account_groups | | account_id | | accounts | | change_id | | change_messages | | changes | | patch_comments | | patch_set_approvals | | patch_sets | | schema_version | | system_config | +-----------------------------+ 18 rows in set (0.00 sec)