How to start the Denodo Windows Services without Administrator privileges

Applies to: Denodo 7.0 , Denodo 6.0 , Denodo 5.5 , Denodo 5.0
Last modified on: 15 Mar 2018
Tags: Administration Error handling

Download 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 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 usejugandr 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 to 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%" -DverboseMode=false -classpath "%LIB%\denodo-commons-launcher-util.jar" 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%" -jar "%DENODO_HOME%/lib/service-wrapper/wrapper.jar" -i "%DENODO_HOME%/conf/vdp/service.conf"

goto :end

with

:doInstall

"%JAVA_BIN%" -DverboseMode=false -classpath "%LIB%\denodo-commons-launcher-util.jar" 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%" -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 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  schedulerwebadmintool70,  schedulerserver70 and vdpserver7, the commands to be executed are:

sc config schedulerwebadmintool70 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\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 schedulerserver70 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 vdpserver70 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 Denodo Platform 7.0, make sure to change the configuration in both Denodo Solution Manager and Denodo Platform.

Questions

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

Featured content

DENODO TRAINING

Ready for more? Great! We offer a comprehensive set of training courses, taught by our technical instructors in small, private groups for getting a full, in-depth guided training in the usage of the Denodo Platform. Check out our training courses.

Training