System: Ubuntu 20.04 LTS, Ciphermail 4.11, MySQL 8.0
Hello,
I have set up a new Ciphermail system following the documentation, especially
the chapter about using MySQL/MariaDB instead of Postgres.
/usr/share/djigzo/conf/database/hibernate.mysql.connection.xml contains the
correct credentials, I have checked this more than once and tested it
successfully with "mysql--password=... -u djigzo -h localhost djigzo"
BTW, the password only contains alphanumeric characters
Nevertheless, I get the following error. What confuses me most, is the line
"Caused by: java.sql.SQLException: Access denied for user 'djigzo'@'localhost'
(using password: NO)". Why isn't the application using the password?
28 May 2021 08:50:39 | INFO C3P0 using driver: org.mariadb.jdbc.Driver at URL:
jdbc:mysql://127.0.0.1:3306/djigzo
(org.hibernate.connection.C3P0ConnectionProvider) [Phoenix-Monitor]
28 May 2021 08:50:39 | INFO Connection properties: {password=****,
autocommit=false, user=djigzo}
(org.hibernate.connection.C3P0ConnectionProvider) [Phoenix-Monitor]
28 May 2021 08:50:39 | INFO autocommit mode: false
(org.hibernate.connection.C3P0ConnectionProvider) [Phoenix-Monitor]
28 May 2021 08:50:39 | INFO MLog clients using log4j logging.
(com.mchange.v2.log.MLog) [Phoenix-Monitor]
28 May 2021 08:50:39 | INFO Initializing c3p0-0.9.1.2 [built 21-May-2007
15:04:56; debug? true; trace: 10] (com.mchange.v2.c3p0.C3P0Registry)
[Phoenix-Monitor]
28 May 2021 08:50:39 | INFO Initializing c3p0 pool...
com.mchange.v2.c3p0.PoolBackedDataSource@3bb1c3ba [ connectionPoolDataSource ->
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@3bdee
ce0 [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay ->
1000, autoCommitOnClose -> false, automaticTestTable -> null,
breakAfterAcquireFailure -> false, checkoutTimeout -
> 0, connectionCustomizerClassName -> null, connectionTesterClassName ->
> com.mchange.v2.c3p0.impl.DefaultConnectionTester,
> debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -
> null, forceIgnoreUnresolvedTransactions -> false, identityToken ->
> z8kfsxah1dfo9ci132vr21|7754e457, idleConnectionTestPeriod -> 0,
> initialPoolSize -> 5, maxAdministrativeTaskTime -> 0, maxCo
nnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0,
maxPoolSize -> 50, maxStatements -> 50, maxStatementsPerConnection -> 0,
minPoolSize -> 5, nestedDataSource -> com.mch
ange.v2.c3p0.DriverManagerDataSource@f911567e [ description -> null,
driverClass -> null, factoryClassLocation -> null, identityToken ->
z8kfsxah1dfo9ci132vr21|51d17efa, jdbcUrl -> jdbc:mysql:
//127.0.0.1:3306/djigzo, properties -> {password=******, autocommit=false,
user=******} ], preferredTestQuery -> null, propertyCycle -> 0,
testConnectionOnCheckin -> false, testConnectionOnChe
ckout -> false, unreturnedConnectionTimeout -> 0,
usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName
-> null, factoryClassLocation -> null, identityToken -> z8kfsxa
h1dfo9ci132vr21|6ce1283, numHelperThreads -> 3 ]
(com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource) [Phoenix-Monitor]
28 May 2021 08:50:59 | WARN
com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@7fe7deaf --
APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
(co
m.mchange.v2.async.ThreadPoolAsynchronousRunner) [Timer-0]
28 May 2021 08:50:59 | WARN
com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@7fe7deaf --
APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@71ce8712
(com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@167672f
(com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@95e8b91
(com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@5032ca57
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@55413154
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
[email protected]/java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
[email protected]/java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
(com.mchange.v2.async.ThreadPoolAsynchronousRunner) [Timer-0]
28 May 2021 08:51:08 | WARN
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@95e8b91 --
Acquisition Attempt Failed!!! Clearing pending acquires. While trying to
acquire a needed new resource, we failed to succeed more than the maximum
number of allowed acquisition attempts (30). Last acquisition attempt
exception: (com.mchange.v2.resourcepool.BasicResourcePool)
[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0]
java.sql.SQLInvalidAuthorizationSpecException: Access denied for user
'djigzo'@'localhost' (using password: NO)
at
org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:173)
at
org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:110)
at
org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1115)
at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:502)
at
org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:154)
at org.mariadb.jdbc.Driver.connect(Driver.java:86)
at
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at
com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Caused by: java.sql.SQLException: Access denied for user 'djigzo'@'localhost'
(using password: NO)
Current charset is UTF-8. If password has been set using other charset,
consider using option 'passwordCharacterEncoding'
at
org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.authentication(AbstractConnectProtocol.java:862)
at
org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.handleConnectionPhases(AbstractConnectProtocol.java:785)
Thanks for any hints and suggestion,
Regards,
Stefan