Some common reasons that setup/connection issues occur are:
The library path environment variable is not set correctly.
Note: The 32-bit and 64-bit drivers for Salesforce require that you set the library path environment for your operating system to the directory containing your 32-bit JVM’s libjvm.so [a] file, and that directory’s parent directory before using the driver.
HP-UX ONLY:
When setting the library path environment variable on HP-UX operating systems, specifying the parent directory is not required.
You also must set the LD_PRELOAD environment variable to the fully qualified path of the libjvm.so.
The library path environment variable is:
32-bit drivers
LD_LIBRARY_PATH on Solaris, Linux and HP-UX Itanium
LIBPATH on AIX
64-bit drivers
LD_LIBRARY_PATH on Solaris, HP-UX Itanium, and Linux
LIBPATH on AIX
The database and/or listener are not started.
The ODBCINI environment variable is not set correctly for the ODBC drivers on UNIX and Linux.
The ODBC driver’s connection attributes are not set correctly in the system information file on UNIX and Linux. See "Configuring a Data Source" for more information. For example, the host name or port number are not correctly configured.