Settings in setenv is not picked up when wrapper service is running on Windows in tc Server 4.1.x
search cancel

Settings in setenv is not picked up when wrapper service is running on Windows in tc Server 4.1.x

book

Article ID: 293375

calendar_today

Updated On:

Products

VMware Tanzu tc Server

Issue/Introduction

On Windows, tc Server 4.1.x (Note: this changes in tc Server 5.0.x. tc Server 5.0 has removed the Java Service Wrapper and replaced it with Procrun from Apache Commons Daemon which is what Tomcat ships with) uses a Java Service Wrapper which configures the instance and the setenv.bat isn't used as the catalina.sh which calls setenv.bat isn't called. On windows when an instance is created the conf/wrapper.conf  is used to store the properties defined in template's bin/setenv.properties file.


Environment

Product Version: 4.1

Resolution

The recommended way of setting environment information is by using a template which defines the needed information in bin/setenv.properties for example:
java.opt.1=-Xmx512M
java.opt.2=-Xss256K
Customer can manually edit the conf/wrapper.conf file or use a template which has the changes and use the ‘apply-template’ tcserver command to update the environment configuration of the instance.  That has the advantage of being reproducible if customer wants to create a similar instance in the future.

Notesetenv.bat is invoked if using tcserver run. This invocation opens a new console window and runs the instance as an application instead of a service. This intended for development or testing as no Windows Service installation is required. Using tcserver start still calls the wrapper and the properties in wrapper.conf are used.