Difference between revisions of "Xebra Server Administration"
(→Modules) |
(→Modules) |
||
Line 56: | Line 56: | ||
* mod_cmd: Listens to command request from the webapps on port 55002. | * mod_cmd: Listens to command request from the webapps on port 55002. | ||
− | {{Note| The server can only be shut down by the servercontrol webapp if the mod_console has been shut down manually from withing the console!! This problem is due to the uninteruptability of io.read_line}} | + | {{Note| The server can only be shut down by the servercontrol webapp if the mod_console already has been shut down manually from withing the console!! This problem is due to the uninteruptability of io.read_line}} |
=Webapps= | =Webapps= |
Revision as of 14:57, 10 August 2009
About | Installation | Documentation | Tutorials | Frequently Asked Questions
Contents
Run Xebra Server
- Run
Linux
cd $XEBRA_DEV/eiffel_projects/xebra_server EIFGENs/xebra_server/F_code/xebra_server config.srv
Windows
cd %XEBRA_DEV%\eiffel_projects\xebra_server EIFGENs\xebra_server\F_code\xebra_server.exe config.srv
- Or to see a list of run arguments type instead
Linux
EIFGENs/xebra_server/F_code/xebra_server -help
Windows
EIFGENs\xebra_server\F_code\xebra_server.exe -help
- Stop the server by typing
exit
- For a list of server commands type
help
Run Xebra Server in EiffelStudio
- Launch estudio and compile the project $XEBRA_DEV/eiffel_projects/xebra_server/xebra_server-voidunsafe.ecf
- Go to the Execution -> Exceptions Handling dialog. Check "Filter Exceptions?" and change DEVELOPER_EXCEPTION to "Ignore".
- Open the Execution -> Execution Parameters dialog and set "config.ini" as argument (see below for more info about run arguments).
- Compile
- Fill in the Xebra Server Config File
- Run
- Browse to http://localhost:55000/helloworld/. The server now translates, generates, compiles and finally runs the helloworld application.
Modules
The server automatically launches the following modules:
- mod_http: Listens to requests from the http plugin (Apache Module or IIS7 Handler) on port 55001. These request are forwarded to the appropriate webapp.
- mod_console: Reads input from the console. The commands described below can be invoked.
- mod_cmd: Listens to command request from the webapps on port 55002.
Note: The server can only be shut down by the servercontrol webapp if the mod_console already has been shut down manually from withing the console!! This problem is due to the uninteruptability of io.read_line
Webapps
Assume webapps are running
If assume_webapps_are_running was set, the server does not translate, compile and run the webapps. It just tries to connect immediately. This should be used when a webapp is launched in estudio for debugging and the server should not try to run and shutdown the webapp.
Development Mode
By default, a webapp is set to Development Mode which means that the server checks everytime a request was made if the webapp needs to be retranslated and compiled. This makes access to the webapp very slow. As soon as development of the webapp stopps, dev_mod should be set to off.
Fire off a webapp
If the server crashed and therefore could not properly shut down all webapps, they will still be running when the server is relaunched. Hence, the socket will be occupied when the server tries to launch a webapp. Use the fire command to fire off a possibly running webapp. The fire command tries to directly connect to the webapp and send a shutdown signal regardless if the webapp process is owned by the server or not.
Config File
Run Arguments
USAGE: xebra_server <config_filename> [-d <debug_level>] [-c] [-r] [-v] OPTIONS: -d --debug_level : Specifies a debug level. 0: No debug output. 10: All debug ouput. (Optional) -c --clean : If set, all webapps will be cleaned (Optional) -r --assume_webapps_are_running: If set, the server assumes that the webapps are already running and does not translate, compile and run them before connect to them. (Optional) -h --help : Display usage information. (Optional) -v --version : Displays version information. (Optional) ARGUMENTS: <debug_level>: The debug level (0-10) NON-SWITCHED ARGUMENTS: <config_filename>: The path of the config.ini file to use.
Console Commands
General
- 'help': Displays a list of commands.
Webapps
- 'clean <name>': Cleans, re-translates, compiles and launches a webapp.
- 'dev <name>': Sets developing mode of a webapp to on.
- 'dev_all': Sets dev_mod to on on all webapps.
- 'dev_off <name>': Sets developing mode of a webapp to off.
- 'dev_off_all': Sets dev_mod to off on all webapps.
- 'dev_on <name>': Sets developing mode of a webapp to on.
- 'disable <name>': Disables a webapp.
- 'enable <name>': Enables a webapp.
- 'fire <name>': Sends shutdown signal to webapp.
- 'get_sessions': Retrieves the number of sessions of all running webapps.
- 'shutdown <name>': Shuts down a webapp.
- 'translate <name>': Forces re-translation of webapp.
- 'webapps': Displays the available webapps.
Server Control
- 'exit': Shuts down the server.
- 'reload': Reloads the server configuration file.
- 'shutdown_webapps': Shuts down all webapps.
Modules
- 'mlaunch <name>': Re-launches a server module.
- 'modules': Displays the available modules.
- 'mshutdown <name>': Shuts down a server module.