"tc-server-10.1 encode" command fails with exception "file instance-configuration.properties does not exist"
search cancel

"tc-server-10.1 encode" command fails with exception "file instance-configuration.properties does not exist"

book

Article ID: 383373

calendar_today

Updated On:

Products

VMware Tanzu Spring Runtime

Issue/Introduction

When user tries to encode some value with tc-serrver CLI (e.g. "tc-server-10.1 encode" command), it might fail with exception as demonstrated by the following messages.  

$ ./tc-server-10.1 encode --passphrase xxxx --value xxxxxxxxxxx testapp
Loading tc Server configuration properties from: /home/user/.tc-server/tc-server-10.1.properties
pbkdf2://xxxxxxxx
An exception occurred while modifying instance configuration file. An exception occurred while loading instance configuration file: The file '/usr/mware/tcServerApps/testapp/conf/instance-configuration.properties' does not exist.

 

Environment

Tanzu tc Server 10+

 

Cause

File instance-configuration.properties should be generated automatically in the conf folder when creating the tc Server instance. However, sometimes this file might be missing (e.g. manually removed) and user might don't care about existence of this file and would like not to see this exception.

Resolution

The message about the exception "file instance-configuration.properties does not exist" is non-fatal as it doesn't stop the command from succeeding, which means it can also just be ignored if the user chooses not to have the instance-configuration.properties file.

A feature has also been implemented for enabling/disabling using file conf/instance-configuration.properties which will be available since Tanzu tc Server release 10.1.33.D+. 

The configuration parameter to enable/disable this feature will be in file dist/tc-server-<version #>/conf/tcserver.default.properties and it's commented out by default. The user can uncomment the line instance.configuration.properties=true to disable using file instance-configuration.properties.

Since disabling using instance-configuration.properties file is highly not recommended, this new configuration parameter won't be mentioned in Tanzu tc Server document. 

# instance.configuration.properties=<boolean value>
# Specifies where to use conf/instance-configuration.properties for tracking configuration
# changes of a tc Runtime instance. It is recommended not to change this from the default.
#
# Default: true
#instance.configuration.properties=true