more gerrit & mysql

84 views
Skip to first unread message

Lamar Hansford

unread,
Jan 6, 2017, 2:48:55 PM1/6/17
to Repo and Gerrit Discussion
I cannot seem to connect to mysql on gerrit init

My setup:
  • Ubuntu 16.04.1 (x86_64)
  • Gerrit 2.13.5 / 2.13.4
  • MySQL 5.7.16  (x86_64)
I have verified MYSQL configuration using 'gerrit2' user:
  • mysql -P 3306 -h localhost -u gerrit2 -p reviewdb
I verified gerrit configuration....

gerrit.config:
[database]
        type = mysql
        hostname = localhost
        port = 3306
        database = reviewdb
        username = gerrit2
[container]
        user = gerrit2
        javaHome = /usr/lib/jvm/java-8-openjdk-amd64/jre

secure.config: contains valid password


Command line:
  • java -jar gerrit-2.13.5.war init -d /opt/gerrit2/
Error:


fatal: DbInjector failed
fatal: Unable to determine SqlDialect
fatal:   caused by com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
fatal:
fatal: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
fatal:   caused by java.net.ConnectException: Connection refused (Connection refused)

Any ideas?

Thanks in advance,
-Lamar



Saša Živkov

unread,
Jan 6, 2017, 6:51:26 PM1/6/17
to Lamar Hansford, Repo and Gerrit Discussion
Have you checked the error_log for a corresponding entry?

Thanks in advance,
-Lamar



--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lamar Hansford

unread,
Jan 6, 2017, 7:17:05 PM1/6/17
to Repo and Gerrit Discussion, lamarh...@yahoo.com
  • There are no logs in the gerrit install directory (logs).  Nor are there nay logs in  /var/logs.
  • The MySQL log has no corresponding 'rejected' message.  This suggests that MySQL is not receiving the login request.
Is there  any way to turn on logging to see what address it is attempting to connect to?

Saša Živkov

unread,
Jan 9, 2017, 5:15:40 AM1/9/17
to Lamar Hansford, Repo and Gerrit Discussion
On Sat, Jan 7, 2017 at 1:17 AM, 'Lamar Hansford' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
  • There are no logs in the gerrit install directory (logs).  Nor are there nay logs in  /var/logs.
This is because the error happens before the logging is initialized. 
  • The MySQL log has no corresponding 'rejected' message.  This suggests that MySQL is not receiving the login request.
Is there  any way to turn on logging to see what address it is attempting to connect to?

Instead of using bin/gerrit.sh, start Gerrit using the following command:

$ java -jar bin/gerrit.war daemon --show-stack-trace

this will print the exception stack trace to the stdout.
Reply all
Reply to author
Forward
0 new messages