Date: Thu, 28 Mar 2024 21:31:20 +0000 (UTC) Message-ID: <2111548075.10793.1711661480481@911f0a1bad02> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10792_42506603.1711661480481" ------=_Part_10792_42506603.1711661480481 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The Servoy Application Server comes bundles with an Java Service= Wrapper component, to facilitate the automatic launch of the Servoy Applic= ation Server when the server on which the Servoy Application Server is inst= alled is started or rebooted.
The Java = Service Wrapper does not start the required databases as the databases are = not part of the Servoy Application Server, could be running on a completely= different machine and different brands of databases have different mechani= sms to starting. For more information on running the bundled PostgreSQL as = a service, see the Postgre= SQL Primer tutorial.
When running the Servoy Application Server and the database on the same = Windows machine, both as a Windows Service, then a dependency can be config= ured between the different Windows services. See Configuring Windows Ser= vice Dependencies for more info.
The Java Service Wrapper used by Servoy supports virtually all platforms= on which a Java Virtual Machine is available (also required to run the Ser= voy Application Server).
The Java service Wrapper component will create a Windows Service on the = Windows platform and on other platforms it utilizes Unix Daemons.
The Java Service Wrapper is by default installed by the Servoy= All-In-One installer when installing a Servoy Application Server (see Running the All-In-= One Installer for more info on the All-In-One installer).
During installation, an extra service
directory i=
s created in the ../application_server/
directory. This direct=
ory contains, among others, the configuration file for the service, called =
wrapper.conf
.
If the Setup Service option is checked in the installer= , the Service will actually be setup on the machine. By default this option= is unchecked, as in most cases the service configuration will require chan= ges.
The Service component installation comes with two files to install and u=
ninstall the Service: install_service.
[bat
/<=
code>sh] and uninstall_service.
[bat
/=
sh
] which are also found in the service
directory.
The configuration of the Java Service Wrapper is done through the file <=
code>wrapper.conf located in ../application_server/service.
When chan=
ging the value of any any wrapper.ntservice.*
property on Wind=
ows, the Service needs to be uninstalled first and reinstalled after the ch=
anges have been made.
By default the Windows Service is configured to be started automatically=
. This can be changed to start manually by setting the wrapper.n=
tservice.starttype
property to DE=
MAND_START
.
Note that the s= ervice starts successfully only if the database is already running at that = point.
The Java Service Wrapper does NOT start the database, since in prod= uction environments the database could be installed on a different machine = or is maintained by a DBA.
If the database is running on the same machine as a Windows Service as w=
ell, it is possible to configure a dependency to it in the Java Service Wra=
pper configuration. The dependency can be set by adding the name of th=
e Windows Service for the database on which the Servoy Application Service =
depends as a wrapper.ntservice.dependency.x
property. The 'x' =
at the end of the property name needs to be a sequential number, =
starting with 1, for each dependency.
When the Servoy Application server is started as a service through the J=
ava Service Wrapper, the assignment of memory goes through the configuratio=
n of the wrapper in wrapper.conf
, instead of through ser=
voy_server.
[bat
/sh
].
Below the mapping for the three relevant memory settings and their equiv=
alent in the wrapper.conf
:
wrapper.java.initmemory=3D...
<=
/li>
wrapper.java.maxmemory=3D...
=
li>
wrapper.java.additional.4=3D-XX:MaxPe=
rmSize=3D...
For more information on the the meaning of these settings and their sugg= ested values, see Memory Manag= ement.
When running multiple Servoy Application Servers as a Service on a singl= e machine, some configuration adjustments are required to not let the diffe= rent services influence each other.
The following property requires a unique value:
wrapper.ntservice.name
(default ServoyService
=
)On Windows the wrapper.ntservice.displayname
and =
wrapper.ntservice.description
could be modified to furthe=
r distinguish the different Windows Services from each other=
. Note that these two settings are just for display purposes in the Service=
s overview in Windows and do not affect the actual operation of the service=
s.
On OSX and *nix, the name used for the deamon is configured in ServoySer= ver:
# Applicat= ion APP_NAME=3D"ServoyServer" APP_LONG_NAME=3D"Servoy Application Server"=20
The APP_NAME
has to be unique for each Service.
The wrapper.port
value does not have to be unique, bec=
ause the Java Service Wrapper automatically looks for a free port if the sp=
ecified port is already taken.
The Java Service Wrapper has extensive configuration options. The most f= undamental settings have been discussed in this chapter already. In this pa= ragraph some more advanced settings are detailed.
Java processes need to be explicitly told how much memory they are allow= ed to use. In case the process requires more memory than it's allowed to us= e based on the configuration, Java will throw OutOfMemory exceptions. When = this happens, the state of the process becomes unreliable, as some vit= al business logic might not have been executed. Java only has limited optio= ns to take action when OutOfMemory exceptions occur.
The Java Service Wrapper however supports a monitoring feature that is c= apable of taking action in case that OutOfMemory exceptions occur. The foll= owing snippet of configuration will perform a thread dump and then a restar= t of the Servoy Application Server.
wrapper.fi= lter.trigger.1=3DException in thread "*" java.lang.OutOfMemoryError wrapper.filter.action.1=3DNONE wrapper.filter.trigger.2=3DException in thread "*" java.lang.OutOfMemoryErr= or wrapper.filter.allow_wildcards.2=3DTRUE wrapper.filter.action.2=3DDUMP,RESTART wrapper.filter.message.2=3DThe JVM has run out of memory.=20
The Java Service Wrapper is a bundled third party component also called = Java Service Wrapper Standard by <= a href=3D"http://www.tanukisoftware.com/en/index.php" class=3D"external-lin= k" rel=3D"nofollow">Tanuki Software. For in depth view of the subject h= ave a look on their documentation= .
The component is licensed by Servoy to be bundled and used in combinatio= n with the Servoy Application Server only. It's not allowed to use the comp= onent outside the context of the Servoy Application Server.
A non-admin user doesn't have permission to start and stop the Servoy Ap= plication Server service. In order to have access to do that, they have to = be granted permission by the administrator. This section provides informati= on on how to grant permission to a different user to access the Servoy serv= ice.
The following steps need to be followed in order to give access to the s= ervice:
Enter the following command in the console:
C:\>sc = sdshow servoyservice=20
The output will look something like this:
D:(A;;CCLC= SWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;= IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)=20
Copy and paste it into a text editor.
LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Curre=
ntVersion\ProfileList
(A;;CCLCSWRPWPDTLOCRRC;;;SY)=
code> part of the command output, and paste it right before the S:(AU=
;FA;...
part
b) change that part to look like this: (A;;RPW=
PCR;;;[SID])
- where [SID] has to be replaced by the actual user acc=
ount SID
c) surround the whole resulted line with double quotes, and cop=
y it
In the command prompt, enter the sc sdset
command and p=
aste in the copied line. The resulted command will look like this:
sc sdset s= ervoyservice "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;= ;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWPCR;;;S-1-5-21-3008= 6777-1921087056-1718559101-1003)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"<= /pre>=20
Run the command. On success, the following output should appear:
[SC] SetSe= rviceObjectSecurity SUCCESS=20
After completing these steps, the non-admin user for which these setting= s have been done will be able to access the Application Server service.