Hi all,
I follow the instruction on http://gerrit-documentation.googlecode.com/svn/Documentation/2.5.2/install.html to setup Gerrit 2.5.2 with mysql. But when I try to init the site, I always got follow 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 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 timed out
====================================================
* I check the mysql server, the user 'gerrit2'@'localhost' has the full rights for the reviewdb database.
* In mysql.cnf, 'bind-address = 127.0.0.1'
But why Gerrit keep complain it cannot connect to the database? Anything I miss?
Dear Team,
Even I too facing the same problem
Error message is,
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
Kindly let me know the workaround for the same.
-Mohan
--
--
To unsubscribe, email repo-discuss...@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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Alex,Could you please tell how to list the debugging steps?Below are the steps which I tried and got the error.root@mohan-ubuntu:/gitstg# java -jar gerrit-2.10.war init -d reviewdb/*** Gerrit Code Review 2.10
***
*** Git Repositories
***Location of Git repositories [/gitstg]:*** SQL Database
***Database server type [mysql]:
Server hostname [mohan-ubuntu]: mohan-ubuntu
Server port [(mysql default)]:
Database name [reviewdb]:
Database username [root]: root
Dear Sohn,
Thanks for the 2.10 guideline, But still I am facing the same problem,
This time I have tried Database as with different id(mohan.s08)
My Environment details as follows,
Operating System: Ubuntu 12.04.3 LTS – Server (64-Bit)
Kernel Version: Linux GITSERVER 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Git Version: git version 1.7.9.5
Java Version: java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~precise1)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
Mysql Version: mysql Ver 14.14 Distrib 5.5.41, for debian-linux-gnu (x86_64) using readline 6.2
My Gerrit configuration and error as follows,
root@GITSERVER:/# java -jar gerrit.war init -d /home/mohan.s08/gerrit-2.10/
*** Gerrit Code Review 2.10
***
*** Git Repositories
***
Location of Git repositories [/gitstg]:
*** SQL Database
***
Database server type [mysql]:
Server hostname [GITSERVER]:
Server port [(mysql default)]:
Database name [reviewdb]:
Database username [mohan.s08]:
Change mohan.s08's password [y/N]? N
*** Index
***
Type [LUCENE/?]:
The index must be rebuilt before starting Gerrit:
java -jar gerrit.war reindex -d site_path
*** User Authentication
***
Authentication method [OPENID/?]:
*** Review Labels
***
Install Verified label [y/N]?
*** Email Delivery
***
SMTP server hostname [localhost]:
SMTP server port [(default)]:
SMTP encryption [NONE/?]:
SMTP username :
*** Container Process
***
Run as [mohan.s08]:
Java runtime [/usr/lib/jvm/java-7-openjdk-amd64/jre]:
Upgrade /home/mohan.s08/gerrit-2.10/bin/gerrit.war [Y/n]? Y
Copying gerrit.war to /home/mohan.s08/gerrit-2.10/bin/gerrit.war
*** SSH Daemon
***
Listen on address [*]:
Listen on port [29418]:
*** HTTP Daemon
***
Behind reverse proxy [y/N]?
Use SSL (https://) [y/N]?
Listen on address [*]:
Listen on port [8081]:
Canonical URL [http://GITSERVER:8081/]:
*** Plugins
***
Install plugin commit-message-length-validator version v2.10 [y/N]? y
version v2.10 is already installed, overwrite it [y/N]? y
Install plugin download-commands version v2.10 [y/N]? y
version v2.10 is already installed, overwrite it [y/N]? y
Install plugin replication version v2.10 [y/N]? y
version v2.10 is already installed, overwrite it [y/N]? y
Install plugin reviewnotes version v2.10 [y/N]? y
version v2.10 is already installed, overwrite it [y/N]? y
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
Does my Ubuntu Server version required Ubuntu client pacakges?
Kindly help me to resolve this.
Thanks,
Mohan
On Tuesday, March 31, 2015 at 12:36:03 PM UTC+5:30, Matthias Sohn wrote:
On Tue, Mar 31, 2015 at 6:21 AM, Mohan .S <moha...@gmail.com> wrote:
Hi Alex,Could you please tell how to list the debugging steps?Below are the steps which I tried and got the error.
ro...@mohan-ubuntu:/gitstg# java -jar gerrit-2.10.war init -d reviewdb/
Team,
Above error resolved after updating the /etc/mysql/conf.d/
File from
#bind-address = 127.0.0.1
bind-address = 0.0.0.0
Now I am getting below error,
fatal: DbInjector failed
fatal: Unable to determine SqlDialect
fatal: caused by java.sql.SQLException: Access denied for user 'mohan.s08'@'gitserver' (using password: YES)
I have created Mysql user name & database from below commands,
mysql -u root -p
CREATE USER 'mohan.s08'@'localhost' IDENTIFIED BY 'mohan@321';
CREATE DATABASE reviewdb;
GRANT ALL ON reviewdb.* TO 'mohan.s08'@'localhost';
FLUSH PRIVILEGES;
Then I have switched to (mohan.s08) account and running below command, But getting above given error
mohan.s08@gitserver:/ Su mohan.s08
mohan.s08@gitserver:/ java -jar gerrit.war init -d /home/mohan.s08/gerrit-2.10/
Thanks,
Mohan
...
Hi Magnus Bäck,
Thanks for the reply,
I have created database user name with below command,
CREATE USER 'mohan.s08'@'%' IDENTIFIED BY 'mohan@321';
But it shows below error,
fatal: DbInjector failed
fatal: Unable to determine SqlDialect
fatal: caused by
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for
user 'mohan.s08'@'%' to database 'reviewdb'
mohan.s08@gitserver:/$
Thanks all,
I have updated the database permission like below command & changed the database password without special character and it got worked.
GRANT ALL ON reviewdb.* TO 'mohan.s08'@'%';
Thanks,
Mohan
Hi Team,
Now I am unable to start gerrit service, getting below error. I have installed and configured apache2
I have done the following changes to configure apache2
vi /home/username/reviewdb/etc/ gerrit.config à updated OPENID to HTTP
vi /etc/apache2/ ports.conf à updated NameVirtualHost *:8081 and Listen 8081
vi /etc/apache2/sites-available/default
Updated below lines,
ScriptAlias /cgi-bin/ /usr/www/cgi-bin/
<Directory "/usr/www/cgi-bin">
Then added below lines,
<VirtualHost *:8081>
ServerName 127.0.0.1
ServerAdmin mohan.s08@localhost
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location /login/>
AuthType Basic
AuthName "Gerrit Code Review"
Require valid-user
AuthUserFile /home/mohan.s08/htpasswd
</Location>
ProxyPass / http://127.0.0.1:8082/
ProxyPassReverse / http://127.0.0.1:8082/
ErrorLog /var/log/gerrit_error.log
</VirtualHost>
Now getting below error, when I tried to start gerrit service.
Error message:-
root@gitserver:~# /home/mohan.s08/gerrit-2.10/bin/gerrit.sh start
Starting Gerrit Code Review: FAILED
Kindly help me to solve the same.
Thanks,
Mohan