FrontBase Diagnostics and Trouble Shooting Tips
By: Tom Hume, FrontBase,July 10, 2001
Contents
Licensing problems
FBInfoCenter
LogSQL option
Problems with client-side tools
Introduction
The following tech tip seeks to benefit FrontBase developers by demonstrating various ways to undertake preliminary trouble shooting. There are many ways to investigate problems if they should ever arise. The types of problem encountered with FrontBase can range from incorrect SQL syntax to complete hardware failure. Obviously not all problems can be determined from the outset but one can usually identify the cause of a problem through a process of elimination.
Licensing problems
On the Win2K/NT platform, starting Frontbase with the -console provides one with details of any potential license problem on the command line. Simply running FrontBase from the command line on other platforms also produces the same output. Typically one would issue:
[<install_path>/frontbase/bin]user% ./FrontBase
or
<install_path>/frontbase/bin/frontbase -console
A typical example of the output is as follows:
2001-05-25 06:34:32 License problem detected: No license for actual host. License IP = 84.52.131.229 Host IP = 127.0.0.1 Using the unlicensed FREE version options Usage: FrontBase [-restore[=<filename>]] [-rollforward] [-wtd] [-scomm] [-sdisk] [-keys=<filename>] [-create] [-rdd] [-logSQL] [-daemon] [-v][-version] [--version] databasename
Any possible problems that may arise because licensing issues can usually be determined from this output. For example, if you are attempting to use a feature of FrontBase which your current license does not allow you might discover the clue in the output by virtue of the fact that it states that FrontBase is not actually licensed or perhaps using a free license where the feature is not permitted.
FBInfoCenter
The FBInfoCenter tool canbe run from the command line or command prompt. Eg.:
<install_path>/FrontBase/bin/FBInfoCenter
You will either see the output displayed or written to the FBInfo.log which resides in the FrontBase root directory. Opening the log file typically yields the following information:
[localhost:/] user% cat FBInfo.log Host name and IP and ethernet address information ================================================= Name of this host : localhost IP address of this host : 127.82.92.13 Ethernet address : 00:33:45:a3:25:da Installation directory verification =================================== Installation directory : /Library/FrontBase + /Library/FrontBase/bin + /Library/FrontBase/bin/FBExec + /Library/FrontBase/bin/FrontBase + /Library/FrontBase/bin/FBInfoCenter + /Library/FrontBase/bin/sql92 - /Library/FrontBase/Backups + /Library/FrontBase/Collations + /Library/FrontBase/Collations/CaseInsensitive.coll1 + /Library/FrontBase/Databases - /Library/FrontBase/Databases/Empty.fb + /Library/FrontBase/Library + /Library/FrontBase/Library/DefinitionSchema.sql + /Library/FrontBase/Library/InformationSchema.sql + /Library/FrontBase/Library/FBSQLErrors.array - /Library/FrontBase/Library/Keywords.txt + /Library/FrontBase/Library/OpenBaseImport.sql + /Library/FrontBase/Translations + /Library/FrontBase/Translations/ToLower.trans + /Library/FrontBase/Translations/ToUpper.trans FBExec and Databases check ========================== The FBExec is running Status Port Database Stopped db1 options : Stopped db2 options : -logSQL Running 49164 backuptest options : -logSQL License string information ========================== Checksum : OK License type : MAC address MAC address : N/A Expiration date : 2002-05-14 Platform : Mac OS X Licensed option : Raw Device Driver Licensed option : Export/Import Licensed option : Backup/Restore Licensed option : TableCache Licensed option : SecurityChecks Licensed option : Encryption - Datastore Licensed option : Encryption - Communication Licensed option : Replication Master Licensed option : Replication Client Licensed option : Notification Licensed option : Row Level Privileges
The output describes exactly what features are available with the license employed, an install verification and an FBExec and Databases check. One can see what is running, what has been stopped and any invocation options employed.
LogSQL option
When the -logSQL invocation option is used starting a database, all subsequent SQL statements are logged in a file. In order to log all SQL statements for analysis one must first license FrontBase. The file is created in the 'Databases' directory of the FrontBase installation and is named:
Databases/<databasename>.fbsql - Windows NT/2000
Databases/<database name>.fb.sql- All other platforms
The SQL log file allows one to revisit SQL statements that may indicate the possible cause of a problem encountered.
When you have exhausted your own trouble shooting procedures and you require technical support you can produce a set of files that can be used to reproduce the problem elsewhere. One needs to bear in mind that it is often much easier to identify a problem when the apparent cause can be simulated with as little interference as possible i.e. using a "clean" database. Of course, if necessary we can accommodate by using your database (in a good state) with your <database_name>.fb.sql file. You could perform the following steps for the "clean" method:
- Create a new database
- Stop the database
- Make a copy of the database
- Start the new database with the -logSQL option
- Reproduce the problem
- Mail us the copy of the "clean" database and the log file (<database_name>.fb.sql) to support@frontbase.com
By copying the clean database you will be creating a "base" from which we run the SQL log against to actually reproduce the problem here.
Problems with client-side tools
If you experience trouble with client-side tools, for example, not returning what you expect, it is a good idea to start logging the SQL and watch it come across as you work with the client tools. More often than not this will lead to a better understanding of the problem. As an example one can simply open the SQL log in FBManager and watch the log in a window.
Turn on SQL logging on the server side, "tail -f" the SQL log in a terminal, then exercise the client until you can see where the offending SQL is generated. At that point, you'll know exactly which client-side component did it, and can be very helpful by creating a small project with the particular client that reliably demonstrates the problem. If you can provide us with a project plus a small exported ("starter") database and the SQL logs to support, the problem can usually be tracked down and fixed very quickly.
If you have any other questions regarding trouble shooting please do not hesitate to contact us at support@frontbase.com.