Web account

Web account

Role

  • The web account is the Unverse account that processes http requests via its WI.HDL lines.
  • The program that manages WI.HDL lines is WI.HDL.MNG 1).
    It allows to restart automaticaly a WI.HDl line if this one is down or running since too long.
    It is based on the WEB account pool configuration.
    WI.HDL.MNG starts as many WI.HDL PHANTOM as the value it founds in the Min column, provided that the pool is active.
    For exemple, WI manager would start like this :
PHANTOM SQUAWK WI.HDL -H localhost -P 1505 -N WT
PHANTOM SQUAWK WI.HDL -H localhost -P 1505 -N WT
PHANTOM SQUAWK WI.HDL -H localhost -P 1505 -N WT

Installation

  • 1. Installation of the WEB account.
  • 2. Configure the pool that will communicate with the wiservice
  • 3. Add the WI.HDL.MNG programm to the server boot.
  • 4. Start manually the WI.HDL.MNG

Configurer le(s) pool(s) qui communiqueront avec le wiservice

Field Description Example
Pool name Name given to the pool.
:W: There cannot be two DB servers sharing the same name and communicating to the same WIService. Otherwise the WIService can't know to which DB server it should send the request
Active pool = YES. WI.HDL.MNG manages this pool
= Non : WI.HDL.MNG doesn't manage this pool
= TEST : used when the developper wants to run a non-crypted WI.HDL line and doesn't need WI.HDL.MNG to manage this pool
Account UVAccount on which HTTP requests will be running in case when no account is specified in web application
In theory, UV Account is always specified in web application
Lifetime Maximum lifetime of a WIService. When this time is over, WI.HDL.MNG starts a new one.
A new WI.HDL line is started because after some uses, running speed can decrease
Hostname Server name (or IP adress) on which is installed WIService
Niv Log level :
- 0 : Debug
- 1 : Info
- 2 : Warning
- 3 : Error
The lowest the log is, the more there will be log messages in “log path” directory More information
log path Log path directory
Under linux, you must add “\” prefix because a firts line cannot start with “/” in a SB Screen
Port TCO communication with WIService port number
Min Amount of WI.HDL lines to start for this pool and this hostname
Max used in D3, not in UV/UD.
Min F used in D3, not in UV/UD.
Max F used in D3, not in UV/UD.
Noop used in D3, not in UV/UD.
Check used in D3, not in UV/UD.

Procedure to run WI.HDL.MNG when server starts up

Windows

WI.HDL.MNG starts from a bat ran by planned tasks

Batch file “WIHDLMNG.bat” checks if “Unverse” service is started

  • If it is not, it will attemp every 60 seconds (10 attemps max)
  • If Universe service is started, then it runs WI.HDL.MNG

Bat file :

@echo off
echo Start WI.HDL-MNG
setlocal EnableDelayedExpansion
for %%v in (1 2 3 4 5 6 7 8 9 10) do (
sc query "universe" | find "RUNNING"
if "!errorlevel!"=="0" (    
  echo universe running
  E:
  cd E:\INTEGRIX\UVDB\WEB 
  E:\INTEGRIX\UVDB\UV\bin\uv.exe "PHANTOM SQUAWK WI.HDL.MNG"  
  exit
) else (  
  echo universe is not running
  timeout /t 60
)
)
echo fin WI.HDL-MNG
exit

Procedure

  1. Copy bat file under $UVDB\batch directory
  2. Add task in “task planificator”
    1. Go under “Control panel” –> “Administration tools” –> “Task Scheduler”
    2. Create a task
    3. Task configuration :
      1. Run it even if user is not connected. Run it with maximal credentials.
      2. Trigger : run this task at DB server starting.
        Postpone the starting of the task to get sure that Universe service is started (3 minutes should be enough)
      3. Actions : start a programm
      4. Conditions : none
      5. Parameters : tick “FIXME
At the next starting of the server, check that the WI.HDL.MNG has correctly started
If you get a 500 errr (no handler available), that means that your WI.HDLs are not started.

Linux

  1. Copy /etc/init.d/UV.phantoms file
  2. Copy /etc/UV.phantoms.conf file
  3. Copy the following scripts from /infodata/scripts-live :
    1. common
    2. common.conf
    3. runas
  4. Configure /etc/UV.phantoms.conf. file
    Example :
    #UV.phantom service configuration file
    #synthax : - delimiter : ":"
    #          - field 1 : "hostname -s" conc
    #          - field 2 : sudo user
    #          - field 3 : path of UV account
    #          - field 4 : how many occurences of phantom
    #          - field 5 : command (without verb PHANTOM)
    nomDeMonServeur:monUserLinux:/data/uvdb/WEB:1:PHANTOM WI.HDL.MNG

Start/Stop/Status WI.HDL.MNG

  • Starting, stopping, checking a WI.HDL.MNG status can be done from the WEB account.

Start menu

  • This menu enables to start WI.HDL.MNG.
    If it already started, it will not start a new instance.
    Only WI.HDL lines from actve pools (=0) will be started.
It is possible to check if WI.HDL.MNG has well started, from FWI.LOG.EXE/WI_MANAGER_AAAA_MM_JJ.txt file

Stop menu

  • Stop menu stops WI.HDL.MNG
    It also stops every WI.HDL line.

Status menu

  • Status menu allows to know if WI.HDL.MNG is started, and returns every WI.HDL line status, and some details.
  • WI-Status example :
Status du WI.HDL.MNG Ecran
Line 1 WI.HDL.MNG is running or not WI.HDL.MNG IS RUNNING
WI.HDL.MNG ISN'T RUNNING
Line 2 WI.HDL.MNG is shutting down WI.HDL.MNG IS SHUTTING DOWN
Detail ligne WI.HDL
Name Description Example
PID WI.HDL line PID
If PID has more than 3 values, that means that the line was started by a phantom
Otherwise, WI.HDL line was started manualy
11502
Pool (Actif) Pool name (FWI.CFG) and if line is active (or not)
Active : Yes, No or test
A “test” pool is not managed by WI.HDL.MNG
It allows deleoppers to test their WS
UNIVERSE (Oui)
Hostname Server's name or IP (server where is the WIService) 192.160.0.2
Port le port de communication entre la ligne WI.HDL et le WIService 1505
Started Date and time from WI.HDL line starting 13/10/2015 16:59:50
Last status Date and time from Wi.HDL line last activity,
that can be :
- last WS call
- date time of the last WI.HDL heathbeat (every 20 seconds)
14/10/2015 08:33:40
Status WI.HDL line status. Allows to know what it is doing
Last Application Name of the last WIAPP (FWI.APP) called AC.UNIV
listes des status d'une ligne WI.HDL
  1. Starting : WI.HDL line is starting. This is the first status of a WI.HDL line
    You should never see this status
  2. Socket : WI.HDL attemps to connect to WIService
    If this status continues over than 5 seconds, that means that WI.HDL line cannot connect to WIService
  3. Identification : After WI.HDL gets an answer from WIService, saying that it received a connection request, WI.HDL line ID's to WIService.
  4. Waiting request : WI.HDL line is available and functional. It is ready to receive a new request.
    This is the most often visible status
  5. Retry connection : WI.HDL line has lost connection to WIService.
  6. Something to do : This is the first status whan WI.HDl has received a request. This status comes before WI.HDL analysises the request, and so before it runs the treatment routine
  7. Verifying application : This status means that WI.HDL will check the received request, wil check if the remote account is correctly configured and will check app and/or user authentication
  8. Executing Subroutine XXX : This status appears when a routine was called and is still running.
    If this status lasts too long, that could mean that the routine is down
  9. Responding : The routine ended its job. WI.HDL will send the WIService a result
  10. Sending Error : An error message is sent to the WIService. Http code different from 200
  11. File : Open connextion in file mode (and not in socket mode). This status is not used anymore
  12. Shutdown : la ligne WI.HDL est arrêtée. Ca se produit lorsqu'on passe le status actif(HDL.ACT) à “N” de la ligne WI.HDL.
    Le WI.HDL.MNG peut arrêter une ligne WI.HDL tous les x temps pour en démarrer une nouvelle
  13. Shutdown : WI.HDL line is stopped. That happens when WI.HDL status changes from Acrive (HDL.ACT) to “N”.
    WI.HDL.MNG can stop a WI.HDL line FIXME

Log

  • In order to know the activity of every WI line and find a WS processing, WEB account allows you to log your activity
  • There are many log levels. The lower the level is, the more there will be log messages.
    The 4 levels are :
    • 0 - Debug
    • 1 - Info
    • 2 - Warning
    • 3 - Error
  • Log level can be configured in several places :
    • By pools (FWI.CFG).
    • By application (FWI.APP).
    • By RFL (FWI.RFL.OBJ)
  • A log activation causes a log writing in an OS fle.
    The log file name will have the following structure :
    • Pool : “POOL_”:{poolId}:“_”:{YYYYMMDD}:“_”:{pid}:“.txt”.
      Example : POOL_XXX_20150727_9676.txt
    • Application : “APP_”:{appId}:“_”:{YYYYMMDD}:“_”:{pid}:“.txt”
      Example : APP_AC.XXX_20150727_9676.txt
    • RFL : “RFL_”:{rflid}:“_”:{YYYYMMDD}:“_”:{pid}:“.txt”.
      Example : RFL_AC_DOS_20150727_9676.txt

Pools log

Example

Mode Info
L	14:21:06 27 JUL 2015	Starting WI.HANDLER on 18100 as jcd to www.infodata.lu:1505 working in pool XXX	
L	14:21:06 27 JUL 2015	Opening the socket	
L	14:21:06 27 JUL 2015	Connected, saying hello	
L	14:21:06 27 JUL 2015	Index : 3, WIService Version :INFODATA	
L	14:21:31 27 JUL 2015	----------------------------------------------------	
L	14:21:31 27 JUL 2015	REQUEST.URL : /dos	
L	14:21:31 27 JUL 2015	WIAPP FINAL = AC.XXX		
Error Mode

Error mode only displays error messages

Log applications

Example

Here is the result of the same request, related to the log level :

Debug mode
L	14:53:24 27 JUL 2015	----------------------------------------------------	
L	14:53:24 27 JUL 2015	WIAPP FINAL = AC.XXX	
L	14:53:24 27 JUL 2015	Values
W3HOSTNAME= XXX
W3EXEC= AC.XXX
L	14:53:24 27 JUL 2015	CGI
UPN= TP
HTTP_USER_AGENT= Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36
ACCEPT-LANGUAGE= fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
ACCEPT-ENCODING= gzip, deflate, sdch
X-FORWARDED-HOST= webserver.com
REMOTE_ADDR= 192.168.0.79
X-FORWARDED-FOR= 192.168.0.79
SERVER_PROTOCOL= HTTP/1.0
CONNECTION= Keep-Alive
ACCEPT= */*
USER-AGENT= Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36
HOST= localhost:1508
REQUEST_METHOD= GET
COOKIE= WITOKEN=451737541357; _ga=GA1.2.1196159395.1431519094; WITOKEN=451737541357
CACHE-CONTROL= no-cache
QUERY_STRING= w3hostname=XXX&w3exec=AC.XXX
HTTP_HOST= webserver.com
X-FORWARDED-SERVER= webserver.com
REMOTE_HOST= 192.168.0.79
CSP= active
REQUEST_PATH= /dos	
L	14:53:24 27 JUL 2015	Want to execute >AC.XXX<	
L	14:53:24 27 JUL 2015	Trouve pas session en variable	
L	14:53:24 27 JUL 2015	Session ID =451737541357	
L	14:53:24 27 JUL 2015	DIFF 1501200000-1501253436*	
L	14:53:24 27 JUL 2015	ANALYSE de url GET:dos	
L	14:53:24 27 JUL 2015	Check dos	
L	14:53:24 27 JUL 2015	Matches dos sur dos	
L	14:53:24 27 JUL 2015	URL OK	
L	14:53:24 27 JUL 2015	Routine finale WI.RFL	
L	14:53:24 27 JUL 2015	READ CATALOG DE WI.RFL	
L	14:53:24 27 JUL 2015	Call auth user WI.AUT.USR.XXX	
L	14:53:24 27 JUL 2015	Call auth application WI.AUT.APP.ACX	
L	14:53:24 27 JUL 2015	Try to execute >WI.RFL<	
L	14:53:24 27 JUL 2015	LOGTO AC.CCC	
L	14:53:24 27 JUL 2015	Executing WI.SUB WI.RFL	
L	14:53:24 27 JUL 2015	 ---> Debut routine WI.RFL	
L	14:53:24 27 JUL 2015	 ---> Fin routine  (Duree de la request : 6 ms)
	
L	14:53:24 27 JUL 2015	RETOUR WEB55	
L	14:53:24 27 JUL 2015	Cookies out
WITOKEN= 451737541357	
L	14:53:24 27 JUL 2015	Header out
CONTENT-TYPE= application/json; charset=UTF-8
X-WITOKEN= 451737541357
ACCESS-CONTROL-ALLOW-ORIGIN= *	
L	14:53:24 27 JUL 2015	Resultat[1,200] = 
[{"id":"AC.XXX","label":"XXX TEST WS"}]	

Info Mode
L	14:31:37 27 JUL 2015	----------------------------------------------------	
L	14:31:37 27 JUL 2015	WIAPP FINAL = AC.XXX
L	14:31:37 27 JUL 2015	Want to execute >AC.XXX<	
L	14:31:37 27 JUL 2015	Session ID =451737541357	
L	14:31:37 27 JUL 2015	ANALYSE de url GET:dos	
L	14:31:37 27 JUL 2015	Matches dos sur dos	
L	14:31:37 27 JUL 2015	Routine finale WI.RFL	
L	14:31:37 27 JUL 2015	LOGTO AC.XXX	
L	14:31:37 27 JUL 2015	Executing WI.SUB WI.RFL	
L	14:31:37 27 JUL 2015	 ---> Debut routine WI.RFL	
L	14:31:37 27 JUL 2015	 ---> Fin routine  (Duree de la request : 7 ms)
Error Mode

No message, unless there is an error

L	15:04:51 27 JUL 2015	Error
404= [WI] Could not find any good url 	

Log RFL

Mode Debug
L	15:05:17 27 JUL 2015	Objet RFL : AC_DOS	
L	15:05:17 27 JUL 2015	Conversion de 'CONTENT' au format OEM	
L	15:05:17 27 JUL 2015	METHODE : GET	
L	15:05:17 27 JUL 2015	Parametre : 	
L	15:05:17 27 JUL 2015	1. : GET	
L	15:05:17 27 JUL 2015	2. : AC_DOS	
L	15:05:17 27 JUL 2015	subroutine de selection : AC.RFL.DOS.SEL	
L	15:05:17 27 JUL 2015	Apres subroutine process de selection Erreur : 1,No authorized account	
E	15:05:17 27 JUL 2015	Erreur : No authorized account	

WI.HDL.MNG

FIXME : translate in english

  • Le WI.HDL.MNG logue son activité.
    Il prévient quand il démarre ou lorsqu'il arrête une ligne WI.HDL.
    Si une ligne WI.HDL refuse de s'arrêter parce qu'une routine ne rend pas la main, le wi.hdl.mng loguera toutes les commandes qu'il exécutera pour essayer d'arreter la ligne et il loguera la pile des appels de la routine bloquéé (PORT.STATUS PID XXX LAYER.STACK)

Exemple de log

  • Start du WI.HDL.MNG
boundary_WI_MANAGER_2015_10_13.txt
H	LogId=WI_MANAGER_2015_10_13.txt	12:22:17 13 OCT 2015
D	LOGNAME=jcd
D	USERID=
D	PHANTOM=1
D	ACCOUNT=WEB55 /data/uvdbsb55/WEB55
L	12:22:17 13 OCT 2015	----------------- STARTING WI.MANAGER '11963'-----------------	
L	12:22:17 13 OCT 2015	Active pool list : 	
L	12:22:17 13 OCT 2015	                   - pool 'UNIV'	
L	12:22:17 13 OCT 2015	                   - pool 'JCD'	
L	12:22:17 13 OCT 2015	Pas de WI.HDL actif	
L	12:22:17 13 OCT 2015	Nettoyage du fichier FWI.HDL : SELECT FWI.HDL WITH HDL.ACT.SEL # "O" AND WITH HDL.STA.STP.DAT <= 17453 AND WITH HDL.STA.STP.TIM < 44477.4248 =  0 record(s) selected to SELECT list #0. 	
L	12:22:17 13 OCT 2015	Starting PHANTOM WI.HDL...	
L	12:22:17 13 OCT 2015	        1. PHANTOM WI.HDL -H www.infodata.lu -P 1505 -N UNIV	
L	12:22:17 13 OCT 2015	           RESULT : Phantom process started with process ID 11966.	
L	12:22:17 13 OCT 2015	        2. PHANTOM WI.HDL -H masterdev -P 1506 -N JCD	
L	12:22:17 13 OCT 2015	           RESULT : Phantom process started with process ID 11967.	
L	12:22:17 13 OCT 2015	Nombre de WI.HDL a arreter : 0	
L	12:30:28 13 OCT 2015	----------------- STARTING WI.MANAGER '12072'-----------------	
L	12:30:28 13 OCT 2015	WI.MANAGER is already started	
  • Log d'une ligne WI.HDL bloqué.
    On peut voir que :
    1. le WI.HDL.MNG a détecté qu''il n'a pas recu de réponse alors que le temps max d'exécution est de 60 secondes.
    2. le WI.HDL.MNG a logué la pile d'appel des programmes ce qui permet de savoir quel programme bloque.
    3. le WI.HDL.MNG a forcé l'arrêt du WI.HDL
L	10:51:49 14 OCT 2015	-------------------------------------------------------	
L	10:51:49 14 OCT 2015	WARNING!!! temps d'ex‚cution de la routine a d‚épassé‚ le temps limite de 60 sec. HDL : 11966	
L	10:51:49 14 OCT 2015	
    - Etat de la ligne WI.HDL '11966' lors du crash : 
    - Date de démarrage : 10/13/2015 - 12:22:17
    - Date du dernier traitement : 10/14/2015 - 10:50:22
    - Application : AC.UNIV
    - Status : Executing Subroutine WI.RFL
    - Session : 119661745438951B

    - Headers (Nombre : 23)
        - ORIGIN : http://localhost:8081
        - CONTENT-LENGTH : 385
        - HTTP_USER_AGENT : Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36
        - ACCEPT-LANGUAGE : en-US,en;q=0.8,fr;q=0.6
        - X-WITOKEN : 119661745438951B
        - ACCEPT : */*
        - SERVER_PROTOCOL : HTTP/1.0
        - X-FORWARDED-SERVER : univ.infodata.lu
        - REMOTE_ADDR : 12.34.56.78
        - USER-AGENT : Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36
        - X-SSO-USER-ID : bob.sponge@staging-abplatform.net
        - REQUEST_METHOD : POST
        - ACCEPT-ENCODING : gzip, deflate
        - X-FORWARDED-FOR : 12.34.56.78
        - HOST : localhost:1508
        - REFERER : http://localhost:8081/
        - REQUEST_PATH : /dco
        - X-FORWARDED-HOST : univ.infodata.lu
        - CONTENT-TYPE : text/plain;charset=UTF-8
        - CONNECTION : Keep-Alive
        - QUERY_STRING : w3hostname=UNIV&w3exec=AC.UNIV
        - HTTP_HOST : univ.infodata.lu
        - REMOTE_HOST : 12.34.56.78

    - Params (Nombre : 9)
        - REQUEST_CONTENT : {"Id":"4154",suite du JSON}
        - W3HOSTNAME : UNIV
        - W3EXEC : AC.UNIV
        - APPID : AC.UNIV
        - CORS : 1
        - AUTHUSER : WI.AUT.USR.UNIV
        - AUTHAPP : WI.AUT.APP.ACX
        - MAX_STS_EXEC : 60
        - RFLOBJ : AC_DCO

    - Layer stack : PORT.STATUS PID 11966 LAYER.STACK

There are currently 1 uniVerse sessions; 0 interactive, 1 phantom

  Pid....  User name.  Printer Segment  Last command processed....................
    11966  jcd         0xACEBD142  SELECT AC.UNIV.FAC.EXE WITH EXE.DB <= "03.05.15" AND WITH EXE.DF >= "03.05.15" [ AC.P.BDG.DCO.CPT @ 0x123A ]

Layer type.......  Program name....................  Address...
BASIC run machine  AC.P.BDG.DCO.CPT                  0x0000123A
BASIC run machine  SB.PROCESS                        0x00000924
BASIC run machine  AC.P.RFL.DCO.UPD                  0x00000926
BASIC run machine  SB.PROCESS                        0x00000924
BASIC run machine  WI.RFL.SUB                        0x00000C2C
BASIC run machine  WI.RFL                            0x00000430
BASIC run machine  WI.SUB                            0x000000E4
Verb             
Command Language 
Execute          
BASIC run machine  WI.HDL.CTR                        0x0000126C
BASIC run machine  WI.HDL                            0x000006F2
Verb             
Command Language 

---------------------------------------------------------------------	
L	10:51:49 14 OCT 2015	Pole UNIV trouve	
L	10:51:49 14 OCT 2015	PHANTOM WI.HDL -H www.infodata.lu -P 1505 -N UNIV	
L	10:51:49 14 OCT 2015	Demande d'arret du WI.HDL : '11966'	
L	10:52:20 14 OCT 2015	Executing Subroutine WI.RFL , On patiente 30 secondes avant de forcer l'arrˆt	
L	10:52:50 14 OCT 2015	Forcer l'arret du WI.HDL : 'LOGOUT 11966' : 	
L	10:53:19 14 OCT 2015	verifie si le PID existe toujours : 'PORT.STATUS PID 11966'	
L	10:53:19 14 OCT 2015	
There are no uniVerse sessions that match the specified conditions.

	
L	10:53:19 14 OCT 2015	Succes, PID suivant supprimé‚ : '11966	
1)
WI.HDL is a line that allows the processing of an HTTP request in basic
public/wi/en/webaccount.txt · Dernière modification: 22/05/2019 10:36 par Jean Christophe Dewalque
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki