Problem: JFORCES dies when either 1) Starting a scenario, or 2) Entering the Mission Planner


Normally this is an indication of a database problem. Most likely either your database isn't running or there is no Open DataBase Connectivity (ODBC) for your database. These are covered in the two sections below.

Basic DataBase Checks

To test whether your database is up, try to enter any database on your system using the vendor-specific SQL interface. For example, if you're running from a database hosted on your machine and you're running under PostgreSQL, type:

psql adilib <carriage return>

If you get a response like:

Welcome to psql, 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


Then your database is running. Type "\q" to get out of the session. If you get an error message instead, you've got a database problem. A common database problem is that the database management system (DBMS) fails to start after the system is booted. To check and correct this log in as root and type:

/etc/rc.d/init.d/postgresql start

Two applications should start with return values [OK]. If so, retest the "psql adilib" statement. Normally this fixes it, if not you'll have to debug the database installation. If you're using PostgreSQL you might check out the site.

Also you might not be running a database on your machine. In this case try accessing the database on the remote machine as follows:

psql -h (database host) adilib

If you get "Connection Refused" error the odds are that either 1) you don't have connectivity to the database host, or 2) the database host is not configured to permit you to use its database. To test connectivity type:

ping (database host) <carriage return>

If you get a result like:

PING bliss ( from : 56(84) bytes of data.

64 bytes from bliss ( icmp_seq=0 ttl=234 time=312.525 msec

(might return many times, type "^c" (that's the <control key> and "c" simultanously) to stop it)

Then you have connectivity. If you can't connect you'll have to fix your network.

If you have network connectivity but get a connection refused response the host machine will need to be reconfigured. Typically errors come in one of three varieties:

  1. The firewall on or to the database server is not allowing communications on the database communications port. For PostgreSQL this defaults to 5432. Log into the database host as root and check and reconfigure the firewall configuration as required

  2. The DBMS on the host was not initialized for network access. On PostgreSQL this means that the database was not started up with the " -i " option. Check the startup script (typically /etc/rc.d/init.d/postgresql) and see if this is the case.

  3. The database security is not set up correctly. On PostgreSQL this configutation file is in $PGDATA/pg_hba.conf . The PGDATA directory is normally set in the /etc/rc.d/init.d/postgresql file. This file will have entries at the bottom in the form:

      host all trust

    where the two numbers are the IP base and IP mask for machines that can log in. Add one for your machine if required. See the database documentation (e.g. for more information.

ODBC Problems

If the database is running and there's no problem connecting to it, there's probably a problem with the ODBC connectivity configuration. This is a file that defines the actual database, data source and server to be used when a call is made for data. There are many methods of setting this up, but typically JFORCES installations employ a file named ~/.odbc.ini (accessable when you're logged in as the FORCES user). Type:

more ~/.odbc.ini

and you should see a list of data source connection options. I specify data source instead of database because ODBC permits data retrieval from data source other than relational databases, including Excel worksheets on MS Windows platforms. The format of the connection configuration differs depending on the data source being used. For PostgreSQL installations, there should be a series of 6 lines as in the following example:














The first line is the connection handle used by ODBC - adilib for the first connection, tactical for the second. The second line specifies where the ODBC access library resides. This must exist on your machine; if you're having problems type:

ls /usr/local/pgsql/lib/ (or whatever your driver is set to)

If you get a response like:

ls: /usr/local/pgsql/lib/ No such file or directory

Then reset your driver to the correct location

The third line is the actual database name on the server. Note that this can be different than the connection handle. Thus "tactical" could point to the database named test. Use this option with caution - it can get very confusing.

The fourth line specifies the database server machine. This can be any machine you can connect with and follows UNIX-standard hostname conventions.

The fifth line is the user name you want to use when accessing the database. Using postgres provides you with complete DBA access; awfully handy if the people responsible for maintaining the database don't mind you having this access.

Finally, the last line specifies the access. "ReadOnly=0" means that you have access to both read and write data in this database. This is the recommended setting for JFORCES (this is required for data analysis).