createRegistryLock Error while starting Hawkagent

createRegistryLock Error while starting Hawkagent

book

Article ID: KB0079192

calendar_today

Updated On:

Products Versions
TIBCO Hawk ALL

Description

While starting hawkagent we see below error in console:

[tibco@tibcobw-server TIBCO_PROD]$./hawkagent_TIBCO_PROD
Fri Jun 08 09:44:30 IST 2018 Starting Hawk Agent (pid: 4317)...
Config file used by Agent : /apps/tibco5//tra/domain/TIBCO_PROD/hawkagent.cfg
Configured Log directory = /apps/tibco5//tra/domain/TIBCO_PROD/logs
java.io.IOException: Permission denied
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:1012)
        at com.tibco.installer.util.TIBCOLegacyInstallRegistry.createRegistryLock(TIBCOLegacyInstallRegistry.java:869)
        at com.tibco.installer.util.TIBCOInstallerUtil.createInstallerRegistryLock(TIBCOInstallerUtil.java:1166)
        at com.tibco.tra.tsm.TsmSyncInventory.run(TsmSyncInventory.java:68)
1199 [TsmSyncBindings] INFO com.tibco.security.impl.np.SecurityVendor - Initializing Entrust crypto provider in NON FIPS 140-2 mode; insert provider as normal
 

Issue/Introduction

While starting the hawkagent it throws an error java.io.IOException: Permission denied

Environment

ALL

Resolution

This indicates that user which was used to start the hawkagent doesn't have enough permission to write .installerregistrylock file in $TIBCO_HOME directory.

e.g. 
[tibco@tibcobw-server apps]$ ls -lrth
drwxr-xr-x. 13 root root 4.0K Oct  9  2017 tibco
[tibco@tibcobw-server apps]$ pwd
/apps

As we can see in above e.g. the user tibco doesn't have enough permission to create/write any files in directory $TIBCO_HOME ( in this case /apps/tibco ) and the owner of $TIBCO_HOME is root instead of tibco user.