How to start the Denodo Windows Services without Administrator privileges

You can translate the document:

Goal

This document explains how to run the Denodo servers as Windows services under a user account that does not have Administrator privileges. The Windows services must be installed by a user with Administrator privileges because during this process writes information into the Windows Registry.

However, sometimes the services will have to be started with a non Administrator user, in this case configuration of the services has to be changed in order to start them successfully.

Content

After installing the Denodo Windows services there are two ways of changing the user running the services by a different user that lacks Administrator privileges. We can either modify the installation scripts or change the command executed by the Windows service.

Although the Log On tab of a Windows service configuration allows you to change the account running a service, this will not be enough in our case since some additional parameters need to be changed, for instance, the jna_tmpdir parameter. This parameter is created at installation time and it points to a temporary folder of the user that installed the service, so if the user is changed in the Log On tab an access error would be received when starting the service.

Modify the Denodo services installation scripts

We can choose to install the services manually using the scripts located under the <DENODO_HOME>/bin folder. These scripts can be modified to include a wrapper.tmp.path parameter whose value, if provided, will replace the jna_tmpdir route. Hence, we only need to set this parameter to a folder that is accessible by any user. To do this:

1. Remove the service executing the following command as Administrator:

<DENODO_HOME>/bin/vdpservice.bat remove

2. Edit <DENODO_HOME>/bin/vdpservice.bat to include -Dwrapper.tmp.path=<route>.

Replace

:doInstall

"%JAVA_BIN%" %DENODO_JRE11_OPTIONS% -DverboseMode=false -classpath "%LIB%\denodo-commons-launcher-util.jar" -Djava.system.class.loader=com.denodo.util.launcher.DenodoClassLoader com.denodo.util.launcher.Launcher com.denodo.util.services.WindowsServiceChecker --lib "%LIB%\contrib" --arg "%JAVA_BIN%" --arg "%LIB%/service-wrapper/wrapper.jar" --arg "%DENODO_HOME%/conf/vdp/service.conf" --arg "%DENODO_HOME%/setup/vdp/templates/conf/service.conf.template"

"%JAVA_BIN%" %DENODO_JRE11_OPTIONS% -jar "%DENODO_HOME%/lib/service-wrapper/wrapper.jar" -i "%DENODO_HOME%/conf/vdp/service.conf"

goto end

with

:doInstall

"%JAVA_BIN%" %DENODO_JRE11_OPTIONS% -DverboseMode=false -classpath "%LIB%\denodo-commons-launcher-util.jar" -Djava.system.class.loader=com.denodo.util.launcher.DenodoClassLoader com.denodo.util.launcher.Launcher com.denodo.util.services.WindowsServiceChecker --lib "%LIB%\contrib" --arg "%JAVA_BIN%" --arg "%LIB%/service-wrapper/wrapper.jar" --arg "%DENODO_HOME%/conf/vdp/service.conf" --arg "%DENODO_HOME%/setup/vdp/templates/conf/service.conf.template"

"%JAVA_BIN%" %DENODO_JRE11_OPTIONS% -Dwrapper.tmp.path=C:/tmp -jar "%DENODO_HOME%/lib/service-wrapper/wrapper.jar" -i "%DENODO_HOME%/conf/vdp/service.conf"

goto end

3. Install the service again by executing the following command as Administrator:

<DENODO_HOME>/bin/vdpservice.bat install

4. Open the Windows Services Configuration, and change the 'Log On' options of the service to be started with a non Administrator user.

Repeat the same for the rest of the Denodo services using the appropriate scripts: scheduler_webadmintool_service.bat and schedulerservice.bat.

Change the command executed by the Windows service

An alternative to the previous solution is to change the command executed by the Windows service using the Windows command SC. The goal is to change the parameter jna_tmpdir to a directory that can be accessed by the non Administrator user. Note that this command has to be executed by an Administrator user because it will perform changes in the Windows registry.

Supposing that the non Administrator user is “nonadmin”, having “E:\Denodo\Platform” as the installation directory for the Denodo Platform and that our denodo Windows services are  schedulerwebadmintool90,  schedulerserver90 and vdpserver90, the commands to be executed are:

sc config schedulerwebadmintool90 binPath= "E:\Denodo\Platform\jre\bin\java.exe -classpath E:\Denodo\Platform\lib\service-wrapper\wrapper.jar -Xrs -Dwrapper.service=true -Dwrapper.working.dir=E:\Denodo\Platform -Djava.net.preferIPv4Stack=true -Dwrapper.config=E:\Denodo\Platform\conf\scheduler-webadmintool\scheduler-webadmin-service.conf -Dwrapper.additional.1x=-Xrs -Djna_tmpdir=C:\Users\nonadmin\AppData\Local\Temp\15 org.rzo.yajsw.boot.WrapperServiceBooter"

sc config schedulerserver90 binPath= "E:\Denodo\Platform\jre\bin\java.exe -classpath E:\Denodo\Platform\lib\service-wrapper\wrapper.jar -Xrs -Dwrapper.service=true -Dwrapper.working.dir=E:\Denodo\Platform -Djava.net.preferIPv4Stack=true -Dwrapper.config=E:\Denodo\Platform\conf\scheduler\service.conf -Dwrapper.additional.1x=-Xrs -Djna_tmpdir=C:\Users\nonadmin\AppData\Local\Temp\15 org.rzo.yajsw.boot.WrapperServiceBooter"

sc config vdpserver90 binPath= "E:\Denodo\Platform\jre\bin\java.exe -classpath E:\Denodo\Platform\lib\service-wrapper\wrapper.jar -Xrs -Dwrapper.service=true -Dwrapper.working.dir=E:\Denodo\Platform -Djava.net.preferIPv4Stack=true -Dpath=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem -Dwrapper.config=E:\Denodo\Platform\conf\vdp\service.conf -Dwrapper.additional.1x=-Xrs -Djna_tmpdir=C:\Users\nonadmin\AppData\Local\Temp\15 org.rzo.yajsw.boot.WrapperServiceBooter"

Once these commands are executed, change the user in the Log On tab of the Windows Services Configuration to the new user.

Note: For versions starting from Denodo Platform 7.0, make sure to change the configuration in both Denodo Solution Manager and Denodo Platform.

Disclaimer

The information provided in the Denodo Knowledge Base is intended to assist our users in advanced uses of Denodo. Please note that the results from the application of processes and configurations detailed in these documents may vary depending on your specific environment. Use them at your own discretion.

For an official guide of supported features, please refer to the User Manuals. For questions on critical systems or complex environments we recommend you to contact your Denodo Customer Success Manager.
Recommendation

Recommended resources Recommendations generated by AI

Denodo Monitor as a Windows service

Server could not be started: port already in use

Start the Denodo Platform servers

How to monitor the number of times a VDP server is restarted

Linux startup scripts for Solution Manager and License Manager

Questions

Ask a question

You must sign in to ask a question. If you do not have an account, you can register here