WIService is a Python programm binding an http request between a web service server session (IIS, http, …) and a WI.HDL session 1)
Installation : -------------- - copy the file unix/WIService in/etc/rc.d/init.d. - chkconfig WIService --add - chkconfig WIService --list WIService 0:off 1:off 2:on 3:on 4:on 5:on 6:off Use : ------------- - service WIService start - service WIService stop - service WIService status (De)activation au boot : ------------------------- - chkconfig WIService [off|on]
Installation : -------------- - copy the file WIservice.service in the directory"/etc/systemd/system" - systemctl daemon-reload - systemctl enable WIservice Use: ------------- - systemctl start WIservice - systemctl stop WIservice - systemctl status WIservice (De)activation au boot : ------------- - systemctl enable WIservice - systemctl disable WIservice
Doc to create a service using upstart : http://upstart.ubuntu.com/getting-started.html. The wiservice service file can be found here : unix/wiservice-ubuntu.conf
WIService 0:off 1:off 2:on 3:on 4:on 5:on 6:off if "3:on" displays, that means that it will start automaticaly on the boot
Ini file code | Options service linux | Description |
---|---|---|
DEFAULT_PORT | -l ou –listening | Port number that the server will use to get HTTP requests and transmit them to the DB Default = 1508 |
DEFAULT_WI | -w ou –wi | Port number that the server will use to get connexions from DB |
DEFAULT_TIMEOUT | -t ou –timeout | Server waiting time to get an available handler. In case of timeout, the request will not succeed ans the WIService returns an error (no handler available). default = 5 seconds. |
DEFAULT_HEARTBEAT | -b ou –heartbeat | Out of service duration of a service handler. After this time, a message is sent to extend this duration, otherwise connexion risks to be lost. Default = 20 seconds |
DEFAULT_MAXEXEC | -m ou –maxexecute | Maximum duration of the requests to the DB. If processing is too long, an error is sent to the browser. Default = 60 seconds |
DEBUG | -d ou –debug | Debug mode. If true, no message will be displayed. Default = False |
DEBUG_DEV | -D | Developer mode. Always stays on False, unless you need to debug WIService program. Default = False |
#------------------------------------------------------ # Fichier de config du service windows "WIService" # si une valeur n'est pas mentionnée ou vide, ce sera # la valeur par défaut qui sera mentionnée #------------------------------------------------------ # DEFAULT_PORT = Port number that the server will use to get # HTTP requests and transmit them to the DB # Default = 1508 # DEFAULT_WI = Port number that the server will use to get connexions from DB # Default = 1505 # DEFAULT_TIMEOUT = Server waiting time to get an available handler. # In case of timeout, the request will not succeed ans the WIService returns an error. # Default = 5 seconds # Error message = no handler available # DEFAULT_HEARTBEAT = Out of service duration of a service handler. # After this time, a message is sent to extend this duration, otherwise connexion risks to be lost. # Default = 20 seconds # DEFAULT_MAXEXEC = Maximum duration of the requests to the DB. # If processing is too long, an error is sent to the browser. # Default = 60 seconds # DEBUG = Debug mode. If true, no message will be displayed. # Default = False # DEBUG_DEV = Developer mode. Always stays on False, unless you need to debug WIService program. # Default = False #------------------------------------------------------ # Remove # devant la variable pour activer un paramètre #------------------------------------------------------ #DEFAULT_PORT = 1508 #DEFAULT_WI = 1505 #DEFAULT_TIMEOUT = 5 #DEFAULT_HEARTBEAT = 20 #DEFAULT_MAXEXEC = 60 #DEBUG = False #DEBUG_DEV = False
Trying to start server on localhost:1508 , wiservice listening on 1505 [Fri Jun 19 15:08:21 2015] ? GET /wiapp : 500 - Erreur de traitement : Pool default inconnu
In WIService directory, wiservice.log displays the requests processed this day
A line of the log file displays :
[Fri Jun 19 11:40:35 2015] 192.168.0.82->masterdev GET /dos/AC.TEST&w3hostname=TP&w3exec=ac.ctr : 200 - application/json; charset=UTF-8 , duree: 0.156986 sec [Fri Jun 19 11:45:22 2015] 192.168.0.97->masterdev GET /dco/3?&w3hostname=TP&w3exec=ac.ctr : 404 - Enregistrement 3 inexistant ! [Fri Jun 19 12:09:41 2015] 192.168.0.79->masterdev GET /gcf?&w3hostname=TP&w3exec=ac.ctr : 504 - attente trop longue : 0.140280 sec [Fri Jun 19 13:32:22 2015] 192.168.0.82->masterdev POST /dap?&w3hostname=TP&w3exec=ac.ctr : 500 - Erreur de traitement : Erreur lors de la communication avec le Handler Erreur lecture chr(0)
Date | Adresse IP client | Nom serveur WEB | Methode | Url | Statut | Content-type | Type de message | Durée |
---|---|---|---|---|---|---|---|---|
[Fri Jun 19 11:40:35 2015] | 192.168.0.82 | masterdev | GET | /dos/AC.TEST?&w3hostname=TP&w3exec=ac.ctr | 200 | application/json; charset=UTF8 | duree : | 0.156986 sec |
[Fri Jun 19 11:45:22 2015] | 192.168.0.97 | masterdev | GET | /dco/3?&w3hostname=TP&w3exec=ac.ctr | 404 | Erreur de traitement | Enregistrement 3 inexistant ! | |
[Fri Jun 19 12:09:41 2015] | 192.168.0.79 | masterdev | GET | gcf?&w3hostname=TP&w3exec=ac.ctr | 504 | attente trop longue | 0.140280 sec | |
[Fri Jun 19 13:32:22 2015] | 192.168.0.82 | masterdev | POST | /dap?&w3hostname=TP&w3exec=ac.ctr | 500 | Erreur de traitement | Erreur lors de la communication avec le Handler Erreur lecture chr(0) |