Troubleshooting

General information on troubleshooting can be found in the FAQ.

1. I need help installing MySQL DBMS

There is simply too much information on DBMS installation for us to provide useful tips. In general, a binary package with a native installer (e.g., RPM, PKG, etc.) is the best option if you have root privileges. A binary package without a native installer is an excellent option if you do not have root privileges. And if all else fails, you can always try source installers. We have found most source installers of the DBMS to be reliable.

We have used RLS with MySQL versions 4.0.x, 4.1.x, and 5.0.x.

2. How can I check if MySQL is installed correctly?

There are probably numerous things you could do, but one simple check is to see if you can log on to the database. Of course, this requires that you have a user account. Assuming you installed the DBMS yourself, you should be able to log on as root:

% /path/to/mysql/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 64 to server version: 4.0.18-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+-------------------+
| Database          |
+-------------------+
| mysql             |
| test              |
+-------------------+
2 rows in set (0.03 sec)

mysql> quit
Bye
        

If you did not install the DBMS yourself but were given an account on a remote server, you should be able to log on using your user account:

% /path/to/mysql/bin/mysql -h hostname -P 3306 -u dbuser -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 66 to server version: 4.0.18-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
        

3. I need help installing PostgreSQL DBMS

There is simply too much information on DBMS installation for us to provide useful tips. In general, a binary package with a native installer (e.g., RPM, PKG, etc.) is the best option if you have root privileges. A binary package without a native installer is an excellent option if you do not have root privileges. And if all else fails, you can always try source installers. We have found most source installers of the DBMS to be reliable.

We have used RLS with PostgreSQL versions 7.4.x and it seems to work well with 8.x also.

4. How can I check if PostgreSQL is installed correctly?

There are probably numerous things you could do, but one simple check is to see if you can log on to the DBMS. Of course, this requires that you have a user account. Assuming you installed the DBMS yourself, you should be able to log on as root:

% /path/to/pgsql/bin/psql
Welcome to psql 7.4.6, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

user=#
        

If you did not install the DBMS yourself but were given an account on a remote server, you should be able to log on using your user account:

% /path/to/pgsql/bin/psql -h hostname -p 5432 -U dbuser -W dbname
Password:
Welcome to psql 7.4.6, the PostgreSQL interactive terminal.
 
Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit
 
dbname=>
        

5. I cannot connect to PostgreSQL

If you cannot connect to PostgreSQL but you know that the process is alive, you may have forgotten to use the -i when starting the DBMS. This option instructs postmaster to listen on TCP/IP socket. Without it, postmaster will not accept socket connections from clients.

6. Performance of RLS with PostgreSQL has degraded over time

Be sure to do periodic vacuum and analyze commands on all your PostgreSQL databases. The PostgreSQL documentation recommends doing this daily from cron. Failure to do this can seriously degrade performance, to the point where routine RLS operations (such as LRC to RLI soft state updates) timeout and fail. Please see the PostgreSQL documentation for further details.

7. I need help installing SQLite embedded database

Please be aware that we have relatively limited exposure to using RLS with SQLite than other database management systems. As of the GT 4.2 development branch, we have added SQLite setup scripts to create the RLS schema in a sqlite embedded database. Our testing has been limited to various Linux flavors on 32-bit platforms.

You are encouraged to review the SQLite site for authoritative details on installation of sqlite3. The following commands have been used by us to install sqlite-3.3.6:

% tar zxvf sqlite-3.3.6.tar.gz
% mkdir bld
% cd bld
% ../sqlite-3.3.6/configure --prefix=/path/to/install --enable-threadsafe
% make
% make install
        

8. How can I check if SQLite is installed correctly?

There are probably numerous things you could do, but one simple check is to see if you can open a test database. You should be able to open a test database and perform various SQL operations:

% /path/to/sqlite/bin/sqlite3 test.db
SQLite version 3.3.6
Enter ".help" for instructions
sqlite>
        

9. I need help installing iODBC

The iodbc.org website contains information on installation of the iODBC (or libiodbc) library. We have used the following commands to install iODBC version 3.52.4 in our development and test sites. From the libiodbc build directory:

% ./configure --prefix=/path/to/libiodbc-3.52.4 \
--with-iodbc-inidir=/path/to/etc --disable-gui --disable-gtktest
% make
% make install
        

The configure parameters are optional. The defaults enable the features required by RLS, namely pthreads. We prefer to install to a specified directory due to testing against multiple ODBC managers, however, this would not apply to most end users. We also prefer not to install the GUI features.

Keep in mind, if you install the ODBC Manager library to a non-standard location, you will need to update your library path (e.g., LD_LIBRARY_PATH) to reflect your non-standard installation.

10. I need help installing unixODBC

The unixodbc.org website contains information on installation of the unixODBC library. We have used the following commands to install unixODBC version 2.2.11 in our development and test sites. From the unixODBC build directory:

% ./configure --prefix=/path/to/unixODBC --disable-gui \
  --disable-drivers
% make
% make install
        

The configure parameters are optional. The defaults enable the features required by RLS, namely threads. We prefer to install to a specified directory due to testing against multiple ODBC managers, however, this would not apply to most end users. We also prefer not to install the GUI features or the supplied drivers.

Keep in mind, if you install the ODBC Manager library to a non-standard location, you will need to update your library path (e.g., LD_LIBRARY_PATH) to reflect your non-standard installation.

11. Building unixODBC failed on OS X

Building unixODBC-2.2.11 on OS X failed for us too. Our unixODBC tarball came from the unixodbc.org project site. It may be that other sources of this tarball may have been ported properly. What we found by doing a brief search was that making a small change to one of the files corrected the problem. In the file Drivers/txt/SQLTables.c, we made the following change from:

#ifdef OSXHEADER
#include <i386/types.h>
#endif
        

to:

/*
#ifdef OSXHEADER
#include <i386/types.h>
#endif
*/
        

12. I need help installing MySQL Connector/ODBC

The MySQL project/company provide several binary packages for several major platforms using a variety of native installers. We recommend using this approach if possible, though it may require root privileges and help from your system administator. There are also binary packages available that do not use native installers, which can be used without root privileges and provide a better option than source installation.

From what we can tell, the 3.51.12 version of MySQL Connector/ODBC from the binary bundles provided by MySQL will work with unixODBC-2.2.11 but not with libiodbc-3.52.4 or earlier. The last known combinations of drivers from MySQL that worked with iODBC that we know of are:

  • MyODBC-3.51.06 and libiodbc-3.51.1
  • MyODBC-3.51.06 and libiodbc-3.51.2

Unfortunately, MySQL does not provide links to packages of MyODBC-3.51.06 as far as we can tell. You may find mirrors of the MySQL site that still have this driver available by searching the web for "myodbc 3.51.06". We found this one.

12.1. MySQ Connector/ODBC 3.51.12 (binary)

With mysql-connector-odbc-3.51.12-linux-i686, we have used the following commands to install the driver.

% tar -zxvf /path/tomysql-connector-odbc-3.51.12-linux-i686.tar.gz
            

We have successfully used this driver with unixODBC-2.2.11. However, when testing against libiodbc-3.52.4 using the iodbctest utility, the driver failed with the following error.

% ./bin/iodbctest "DSN=lrc1000_mysql_3_51_12;UID=dbpassword;PWD:dbpassword"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0406.0126
1: SQLDriverConnect = [MySQL][ODBC 3.51 Driver]Invalid window handle for
connection completion argument. (0) SQLSTATE=IM008
1: ODBC_Connect = [MySQL][ODBC 3.51 Driver]Invalid window handle for connection
completion argument. (0) SQLSTATE=IM008

Have a nice day.
            

We did not "Have a nice day" after this. There is limited information on this error, though it did appear that the driver loaded and attempted to make a connection.

12.2. MySQL Connector/ODBC 3.51.12 (source)

We attempted building and installing the mysql-connector-odbc-3.51.12 driver from the source package. We attempted building against unixODBC and libiodbc libraries and mysql-4.0.18 and mysql-5.0.21. We used a variety of configure options. In the end, we encountered configure or compiler errors that prevented us from using the source package.

12.3. MyODBC 3.51.06 (binary)

With MyODBC-3.51.06-pc-linux-gnu-i686, we have used the following commands to install the driver.

% tar -zxvf /path/to/MyODBC-3.51.06-pc-linux-gnu-i686
            

We have successfully used this driver with unixODBC-2.2.11 and libiodbc-3.52.4.

12.4. MyODBC 3.51.06 (source) and unixODBC

With MyODBC-3.51.06, we have used the following commands to install myodbc in our development and test sites. From the MyODBC-3.51.06 build directory:

% ./configure --prefix=/path/to/odbc/Drivers/MyODBC-3.51.06-unixODBC \
 --with-unixODBC --with-unixODBC-includes=/path/to/odbc/unixODBC-2.2.11/include \
 --with-unixODBC-libs=/path/to/odbc/unixODBC-2.2.11/lib \
 --with-odbc-ini=/path/to/odbc/etc/odbc.ini \
 --with-mysql-includes=/path/to/mysql/include --with-mysql-libs=/path/to/mysql/lib \
 --enable-thread-safe --without-samples
% gmake
% gmake install
            

Note: when building against unixODBC you must use the --with-unixODBC flag even if you use the --with-unixODBC-includes=DIR and --with-unixODBC-libs=DIR parameters.

You must use the --enable-thread-safe flag.

Also, be prepared to see a large number of compiler warnings when building this library.

12.5. MyODBC 3.51.06 (source) and iODBC

With MyODBC-3.51.06, we have used the following commands to install myodbc in our development and test sites. From the MyODBC-3.51.06 build directory:

% ./configure --prefix=/path/to/odbc/Drivers/MyODBC-3.51.06-iODBC \
 --with-iodbc=/path/to/libiodbc-3.51.2 --with-odbc-ini=/path/to/odbc/etc/odbc.ini \
 --with-mysql-includes=/path/to/mysql/include --with-mysql-libs=/path/to/mysql/lib \
 --enable-thread-safe --without-samples
% gmake
% gmake install
            

Note: when building against iODBC you must use the --with-iodbc=DIR parameter. The --with-iodbc-includes=DIR and --with-iodbc-libs=DIR parameters DO NOT work.

You must use the --enable-thread-safe flag.

Also, be prepared to see a large number of compiler warnings when building this library.

13. I need help installing psqlODBC

The README file or docs directory included with the psqlODBC package contains information on installation of the psqlodbc library. We have noticed some differences between building and installing psqlodbc-7.2.5, psqlodbc-08.00.0102, and psqlodbc-08.01.0200 againt iODBC and unixODBC.

Note: In earlier versions of this guide, we warned that the --with-iodbc configure option resulted in an unstable psqlodbc library that caused memory corruption and failure (e.g., core dump) when an application (RLS Server) attempted to open the database connection. We have not experienced this problem with the more recent versions of psqlodbc that we have tested and which are documented below.

13.1. psqlodbc-7.2.5 (source) and unixODBC-2.2.11

With psqlodbc-7.2.5, we have used the following commands to install psqlodbc in our development and test sites. From the psqlodbc build directory:

% ./configure --prefix=/path/to/odbc/Drivers/psqlodbc-7.2.5-unixODBC \
  --enable-pthreads --with-unixodbc
% gmake
% gmake install
            

You may also want to consider setting CPPFLAGS and LDFLAGS if you install your ODBC Manager in a non-standard location.

13.2. psqlodbc-7.2.5 (source) and libiodbc-3.52.4

With psqlodbc-7.2.5, we have used the following commands to install psqlodbc in our development and test sites. From the psqlodbc build directory:

% ./configure --prefix=/path/to/odbc/Drivers/psqlodbc-7.2.5-iODBC \
  --enable-pthreads --with-iodbc
% gmake
% gmake install
            

You may also want to consider setting CPPFLAGS and LDFLAGS if you install your ODBC Manager in a non-standard location.

13.3. psqlodbc-08.00.0102 (source) and unixODBC-2.2.11

With psqlodbc-08.00.0102, we have used the following commands install psqlODBC with a unixODBC-2.2.11 installation. From the psqlodbc build directory:

% ./configure --prefix=/path/to/odbc/Drivers/psqlodbc-08.00.0102-unixODBC \
  --enable-pthreads --with-unixodbc LDFLAGS="-L/path/to/odbc/unixODBC-2.2.11/lib" \
  CPPFLAGS="-I/path/to/odbc/unixODBC-2.2.11/include"
% gmake
% gmake install
            

13.4. psqlodbc-08.00.0102 (source) and libiodbc-3.52.4

With psqlodbc-08.00.0102, we have used the following commands to configure psqlodbc but it failed to build. We have no advice on resolving this problem other than to suggest using a different combination of ODBC Manager and ODBC Driver.

% ./configure --prefix=/path/to/odbc/Drivers/psqlodbc-08.00.0102-iODBC \
  --enable-pthreads --with-iodbc LDFLAGS=-L/path/to/odbc/libiodbc-3.52.4/lib \
  CPPFLAGS=-I/path/to/odbc/libiodbc-3.52.4/include
% gmake
...ends in errors...
            

13.5. psqlodbc-08.00.0102 (source) and libiodbc-3.51.2

With psqlodbc-08.00.0102, we have used the following commands to configure psqlodbc and to build it successfully. In this case, we used psqlodbc along with libiodbc-3.51.2.

% ./configure --prefix=/path/to/odbc/Drivers/psqlodbc-08.00.0102-iODBC \
  --enable-pthreads --with-iodbc LDFLAGS=-L/path/to/odbc/libiodbc-3.51.2/lib \
  CPPFLAGS=-I/path/to/odbc/libiodbc-3.51.2/include
% gmake
% gmake install
            

13.6. psqlodbc-08.01.0200 (source)

We have NOT succeeded installing psqlodbc-08.01.0200 from source with either iODBC or unixODBC.

14. I need help installing SQLite ODBC Driver

The README file included with the SQLite ODBC Driver package contains information on installation of the sqliteodbc library. Please be aware that the author of the SQLite ODBC Driver states that the package is of experimental quality.

14.1. sqliteodbc-0.69 (source) and iODBC-3.51.2

With sqliteodbc-0.69, we have used the following commands to install sqliteodbc in our development and test sites. From the sqliteodbc build directory:

% ./configure  --prefix=/path/to/install --disable-winterface --with-sqlite3=/path/to/sqlite-3.3.6 --with-odbc=/path/to/libiodbc-3.51.2
% make
% make install
            

Note the distinction between using --with-sqlite=DIR and --with-sqlite3=DIR. Use the latter for the sqlite3 database library (recommended).

15. Which libraries do you recommend to new users?

The short answer, consider the following options:

  • PostgreSQL (recent stable) with psqlODBC (08.00.0102) with unixODBC (2.2.11)
  • MySQL (recent stable) with MySQL Connector/ODBC (3.51.12, binary package) with unixODBC (2.2.11)

The long answer follows. First of all, if you are a new user and not confident installing system level software, you will save yourself a lot of time and trouble by consulting with your system administrator. If you are an administrator and you still find this troubling, then you are in good company.

As of the writing of this guide, we have experienced a higher success rate using unixODBC (current stable release at this time is version 2.2.11) than we have with iODBC (current stable release is version 3.52.4).

As of the writing of this guide, we have found PostgreSQL and psqlODBC installation from source to be reliable. We would recommend the use of psqlODBC version 08.00.0102 with unixODBC. If you are an iODBC user, you will need to use psqlODBC 7.2.5.

As of the writing of this guide, we have found MySQL and MySQL Connector/ODBC installation from binary to be reliable. We would recommend the use of MySQL Connector/ODBC version 3.51.12 with unixODBC. If you are a iODBC user, you will need to find a binary of MyODBC 3.51.06.

16. I need help configuring my DSNs

There are a variety of ways that you can specify the Data Source Names (DSNs) in the odbc.ini file. You may use a GUI or command-line tool provided with your ODBC Manager (unixODBC or iODBC). We tend to edit the odbc.ini file directly when working in our development and test sites, however, you should avoid this practice unless you are experienced with using ODBC tools (a small typo such as an unwanted space character can prevent your configuration from working -- with little in the way of useful error messages).

The following is an example of a typical setup when using PostgreSQL:

[lrc1000]
Driver      = /path/to/lib/psqlodbc.so
Database    = lrc1000
Servername  = hostname
Port        = 5432

[rli1000]
Driver      = /path/to/lib/psqlodbc.so
Database    = rli1000
Servername  = hostname
Port        = 5432
        

The following is an example of a typical setup when using MySQL:

[lrc1000]
Driver      = /path/to/lib/libmyodbc3.so
Database    = lrc1000
SERVER      = hostname
PORT        = 3306
SOCKET      = /path/to/mysql/mysql.sock

[rli1000]
Driver      = /path/to/lib/libmyodbc3.so
Database    = rli1000
SERVER      = hostname
PORT        = 3306
SOCKET      = /path/to/mysql/mysql.sock
        

The following is an example of a typical setup when using SQLite:

[lrc1000]
Driver      = /path/to/lib/libsqlite3odbc.so
Database    = /path/to/globus-rls-lrc1000.db

[rli1000]
Driver      = /path/to/lib/libsqlite3odbc.so
Database    = /path/to/globus-rls-rli1000.db
        

17. How can I tell which odbc.ini is being used?

The ODBC libraries look for the odbc.ini file along a search path. We are not experts in this matter and it seems that it varies from vendor to vendor over time. But to the best of our knowledge the general search path is in the following order:

  • According to environment variable $ODBCINI
  • In the user's home at ~/.odbc.ini
  • In the system default /etc/odbc.ini

When we are troubleshooting a system, we tend to use the strace utility to see exactly which files it is reading.

18. Testing your ODBC configuration

The commands below demonstrate the show tables command with a MySQL database. Use the equivalent of this command if you are using a different DBMS. Alternately, you may simply perform a few SELECT queries against the listed tables.

Testing with unixODBC, run:

% /path/to/unixODBC-2.2.11/bin/isql lrc1000 dbuser dbpassword
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> show tables;
+------------------+
| Tables_in_lrc1000|
+------------------+
| t_attribute      |
| t_date_attr      |
| t_flt_attr       |
| t_int_attr       |
| t_lfn            |
| t_map            |
| t_pfn            |
| t_rli            |
| t_rlipartition   |
| t_str_attr       |
+------------------+
SQLRowCount returns 10
10 rows fetched
SQL> quit
        

Testing with iODBC, run:

% /path/to/bin/iodbctest "DSN=lrc1000;UID=dbuser;PWD=dbpassword"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.51.0002.0224
Driver: 03.51.06

SQL>show tables;
 
Tables_in_lrc1000
-----------------
t_attribute
t_date_attr
t_flt_attr
t_int_attr
t_lfn
t_map
t_pfn
t_rli
t_rlipartition
t_str_attr
 
 result set 1 returned 10 rows.

SQL>quit
 
Have a nice day.
        

19. Important notes on RLS initialization

Please be advised (and advise other users responsible for bringing up the RLS) that the startup initialization may take a few minutes before the RLS may be accessible. The initialization involves two key operations that may consume significant resources causing the server to appear temporarily unresponsive. Users of RLS may mistakenly assume that RLS failed to startup and may kill the server and start over. Some users may fall into this in a repeated cycle, believing that the RLS is unable to startup properly.

If the RLS is configured to send compressed updates (Bloom filters) to other RLIs, the RLS startup will involve initialization of the Bloom filter representing the current contents of the local replica catalog (LRC). This step is a prerequisite before any additional operations may be allowed, therefore no client connections are permitted until the initialization is complete. In our test environment, we have seen over 30 seconds delay due to creation of the Bloom filter corresponding to 1 million LFN names on a system with Dual 1 GHz CPU and 1.5 GB RAM. You may experience greater delays at larger scales and/or when running RLS with more limited system resources.

If the RLS is configured to send uncompressed updates (LFN lists) to other RLIs, the RLS startup will not involve any additional initialization delay. However, the RLS will spawn an initial full catalog update to all RLIs it updates. Though these updates will take place on separate threads of execution after the initialization of the system, they will consume a great amount of processor activity. Depending on the volume of the local replica catalog (LRC), this processor activity may initially interfere with a client operation. In our test environment, we have seen our initial "globus-rls-admin ping..." operation may suffer a delay and timeout in 30 seconds, the second "ping" may delay for a few seconds but will successfully return, and the third and every subsequent "ping" operation will successfully return immediately throughout the duration of the update. The system exhibits the same behavior for any other client operation, such as a globus-rls-cli query... operation.

20. Linux kernel and glibc incompatibility

This note originated based on observations of RLS Server running on RedHat 9 but could also apply to other Linux distributions. There have been occurrences of RLS servers hanging on RedHat 9 systems. The external symptoms are:

  • The server does not accept new connections from clients, with an error message similar to:

    connect(rls://XXXXX): globus_rls_client: IO timeout:
    globus_io_tcp_register_connect() timed out after 30 seconds
                    
  • Often, the server continues to receive and send updates as configured and respond to signals. You can check this by querying other servers that interact with the one that's hung. Under gdb: All the server threads are waiting to be signaled on a condition variable. Sometimes, this is in globus_io functions, particularly in globus_io_cancel().

20.1. Probable cause

This seems to be due to a problem in the new kernel and thread libraries of RedHat 9. A problem in pthread_cond_wait() causes threads not to wake up correctly. This problem has been seen with the following kernels and glibc packages:

  • Kernels: 2.4.20-30.9 and 2.4.20-8
  • glibc: glibc-2.3.2-27.9.7

20.2. Suggested workaround

The problems don't seem to arise when RLS is linked with older pthread libraries. This can be done as by adding a couple of lines to the RLS startup script in $GLOBUS_LOCATION/sbin/SXXrls, as shown:

#!/bin/sh

GLOBUS_LOCATION=/opt/gt3.2
MYSQL=/opt/mysql
IODBC=/opt/iodbc

export GLOBUS_LOCATION

#RedHat 9 workaround
LD_ASSUME_KERNEL=2.4.1
export LD_ASSUME_KERNEL
...
            

On i586 systems, set:

...
LD_ASSUME_KERNEL=2.2.5
...