MATLAB Web Server Previous page   Next Page

General Troubleshooting

This information is relevant to all operating systems that support the MATLAB Web Server.

Event and Error Logging

The MATLAB Web Server provides a logging facility that may be useful in diagnosing operational problems. This facility supplements capabilities such as the Windows NT Event Viewer provided by the operating system. Logs may record all events or error events only.

Logging can be controlled using various logging options. Logging options may be set in the matlabserver.conf file or specified on the command line. Any option you specify on the command line overrides the value found in matlabserver.conf.

Use the matlabserver command on Windows NT and the webconf and webstart scripts on Solaris and Linux to set these options.

Table B-1: matlabserver Logging Options 
-f [log_filename]
Event log file. Required when logging to a file. File content determined by -v setting. (File logging is inefficient. Use when debugging only.)
-l [errorlog_filename]
(Solaris and Linux only). Error log file. Default is matlabserver_error.log in current directory. On Windows NT use the Event Viewer to see a list of error events.
Terminal logging. The logging level is set to 2 (transaction and buffer logging). (If you use this option with the matlabserver command on Windows NT, it must precede all other options on the command line.)
-v [n]
Verbosity. Controls file logging. Default is 0 (no logging). Additional values are 1 (transaction logging) and 2 (transaction and buffer logging).

Application-Specific Log File Not Produced

If present, the mllog variable in matweb.conf ( see matweb.conf) creates an application-specific log file. This file is not a MATLAB file; it is controlled by the operating system. If this file is not produced, check that the slashes in the pathname of your file are in the correct orientation for the operating system you are using.

Network bind Error (Port in Use)

If matlabserver fails to start because of a bind error, as noted in matlabserver_error.log or in the Event Viewer on Windows NT, the port you are attempting to run matlabserver on is busy. To fix this problem, you need to change the port number that matlabserver listens on. See the section matlabserver.conf for a discussion on how to change the port number. You may need to ask your system administrator to provide you with a valid unused port number.

M-File Programming Considerations

Make certain that each line of your M-file application is terminated with a ; character. Otherwise, the HTML output will be corrupted.

Connect() failure Error

There are two probable reasons why you may receive a
Error: connect() failure message:

  1. matlabserver is not running.
  1. On Solaris or Linux run the webstat script. On Windows NT click the Start button, open the Control Panel, and choose Services. The status of MATLAB Server should be Started.

  1. Port mismatch between matlabserver.conf and matweb.conf.
  1. The default TCP/IP port that matlabserver listens on is set at 8888. You may change this setting in the matlabserver.conf file with the -p option. The port setting for each application configuration in the matweb.conf file must agree with the port setting in matlabserver.conf. (See Table 3-2: matweb.conf Fields.) If you have changed the port setting in matlabserver.conf, you must similarly change the port setting in matweb.conf using the mlport option. If mlport is not explicitly set, the default of 8888 is assumed.

Locating matweb.conf

In some network configurations, it is not possible to give users access to the /cgi-bin directory of the HTTP server. In such cases a matweb.conf file should be created with only one entry, containing the actual location of a configuration file that users can edit. This entry must appear inside angle brackets < >. An example of this type of matweb.conf file is

where /apps/projects/strategy/matweb.conf is a valid accessible file.

Previous page  Troubleshooting Web Server Additional Troubleshooting for Windows NT Next page