ifpServer Startup Information

January 3, 2006

Table of Contents

Starting the ifpServer
ifpServer Check Configuration Files Mode
Problems starting the ifpServer
Stopping the ifpServer
Starting the ifpServer automatically on reboot
Automatic Configuration of Text Products

Starting the ifpServer

The ifpServer is started with the "runIFPServer" script, which is located in the release/bin directory, normally /awips/GFESuite/primary/bin or /awips/GFESuite/svcbck/bin on AWIPS-baselined equipment.

runIFPServer [-D] [-n] [-t] [-i] [-b] [-a alternateA2Afile]
 
 
Command Line Option Optional? Meaning
-D YES Runs the ifpServer as a daemon.  Normal use of the server is to run it as a daemon. The runIFPServer script will add this option automatically.
-n YES Runs the ifpServer in a "check" configuration files mode.  The server checks the configuration files, reports any errors, and exits.
-t YES Runs the ifpServer in a "terminal" mode, indicating that the ifpServer will not be run as a daemon.  The messages will be output to the terminal and the server will not be run in background.
-i YES Runs the ifpServer in a setup mode only. ifpServer will generate the map backgrounds, edit areas, and configure the text products. The server will then stop. No network connections are brought up.
-b
YES
Runs the ifpServer in a BASELINE mode only.  The localConfig, localMaps, localWxConfig are ignored.
-a alternateA2AFile
YES
Configure the text products using the specified afos2awips.txt file.  Normally this switch is only used for testing purposes.

Note: the -t switch overrides the -D switch.  The -n switch overrides the -D switch.
Note: on IFPS systems, there is another script that is run that starts all of the necessary IFPS servers.  That script calls the runIFPServer script.

It is somewhat dangerous to run the ifpServer in BASELINE mode as data may be lost.   Any local weather elements defined will no longer exist.  This may cause local product generation scripts to fail and the user may be forced to run the baseline versions of the text formatters.



 

ifpServer Check Configuration Files Mode

Starting the ifpServer with "runIFPServer -n" will place the ifpServer into a check configuration file mode.  The server will simply check the files and then exit.  The following files are checked: In the event of an error, output in the log file and on the console will be output showing the file and the location of the Python error.  The check script handles syntax errors, but cannot detect all errors.

Here is an example with no errors:

14:42:47.193 ifpServer.C 152 EVENT: IFP Data Server Starting
14:42:47.195 ifpServer.C 153 EVENT: Version: Build Date: Wed Mar 27 14:37:52 2002 Built By: mark On: camper.fsl.noaa.gov (linux2) Version: development
14:42:47.283 ifpServer.C 162 EVENT: Checking for server configuration python errors
14:42:47.284 ifpServer.C 706 EVENT: Loading server configuration info
14:42:49.069 ifpServer.C 168 EVENT: No python syntax errors found
14:42:49.070 ifpServer.C 172 EVENT: IFP Data Server Stopped.
 
 

If an error has occurred, then the messages displayed on the console will be similar to this; typically the last line or two will point out the location of the error and the line number:

14:45:12.649 ifpServer.C 152 EVENT: IFP Data Server Starting
14:45:12.651 ifpServer.C 153 EVENT: Version: Build Date: Wed Mar 27 14:37:52 2002 Built By: mark On: camper.fsl.noaa.gov (linux2) Version: development
14:45:12.775 ifpServer.C 162 EVENT: Checking for server configuration python errors
14:45:12.776 ifpServer.C 706 EVENT: Loading server configuration info
14:45:13.109 ifpServer.C 711 PROBLEM: Failed to load one of the following
serverConfig.py, localConfig.py, or localWxConfig.py
Python error:
Traceback (most recent call last):
  File "/scratch/head/GFESuite/etc/serverConfig.py", line 817, in ?
    import localConfig
  File "<string>", line 1
     from serverConfig 8mport *
                       ^
 SyntaxError: invalid syntax

14:45:13.889 ifpServer.C 690 PROBLEM: Error in Maps.py or localMaps.py file:
Traceback (most recent call last):
  File "/scratch/head/GFESuite/etc/Maps.py", line 161, in ?
    import localMaps
  File "/scratch/head/GFESuite/etc/localMaps.py", line 5, in ?
    maps.remove(Cwamzones)
NameError: name 'Cwamzones' is not defined

14:45:13.890 ifpServer.C 172 EVENT: IFP Data Server Stopped.

The above information indicates there is a problem in importing "localConfig", line 1.  The traceback shows the error location.  The second error was found in the localMaps.py file, the name "Cwamzones" was not defined, probably due to a misspelling.


Problems Starting the ifpServer

The ifpServer does some checks before it is fully functional.  If any of these checks fail, then the server will not come up and will shut itself down: If the server does not come up, then look in the log files for problems.  The logfiles are in release/data/logfiles/yyyymmdd/ifpServer*, typically /awips/GFESuite/primary/data/logfiles/yyyymmdd/ifpServer*, where yyyymmdd is the date-time group.


Stopping the ifpServer

Stopping the ifpServer is accomplished with the following command:

stopIFPServer

which is located in the release/bin, typically /awips/GFESuite/primary/bin on the AWIPS-baselined systems.


Starting the ifpServer automatically upon reboot

If you do not want to invoke the runIFPServer script manually each time the machine is rebooted, you can arrange for it to be run each time the
machine is rebooted.  Perform the following step (you will need to be logged in as the "root" user):
 
  • Edit the file  /etc/rc.d/rc.local.  Add the following shell code, replacing the values assigned to GFEHOME and GFEUSER with values that match your installation.:

  •  
    # Change GFEHOME and GFEUSER to match your setup
    GFEHOME='/where/you/installed/the/gfe/suite'
    GFEUSER='ifps'
    if [ -x $GFEHOME/bin/runIFPServer ]; then
        su -c $GFEHOME/bin/runIFPServer $GFEUSER
    fi
    The typical setup for NWS AWIPS baselined machines where /awips/GFESuite/primary is the installation directory would be:
     
     # Change GFEHOME and GFEUSER to match your setup
    GFEHOME='/awips/GFESuite/primary'
    GFEUSER='ifps'
    if [ -x $GFEHOME/bin/runIFPServer ]; then
        su -c $GFEHOME/bin/runIFPServer $GFEUSER
    fi


    Now the server will be started when the machine is booted.
     


    Automatic Configuration of Text Products

    When the ifpServer is started, the text formatter COMBINATION files are automatically created, as is the required AreaDictionary. This information is based on map background shapefile information.

    The text formatters templates are also automatically configured when the ifpServer is started. Although there is no need to manually run the configure text products script anymore, it is still available. Refer to configureTextProducts script.