Debugging and troubleshooting
|
If Faxchange doesn't work correctly, you can run some of its component in debug mode. It means component doesn't
run as a service but as a console application which writes messages about its work to the screen. These messages
help you discover where is problem.
Content
- How to run Faxchange components in debug mode?
- How to set console window to be usable?
- How fax is processed during sending?
- How fax is processed during receiving?
- Special debugging options
- Logging of individual component's work
How to run Faxchange components in debug mode?
Most of Faxchange server components (or other UMS products) can be run in debug mode. In this mode you
can see what component really does or not.
Procedure:
- Stop and disable service to be debugged
- Find EXE file for this service (converters in convert/big/bin.4/ and convert/small/bin/,
other in bin/)
- Run EXE file with -d parameter, or -debug, debug, -c. If you
use /? switch, you get help in most cases.
What you can debug and using which command line:
Service name | Command line |
Faxchange.ConvertBig | fxcnvbig.exe -debug |
Faxchange.Master | fxmcnv.exe -d |
Faxchange.ConvertRtf | fxrtf.exe -debug |
Faxchange.LineDrvBT | fxbktr.exe -debug |
Faxchange.LineDrv.TRxStream | fxboston.exe -debug |
Faxchange.LineDrv2 | fxcls2.exe -debug *) |
Faxchange.Server | fxsrvr.exe -debug |
Faxchange.SysAtt | fxsysatt.exe -d |
Faxchange.Gate.Fax | fxGw2k.exe notserv Faxchange-Gate-Fax |
Faxchange.Gate.Notes | fxlngate.exe -debug |
Faxchange.Pop3Smtp | fxsmtp.exe -debug |
UMS.LineDrv.CAPI_ISDN | vxfxcapi.exe -debug |
Faxchange.Router | fxrouter.exe -debug |
Faxchange.EricssonDIR | ericson.exe -debug |
Faxchange.MailRobot | robot.exe -d |
*) if you are using more than one modem, debug mode is invoked by another way - fxcls2.exe X, where X means line
number. If you have two modems, first is debugged using fxcls2.exe 0, second using fxcls2.exe 1
back to top of page
How to set console window to be usable?
Click to icon on upper left corner of command prompt window. Select Properties in displayed menu.
Set Screen Buffer Size - Height parameter on Layout tab to 9999.
Now scrollbar is created at the right window edge and window "remembers" program's output up to 9999 lines. You can
mark all written text and copy it to the clipboard using Edit function in menu under corner icon.
back to top of page
How fax is processed during sending?
Fax is represented by "control" text file, usually with CTL extension and by one or more data files in all points of
processing. Control file is common text file editable for example by Notepad.
Extension of control file in some folders (fax/out/, convert/in/) determines which operation with control
file is in progress (see next text).
First letter of the name of the control file usually determines priority (h/n/l); files with higher priority are processed first.
It allows to send a fax during processing of big faxmailing (faxmailings have automatically lowered its priority).
In mail/in/ and mail/out/ folders first letter determines which gateway should process this file
(e,f = MS Exchange, l = Lotus Notes, s = SMTP/POP3).
Fax processing runs according this order:
- Gateway gets message from the user and save it to mail/in/ folder.
- Server takes message, check user's rights, moves control file to fxsrvr/tmp/ and data files to
convert/in/.
- Server creates control files for conversion in convert/in/ and waits until conversion finishes
(or processes another tasks).
- ConvertMaster divides data files - RTF files delivers to RTF converter, other files to converter of common
documents. In both cases ConvertMaster copies data files to convert/big/in/ or convert/small/in/
and creates control files for them. Then waits until conversion finishes (or processes another tasks).
- Converter of common documents (FaxChange.ConvertBig) processes data in this way:
it reads information about associated application for document to be converted from the registry, runs this application
and sends it command for document printing (if application knows such command). Application prints to
FaxChange Server Printer (converter set it as a default printer constantly). Data stream from output of this
printer is taken by server printer driver - FaxChange.ConvertPrint.
- RTF converter converts RTF files using Microsoft OLE object. Conversion isn't so superior as conversion
by MS Word (tables, OLE objects etc.), but it is very quick and uses less computer resources. Messages are usually
in RTF format -> it is necessary convert them quickly.
From Faxchange 4.0 SP2 it is possible to convert RTF using associated application, see
KB record.
- Converters store their outputs to convert/small/out/ or convert/big/out/. ConvertMaster
moves them from this location to convert/out/.
- Server moves converted documents to fax/out/. Then sends preview for user - control file is moved to
fxsrvr/preview/ and preview is stored to mail/out/, where is taken by gateway.
- Gateway receives reply for preview from the user and save it to mail/in/ folder. Server
takes it, moves CTL file from fxsrvr/preview/ to fax/out/ (if reply was "Yes, send fax") and "clones" it
- creates one copy for every recipient.
- Line driver searches for fax/out/*.ctl files. If some file is found, renames it to *.now and
tries to send a fax referenced by this file. When attempt finishes driver writes [attempt] section to the control file,
which describes history of this attempt.
- If sending was successful, control file is renamed to *.sts
- If sending was unsuccessful, control file is renamed to *.wtl
- If sending was unsuccessful and maximum number of attempts was reached, control file is renamed to
*.sts
- Next processing depends on information if fax was sent or not:
- Successfully sent fax (*.sts) is taken by server, archived, printed (if required) and user is sent delivery
report (DR is saved to mail/out/ for gateway).
- Unsent fax which has allowed additional sending attempts (*.wtl) remains renamed to *.wtl until
time period between attempts is reached (configurable via fxCfg). Then it is renamed back to *.ctl by
server and is attempted to send again.
- If fax wasn't sent and maximum number of attempts was reached, server moves control file to
fxsrvr/errors/ and using gateway (mail/out/) sends non-delivery report to user.
- User replies that fax sending should be tried again. Server moves control file back to
fax/out/ with *.ctl extension
- User replies that fax will not be tried to send anymore. Server archives this fax (and prints), then delete it.
- User doesn't reply during time limit - the same action as when fax shouldn't be tried again and user gets information
about aborting this fax.
back to top of page
How fax is processed during receiving?
Technology of control files etc. is the same as during fax sending.
- Line driver handles incoming call, receives PABX up to maximum length set in fxCfg (don't mask it).
Fax and CTL are saved to fax/in/.
Here you can discover in CTL file which PABX was physically received from phone line (PABX= item).
- Server takes these files, performs PABX masking, archives, prints and sends fax to final recipient
according routing rules (by saving to mail/out/).
back to top of page
Special debugging options
Some services can be debugged without necessity to running in debug mode. You can direct service to create logfile
via registry editing, then restart service. All registry keys will be specified relative to
HKLM/software/Datasys/Faxchange key, if not specified exactly.
- Brooktrout driver
This service has very rich logging options:
- Driver logging - in driverX/system create logfile value of REG_SZ type and enter
full path + filename of logfile. X is driver number, usually 1.
- Line logging - in lineX/system create logfile value of REG_SZ type and enter full path +
filename of logfile. X is line number.
- Tarify information logging (AoC on ISDN line) - in lineX/system create tarifylog value of REG_SZ
type and enter full path + filename of logfile. X is line number.
- Creating debug information directly from Brooktrout API:
create value driverX\system\apilogfile (REG_SZ) with full path to logfile
create value driverX\system\apiloglevel (REG_SZ) and enter log level for BT API from table.
Enter numeric value (not text).
debug_none | 0 |
debug_all | -1 |
debug_print_cmd | 1 |
debug_print_intr | 2 |
debug_mon | 4 |
debug_err | 8 |
debug_debug | 16 |
WARNING! These settings are valid only for Faxchange driver (Faxchange.LineDrvBT)!
If you use shared Faxchange/Voicechange driver (UMS.LineDrv.Brooktrout), these settings can be found in
HKLM/software/Datasys/UMS/drivers/brooktrout key (API log settings + driver logging) and here in chan_x
subkeys, where x is line number (line logging). Values are prepared, you need only fill them and restart service.
- ClassX driver
Set value 0local/system/class2dbg to "1" (one, without quotation marks). When driver is started it
creates file faxman.log in the root of system drive with debug information.
This works only when Faxchange uses only one modem!
- Converters
Set value global/system/mcnv_keep_err to "1". Now if some error occurs then ERR file remains in
output folder and you can analyze it.
Output folder for "small" converter is faxchange/convert/small/out.
Output folder for "big" converter is faxchange/convert/big/out.
You can also use BIG_CNV/KEEP_ERR value for big converter debugging - set 1 here to create ERR
file with debug info.
- CAPI driver
For driver logging create logfile (REG_SZ) value under HKLM/SOFTWARE/Datasys/UMS/drivers/vxcapi key and enter
full path to logfile. Text logfile with information about CAPI driver will be created after
service restart.
- Lotus gateway
Automatically creates ERR files in faxchange/mail/out/err folder. You can found information about last
completed operation done by gateway in this file. When gateway is correctly terminated, ERR file is deleted.
In case of error file remains in the folder and you can analyze it.
If you have gateway version 4.6.0.119 and higher, then when registry HKLM\SOFTWARE\Datasys\FaxChange\LN_GATE\KeepLog=1
(string value) all ERR files are kept, so you can trace gateway's work in detail.
- Exchange fax and mail gateway
Logging of gateway 's work - in HKLM/SOFTWARE/Datasys/Faxchange/global/exchange change GwDebugMode value from zero to one.
After fax and mail gateway restart log files C:\gwlog-fx-fax.log (fax gateway) and C:\mg-log-pri.txt (mailbox agent) will be generated.
- AD provider
Logging of work - in HKLM/SOFTWARE/Datasys/FaxChange/install/exchange change ProviderDebug value from 0 to 1.
Other settings under this key (if value doesn't exist, create it):
LogPath - folder, where logfile fxadprovider.YYMMDD.txt is created (if logging is switched on).
If LogPath value isn't filled, default location is used: path to local application settings in user's profile is read from registry value
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Local AppData
and Datasys\Faxchange\log
folder is created here. Path to logfile is then
C:\Documents and Settings\<user>\Local Settings\Application Data\Datasys\Faxchange\log
LogLevel - logging level, number between 1 (least) and 5 (most).
Log will be generated when services using AD provider are restarted.
- Brooktrout TR10xx driver (LineDrv.TRxStream)
Configution is stored in the registry key "HKLM\Software\Datasys\FaxChange\boston\log".
Value |
Default content |
Description |
00_start_stop |
3 |
- 0 - not logged
- 1 - log to console
- 2 - log to file
- 3 - log to console and file
|
01_fatal |
3 |
02_error |
3 |
03_warning |
3 |
04_info |
3 |
05_debug |
1 |
06_trace |
1 |
07_BrooktroutAPI |
0 |
EventLogFilter |
3 |
Events with importance lower than specified value will be logged into Windows application eventlog.
Default value means 00_start_stop, 01_fatal a 02_error. 0 = no logging, 8 = log all events. |
log_filename |
|
Log file name. If not specified, no log is created. |
log_overwrite |
1 |
1 = old log will be rewritten by new one. Otherwise old logs are renamed by adding
time of renaming to log file name. |
Logging can be switched off by this way:
- if logging is switched on by setting registry value to 1 - change value to 0.
- if logging is switched on by creating value with filename - delete this value.
Now you must restart appropriate service.
back to top of page
Logging of individual component's work
From Faxchange version 6.0.35 you can force some Faxchange components to write information about its work into log files.
How to switch this feature on?
Find dir item under HKLM\SOFTWARE\Datasys\FaxChange\log\system
registry key. It is empty by default;
set folder here, where logs will be created, e.g. D:\faxchange\etc\log\. You can also enter loglevel - create level (REG_SZ) item
here, it can contain values FATAL, ERROR, WARNING, INFO, DEBUG, TRACE (sequence from lower to higher level).
Now restart that Faxchange services you want to write log files.
Every component creates its own subfolder (named according table) in selected folder and writes log rrmmdd_<name>.log,
where name is the same as subfolder name - see the table:
Faxchange.ConvertRTF (RTF convertor) |
crtf |
Faxchange.Gate.Fax (fax gateway) |
fxgw |
Faxchange.Mail.Fax (mail gateway) |
fxmb |
Faxchange.Server (fax server) |
fxsv |
Faxchange.ConverPrint |
rastiff |
Faxchange.ServerPrinter (fax server printer) |
srpr |
Faxchange.SysAtt (system attendant) |
ssat |
Database interface |
fxODBC |
UserManager |
usrMgr |
Some components can store here also files with faxes, so we recommend to switch logging on only to necessary amount of time
(problem detecting). To switch logging off, delete content of HKEY_LOCAL_MACHINE\SOFTWARE\Datasys\FaxChange\log\system\dir
value and restart Faxchange services.
back to top of page