|
Administrator's Guide |
This chapter describes some techniques and procedures that you can use for troubleshooting the SilverStream server.
This chapter contains the following sections:
SilverStream recommends that you turn on error logging at all times when running the server. Error logging is a lightweight process that prints detailed information about error messages either to the AgErrorLog table in the SilverMaster or to a file that you designate. You can activate logging using the SilverStream Management Console (SMC). For more information, see Using server logging.
When logging to the SilverMaster, you can view the log in two ways:
Use the SMC: select the Logs panel under Monitor options.
For more information, see
Displaying logs.
Use the View Designer to create a view for displaying error messages if you are logging errors to AgErrorLog. The following provides general instructions on how to format the view.
For more information about creating a view, see View Designer in the Tools Guide of the server's Classic Development Help.
To create a view for error logging:
Start the Designer and navigate to the SilverMaster database.
Create a view of the AgErrorLog table with the following specifications:
This provides a useful way to analyze messages, and, if necessary, to communicate with SilverStream Technical Support.
The Debug options in the SMC enable the printing of server debug messages to the Server Console. Options include debugging client requests, SilverStream business object execution, and database SQL statements. Activate debugging options only for application debugging purposes, as this activity can significantly inhibit server performance.
For more information about the Server Console, see Main Designer in the Tools Guide of the server's Classic Development Help.
NOTE If you are running the server as a service in Windows NT, the output is printed to the error log instead of the Server Console.
Change the value for the type of activity that you are debugging.
The number you enter indicates the level of detail you want displayed. The value 0 means that messages are not printed. You have the following debugging options:
If you experience persistent problems with a database connection, you can turn on JDBC or ODBC tracing. As a rule, you should use JDBC tracing. Use ODBC tracing only for databases accessed through ODBC.
Shut down the server (see Shutting down the SilverStream server).
Open the httpd.props file located in SilverStream\resources.
Add an http-server.Jdbc.DriverManager.LogFile entry to the props file and point it to the log file. For example, if the log file is d:\test\jdbc.log, create this line in your httpd.props file:
http-server.Jdbc.DriverManager.LogFile=d:\\test\\jdbc.log
NOTE Use JDBC tracing for troubleshooting only, as it will slow down the server and use considerable disk space.
Open the ODBC panel to display the ODBC Data Source Administrator.
Enable When to Trace to either One-time only or All the time.
NOTE If you set it to All the time your system will be slower. Also, this setting will take up disk space on your system.
SilverStream provides the Watcher tool, which can help you understand the state of the server in cases when the server becomes unresponsive. Once activated, the Watcher logs the state of the server once a minute.
You might find the Watcher valuable when faced with problems that are hard to debug.
Add the following property to the httpd.props file:
http-server.com.sssw.srv.httpdwatcher
Set the value of the property to the pathname of a watcher configuration file. For example:
http-server.com.sssw.srv.httpdwatcher=c:\\temp\\watchconfig.txt
(Remember to escape backslashes in the httpd.props file.)
What happens
If this property is set when the server is started, the server will create a watcher thread. The watcher thread just sleeps, waking up once a minute, and checking each time for the existence of the watcher configuration file supplied as the value of the httpdwatcher property. As long as the file doesn't exist, the Watcher does nothing and just goes back to sleep. Under these circumstances, the Watcher has minimal impact on server performance. Furthermore, even if the server hangs, in most cases the Watcher will not hang.
If the watcher configuration file exists When the Watcher discovers that the watcher configuration file exists, it reads the configuration file and uses it to control its further actions.
The watcher configuration file is an ASCII text file that should have one or two lines in it:
A flags value that tells the Watcher what information to print
An (optional) output file name for the Watcher output; if not supplied, the output goes to the server console
The flags value is a bit-coded integer, in which the bits are defined as follows:
A typical watcher configuration file looks like this:
7 c:\temp\watchout.txt
This tells the Watcher to dump information about threads, sessions, and database connections to the specified output file, once every minute.
When the watcher configuration file is removed, the server stops logging the output, so you can turn the logging on and off by creating and removing the watcher configuration file.
This section describes some reasons why the SilverStream server might fail to start, and how you can address the problem. For more information on troubleshooting server problems, see Using SilverMasterInit to recreate or refresh SilverMaster.
NOTE Server failure is often related to the specific database you are using. For database-specific information, see the appropriate section of the Installation Guide.
There are two causes of server failure that are due to inadequate system resources:
Insufficient disk space. The operating system needs more space to write files to disk. Create more disk space by eliminating or moving files, then try starting the server again.
Insufficient memory. This might be a temporary problem or it might indicate insufficient resources. Shut down other programs, expand your swap file, or add more memory to the server machine.
If an error message indicates that a server listener type of SilverStream business object is preventing the server from starting, use the -noserverlisteners server startup option. From a DOS prompt, enter the following:
SilverStream\bin\SilverServer.exe -noserverlisteners
This command starts the server and allows a SilverStream developer to access the object in the SilverStream Designer.
For more information about startup options, and about stopping and starting the server, see
Running the Server.
If an error message indicates that a database is not synchronized properly, the server might fail to start. This error might occur if you use a tool outside SilverStream to modify database schema. There are two server startup options you can use to address this problem. Before using these options, be sure that no other users are accessing the database at the same time.
From a DOS prompt, force-start the server using the -nodbcheck option:
SilverStream\bin\SilverServer.exe -nodbcheck
This prevents the server from checking database integrity.
From a DOS prompt, start the server using the -noexitondbcheck option:
SilverStream\bin\SilverServer.exe -noexitondbcheck
This allows the server to start and prints errors to the Server Console even if the database integrity check fails.
If you see errors related to database consistency, go to the SMC and execute the Synchronize database schema option, then restart the server.
For more information, see
Synchronizing database schema.
SilverMonitor is a background process running on the server that monitors the server status and attempts to restart the server if it terminates abnormally. By default, this process is activated when the server is started. SilverMonitor starts with default parameters, which you can modify. You can also run the server without SilverMonitor.
There are two ways that you can modify the parameters:
Specify parameter(s) as server startup options on the DOS command line. For information about server startup options, see Using startup options.
Specify machine default values by editing the registry (Windows NT only).
Order of precedence The order of precedence is as follows:
Summary of parameters The following is a summary of SilverMonitor parameters.
|
Start up option |
Registry option (NT) |
Description |
|---|---|---|
To modify SilverMonitor parameters in the NT Registry:
Type regedit to invoke the Registry Editor.
The following screen appears.
HKEY_LOCAL_MACHINE>SOFTWARE>SilverStream Software Inc>SilverStream>version number.
When the dialog appears, type one or more of the options described above. Separate each option with a space.
The following shows the option for starting SilverMonitor.
What happens SilverMonitor writes to the NT EventLog when it restarts the server. It also writes to a SilverMonitor.log file in the directory where it is run (usually SilverStream\bin). This log file gets an entry every time the monitor starts.
When you restart the SilverMonitor, the log file is emptied and restarted.
The SilverStream server relies on the SilverMaster database for overall system management. SilverMasterInit is a command-line program that performs several types of processes on the SilverMaster database. SilverMasterInit can:
This section contains the following topics:
The following table describes how and when to run each of the SilverMasterInit command-line options. To see a list of options, type the following at the command prompt:
SilverStreamInstallDir\bin\SilverMasterInit -?
Administration accounts There are two administration accounts (database and server). Both accounts are defined during installation. The server administration account restricts who can log in and administer the SilverStream server. You define the server administration account using SilverMasterInit. After a default installation, the server administrator user account is part of the predefined Administrators group and has the Locksmith privilege.
The SilverStream server uses the database administration account when connecting to the SilverMaster database. The only time you need to specify the SilverMaster database account is when you are running SilverMasterInit.
Entering options You must enter the database user account name and password for all command line options. In addition, you need to specify Full or Refresh mode for all SilverMasterInit options except those noted in the following table. When you specify a Full mode database initialization, three options (-A, -n, and -W) require that you also define the server administration account name and password on the command line.
Specify parameter(s) as SilverMasterInit startup options on the command line.
|
SilverMasterInit startup option |
Description |
Use |
|---|---|---|
This option makes additional Java classes available to SilverStream server applications by appending the specified path to the class path. NOTE You should use the AGCLASSPATH environment variable to extend Java classes.
| ||
Don't use this debugging option without first contacting Technical Support. Instead, use AGCLASSPATH to make additional Java classes available to SilverStream server applications. See Setting the AGCLASSPATH variable. | ||
Specifies the server administrator user name used to log in to and administer the SilverStream server. | This option lets you define a server administrative account name (and password) when you are creating a new SilverMaster database catalog. The server user account you specify will be part of the Administrators group and have full Locksmith privilege. Use this account to administer the server. See About your administrator account. When running a Full mode database initialization you must specify the server administration account name and password.
| |
Causes the SilverStream server to require users to authenticate themselves. | Set this parameter if you accidentally restrict Read access to your SilverMaster database, which includes the login resource. This option also provides a quick way to set authentication without running the SMC. See Using server authentication to access the login resource. You don't need to specify Refresh or Full mode when running the -a option.
| |
Run to see the initial SilverMaster environment properties used by Full mode or Refresh mode.
| ||
Run to verify that these objects are properly stored.
| ||
Deletes all Ag tables from the specified SilverMaster database. | Deletes all existing SilverStream tables (including users, groups, and licensing data) from the specified SilverMaster database. Use to remove a SilverStream database from the server. Unlike Full mode, this option deletes SilverStream data but does not replace it with initial properties.
| |
Writes errors to the specified file, which is created as necessary. | If no errors are found, a log file is not created. If you don't specify a path, the error log file is stored in the directory from which you ran SilverMasterInit. The default file name is sminit.log.
| |
Creates new SilverMaster system data and resources. This option deletes existing users, groups, and licensing data. NOTE By default, the server will be restricted when you run Full mode. To install the server unrestricted (for a development environment), run SilverMasterInit in Full mode with -n. When running a Full mode database initialization you must specify the server administration account name and password.
| ||
Writes JDBC debugging information to the specified log file. | If you don't specify a log file name, this option is ignored. If you don't specify a path, the JDBC log file is stored in the SilverStream\bin directory.
| |
Specifies a user or group account to grant Locksmith privilege to. | Use this option if you accidentally delete all accounts that have Locksmith privilege. See Regaining access to SilverMaster. You don't need to specify Refresh or Full mode when running the -l option.
| |
Use when you do not want to lock down access to SilverStream data nor require user authentication. This option means any user can perform administrative operations and browse directory listings until you lock down access by setting permissions. See Default server and object security. You need to specify Full mode and the server administration user name and password when running the -n option.
| ||
Creates all Ag tables in the specified Oracle table space for SilverMaster. | Use this option when creating a SilverMaster database to use with Oracle. More space (than the default) must be allocated for SilverMaster table objects because of the way an Oracle database stores data.
| |
Specifies the database password used by the SilverStream server to access SilverMaster. | The database administration password and associated user account are stored encrypted in the SilverStream registry during server installation. The server will use the specified account name and password at startup to access the SilverMaster database.
| |
Reads startup properties from the specified file. Defaults to httpd.props in the SilverStream resources directory. | Use to specify SilverMaster startup property file name and location other than the default. After you set the property file option with SilverMasterInit, you need to start the SilverStream server from the command line with the -p option to use the new property file.
| |
This process skips some of the database installation steps used by Full mode. Use this option to refresh SilverMaster system data and resources when you don't want to delete existing users, groups, and licensing data.
| ||
Specifies the server administrator account password used to log in to and administer the SilverStream server. | Use the server administrator user and account password to administer the server. When running a Full mode database initialization you must specify the server administration account name and password.
| |
Specifies the database user account used by the SilverStream server to access SilverMaster. | The database administration user account and associated password are stored encrypted in the SilverStream Registry. The server will use the specified account name and password at startup to access the SilverMaster database.
| |
If the process fails, run this option to identify where the failure occurred.
| ||
Displays SilverMaster initialization properties and then exits without starting SilverMasterInit. | Run to view local server startup properties. This option does not change or refresh properties. Use this debugging option to check for misdirected initialization settings. |
The SilverMaster database, which is created during installation, can also be recreated or updated using SilverMasterInit. The SilverMaster database keeps track of all of the application databases used by the SilverStream server and also holds the SilverStream system tables, including those containing group, user, and licensing information. There is one SilverMaster catalog for each SilverStream server or SilverStream cluster.
For more information about the SilverMaster database, see
The SilverMaster database catalog.
If your SilverMaster database is damaged, you can run SilverMasterInit. If you cannot start the SilverStream server, try one of the following procedures if nothing else has worked:
CAUTION Connection problems may be due to a corrupt driver connection, damaged application database, or network problems. If you have questions about what is causing your server problem, call SilverStream Technical Support before running SilverMasterInit. Running SilverMasterInit in Full mode will delete the contents of all of your existing SilverStream system tables and replace them with initialized data. Do not run in Full mode if you want to preserve existing SilverStream system tables, including those that contain group, user, and license data.
You can run SilverMasterInit in Refresh mode to upgrade or access SilverMaster properties. The refresh process skips some of the database installation steps used by Full mode. Run SilverMasterInit in Refresh mode to refresh SilverMaster system data and resources without deleting existing users, groups, and licensing data.
NOTE As part of the SilverStream server installation process, SilverMasterInit upgrades resources. You typically upgrade the SilverStream server by running the Installation program.
To run SilverMasterInit in Refresh mode:
From SilverStream\bin directory, enter:
SilverMasterInit -r options
The following message appears: Creating Resources will take a few minutes; please wait.
Restart the SilverStream server once SilverMasterInit completes without errors.
SilverMasterInit can often fix problems caused by someone removing or renaming a file or table that SilverMaster relies on. If you cannot start the SilverStream server or connect to the SilverMaster database, you may need to run SilverMasterInit.
While SilverMasterInit can reset corrupted SilverMaster properties, this program cannot repair a corrupted Registry key, configuration files, sample databases, or files associated with databases. To address these types of problems, run the Installation program.
To avoid deleting all your database tables, try running SilverMasterInit in Refresh mode (before running it in Full mode) to see if that resolves the server problem.
If you run SilverMasterInit in Full mode to regenerate new SilverMaster properties, you will have to rerun the license install, recreate any SilverStream users and groups, and manually add your SilverStream application databases. Running SilverMasterInit will not alter your application databases unless you have stored application objects in SilverMaster (this is not common practice and is not recommended).
To run SilverMasterInit in Full mode:
From SilverStream\bin directory, enter:
SilverMasterInit -f options
The following message appears: Creating Resources will take a few minutes; please wait.
Once SilverMasterInit completes without errors, rerun your license install using the Installation program.
NOTE You must relicense the server, because running SilverMasterInit in Full mode deletes the table data that stores license information.
For information on adding licenses, see
Managing licenses.
Start the Designer and add your application databases again.
NOTE If you do not want to lock down access to SilverStream data and require user authentication, you can run the -n option in Full mode.
You can use SilverMasterInit to regain access to locked resources. The SilverMaster database is where SilverStream stores all system resources and links to other databases. By default, any user with the SilverStream Locksmith privilege has Read access permission to the SilverMaster. If all users are accidently denied access to the SilverMaster database, no one will be able to access the SilverStream server, either through the Designer or through the SMC.
See the following sections if you suspect that Read access to SilverMaster has been restricted:
By default, the administrator and any other user with Locksmith privilege can get and set data access permissions for any resource in any database, read all SilverMaster resources, and grant Locksmith privilege to users and groups. The only user that can grant the Locksmith privilege is someone who is already a locksmith. If all accounts with the Locksmith privilege get deleted, use the SilverMasterInit locksmith option to grant this privilege to a user to regain access to resources.
NOTE By default, after a new installation or after you run SilverMasterInit in Full mode, an administrator account is automatically created that has Locksmith privilege.
Once a user with the Locksmith privilege can access SilverMaster, that user can unlock resources and reset access privileges.
For more information, see
Using the Locksmith privilege.
From SilverStream\bin directory, enter:
SilverMasterInit -l-Udbusername-Pdbpassword
The locksmith can now use the SMC to unlock resources.
You can set server authentication from the SMC or the SilverMasterInit command line. Set server authentication if you accidentally restrict Read access to your SilverMaster database. If users cannot access SilverMaster, run the SilverMasterInit server authentication option to allow users to authenticate themselves when they initially connect to the server. When a user logs in to the SilverStream server from the Designer or SMC, a request for the login resource is issued. Users cannot access the login dialog box if their access to SilverMaster is restricted, because they have no Read access to the database. This is because the SilverMaster has the login resource.
You do not need to specify Full or Refresh mode when you run the server authentication option. When you restart the server after setting server authentication, your first attempt to access the server will bring up the credentials dialog and you can log in.
From SilverStream\bin directory, enter:
SilverMasterInit -a-Udbusername-Pdbpassword
Restart the SilverStream server.
Users will now be prompted to log in.
In some obscure situations it is possible to exceed the limits of the stack, in which case the Java Virtual Machine (JVM) throws a java.lang.StackOverflowError.
About stacks On a Windows system in the Java environment, there are at least two program stacks (and possibly more, depending on the JVM implementation), any one of which can overflow and cause a StackOverflowError to be thrown:
There is always a hardware stack, which is used by native code in the JVM itself and by native code that is compiled from Java bytecodes by the Just In Time compiler (JIT).
There is always a Java bytecode stack, which is used for temporary storage of method call arguments and local variables for Java methods. This is a soft stack that is created and managed by the JVM.
Each thread created in the JVM has its own hardware and Java stacks.
What to do if you get a stack overflow It is possible to alter the size of each of the stacks if it is determined that the default stack size is too small. However, the most common cause of stack overflow errors is a programming error where a method is called recursively a number of times. If this is the case, increasing the size of the stack will not fix the stack overflow problem. Before attempting to increase the stack size, verify that the code does not contain any errors of this nature. Assuming the stack overflow is not caused by an infinite recursion error, it should be possible to fix the stack overflow by increasing the stack size. To determine which stack overflowed is largely a matter of trial and error.
The size of the hardware stack is determined by the operating system using a value stored in the header of the executable. The SilverStream executables (SilverServer.exe, SilverDesigner.exe, and SilverJRunner.exe) all specify a default stack size of 256K.
Changing the stack size In order to change the stack size, you must modify the executable header using Microsoft's EDITBIN utility. For example, to change the default stack size for SilverServer.exe to 512K, use the following command line:
EDITBIN /STACK:0x80000 SilverServer.exe
Of course, you should make a backup before modifying any executable.
If increasing the size of the hardware stack doesn't work, it is possible that the Java stack is the problem. In the JDK 1.1. documentation, there were two command-line options affecting the stack size:
The defaults were 128K and 400K respectively. Although these options are no longer documented in JDK 1.2 (Java 2), they appear to have been carried forward as nonstandard (-X) switches. To set these options for a SilverStream executable, use +X instead of -X (the SilverStream executables interpret + options as options to be passed to the JVM).
For more information about SilverStream startup options, see
Using startup options.
For example, to set both the native and Java stacks for the SilverStream server to a maximum of 512K, use the following command line:
SilverServer +Xss512k +Xoss512k
Note that increasing any of the default stack size values will increase the amount of virtual memory allocated per thread. Virtual memory is a finite resource, albeit a large one (in a 32-bit operating system such as Windows NT, processes can address up to 2G of virtual memory). Increasing the per-thread virtual memory requirement will reduce the number of threads that can be created. It is important to realize that this could reduce the number of simultaneously connected users that the server is able to support (since the server uses one thread per connected client).
This section describes some issues that you might need to address.
This section contains browser issues that you might encounter.
By default, Internet Explorer 5 returns its own HTML error page for common HTTP error messages. You need to turn off this processing to get the SilverStream error page.
To turn off Internet Explorer 5's default error reporting:
If the SilverStream server seems to be hung or in a loop, you can generate a listing of each thread with a stack trace. The procedure does not stop the server.
In Windows NT In the window where you started the server, press Ctrl+Break. SilverStream lists each thread with a stack trace.
In Solaris Determine the process that SilverStream is running under:
ps -all | grep Silver
kill -3 SilverServer_process_ID
SilverStream lists each thread with a stack trace in the window where the server was started from.
You might receive a Socket Exception message in your NT application log. Typically, this is not a problem: it usually indicates that a client has unilaterally closed a socket. Browsers such as Internet Explorer frequently do this when the connection has been idle for a while, and it will show up as a Socket Exception in the server's console when running with debugging.
Typically you can ignore such warnings; they simply reflect a normal situation.
If you call SilverStream Technical Support for assistance, you should have certain information ready.
For more information, see the section on contacting Technical Support in the first chapter of the Installation Guide.
|
Administrator's Guide |
Copyright © 2001, SilverStream Software, Inc. All rights reserved.