Troubleshooting GitCentric

This section describes some troubleshooting tools and techniques you can use to help resolve issues you might encounter when starting and running GitCentric.

For information about debugging using the kandoMaintain utility, see Debugging using kandoMaintain.

Login issues

This section describes what to check if you cannot log in.

If your first attempt to connect to the GitCentric Web UI server fails with an error such as Unable to Connect (Firefox), The webpage cannot be displayed (Internet Explorer), This webpage is not available (Chrome), or something similar, check that:

  • Your syntax is correct. For example: http://localhost:8080/gitcentric.
  • You are actually pointing to the GitCentric server. For example, are you specifying localhost:8080 when the web server is actually installed on a remote machine?
  • Your network connection is working.
  • The Tomcat server needs to be restarted. There is a known issue with re-installations requiring that you stop and start the Tomcat server when the installation is done:
    <tomcat_home>/bin/shutdown.sh
    <tomcat_home>/bin/startup.sh
  • The Tomcat deployment config file, conf/Catalina/localhost/gitcentric.xml, is correct.

If you can see the initial connection dialog (described in Initial Initial GitCentric Log In), but it is rejecting the values you enter, double-check that you are specifying the correct server and port values, and particularly that you are specifying the complete path to the AccuRev client executable on that server.

If you can see the login dialog, but get Invalid User name or password errors, check the usual credential details like correct spelling and proper password, and if these look correct, extend your troubleshooting to see if the AccuRev Server is actually up and running, and that its license server is also up and running. (“Username and password” errors can sometimes be caused by factors beyond the login credentials.) Test that you can actually log directly into the AccuRev Server with the same credentials.

If you still have problems, proceed through the following troubleshooting procedures and suggestions.

Back to top

General: The Tomcat Logs

An effective troubleshooting tool, once you get past the basic installation and get the GitCentric installation up and running, are the Tomcat server logs.

Whenever something is not working right, your first step should be checking these logs. The logs files are listed in order of relevance:

<tomcat_install>/logs/kandoBridge.log
<tomcat_install>/logs/kandoGerrit.log
<tomcat_install>/logs/catalina.out
<tomcat_install>/logs/localhost.<date>.log

You should cd to the Tomcat logs directory, and dump out the last several lines from the most recent log files. For example:

> tail -75 kandoBridge.log|more

Scroll through and look for error messages that can help point you to problems with ports or database names, or missing directories, and so on.

Example: One common error is You are not authorized to use the -U option., which appears when files fail to appear in the AccuRev stream after being pushed from Git. This indicates that there is a problem with the ASSIGN_USER_PRIVILEGE setting in acserver.cnf.

Note:  

You can modify the settings in the following file to control the level of details logged:

<tomcat_home>/webapps/[kandoBridge | gitcentric]/WEB-INF/classes/log4j.properties

You can also check the AccuRev Server logs:

<ac_home>/storage/site_slice/logs/acserver.log
<ac_home>/storage/site_slice/logs/trigger.log
<gc_home>/site/logs/sshd.log

Back to top

Troubleshoot the servers

This section describes how to check the various servers and database.

Tomcat Server

To confirm if the Tomcat web server is running at all, from a web browser running on the server, enter:

http://localhost:8080

If you get the generic Apache Software Foundation page, the Tomcat server is at least is running, and your problem is further downstream.

Note: If you have multiple Tomcat installations, this could cause the GitCentric installation to hang. Set $CATALINA_HOME to point to the Tomcat which is supposed to work with GitCentric.

AccuRev Server

To confirm if the AccuRev Server is running and configured, try logging in from the AccuRev Command Line Interface:

> accurev login

If you get a Connection refused...AccuRev Error: 1 message, try starting the server with:

> <ac_home>/bin/acserverctl start

AccuRev PostgreSQL database

To confirm if the AccuRev PostgreSQL database is running and recognizes the GitCentric database:

> <ac_home>/postgresql/bin/psql -h localhost -U postgres -p 5075 -l

That last argument is hyphen-lower-case-el, not hyphen-numeral-one.

You should get a display showing all databases and their owners. If AccuRev appears in this list but kando does not, you need to re-examine the installation steps (or your manual steps) executing the kandoMaintain command. If you cannot bring up this list at all, you need to re-examine your steps installing and starting the AccuRev Server (which also install and start the PostgreSQL server).

Back to top

Troubleshoot the general settings

There are several components that need to work together in a successful GitCentric installation. Check the following items:

  • ASSIGN_USER_PRIVILEGE is defined in acserver.cnf for the AccuRev Server, and that you restart the AccuRev Server after defining or changing it.
  • The two .WAR files have expanded in the Tomcat webapps directory, creating directories named gitcentric and kandoBridge.
  • <gc_home>/dbsettings.conf exists and contains valid entries for the database port (typically localhost:5075), and database username/password (typically postgres | postgres unless you change these for security reasons).
  • Your AccuRev Server contains properly installed and configured triggers files (see Install the AccuRev trigger).
  • You clear your browser cache after updating to the latest .WAR files.

Also, remember that Git, unlike AccuRev, does not track empty directories.

Finally, experienced Gerrit users may recognize that GitCentric includes a Gerrit Code Review installation, although some details may be modified or ignored in the GitCentric environment. For example, certain code review installation values (such as the httpd jetty web server port setting) are not used in the GitCentric environment.

Back to top

LD_LIBRARY_PATH: psql shared library error

This section describes the LD_LIBRARY_PATH: psql shared library error.

This error indicates that the LD_LIBRARY_PATH is wrong. Normally, it is done automatically by the GitCentric installer, but if you try to run the psql command and get an error regarding libpq.so.5, update your LD_LIBRARY_PATH to point to the lib subdirectory under the AccuRev version of PostgreSQL:

> export LD_LIBRARY_PATH=<ac_home>/postgresql/lib:$LD_LIBRARY_PATH

where <ac_home> is the directory where AccuRev is installed.

Back to top

ASSIGN_USER_PRIVILEGE and CC_USER

This section describes the ASSIGN_USER_PRIVILEGE and CC_USER settings.

GitCentric requires that the acserver.cnf file on each AccuRev Server that has streams mapped to Git branches via GitCentric contains a setting called ASSIGN_USER_PRIVILEGE. Existing AccuRev installations that included early releases of GitCentric, or which made use of the AccuRev ClearCase Adapter product, may have a similar setting in this file named CC_USER. If this setting is in use, the following rule applies:

If you specify both CC_USER and ASSIGN_USER_PRIVILEGE, the CC_USER takes precedence.

Back to top