CA APM SmartStor Tools returns "Invalid path or doesn’t exist"

Document ID : KB000122255
Last Modified Date : 04/12/2018
Show Technical Document Details
Issue:
When the Enterprise Manager Collector is stopped running any CA APM SmartStor Tools command returns this result:
./SmartStorTools.sh list_agents -agents ".*" -src /opt/apm/smartstor 
Debug options:
    file:/tmp/.options not found
... org.springframework.osgi.extender.internal.activator.ContextLoaderListener start
INFO: Starting [org.springframework.osgi.extender] bundle v.[1.2.1]
... org.springframework.osgi.extender.internal.support.ExtenderConfiguration <init>
INFO: No custom extender configuration detected; using defaults...
... org.springframework.scheduling.timer.TimerTaskExecutor afterPropertiesSet
INFO: Initializing Timer
Invalid path or doesn't exist: /opt/apm/smartstor

 
Environment:
CA APM 9.x, 10.x
Cause:
The EM_HOME/config/IntroscopeEnterpriseManager.properties file has the 3 SmartStor properties set as follows: 
=== 
introscope.enterprisemanager.smartstor.directory=/opt/apm/smartstor 
introscope.enterprisemanager.smartstor.directory.metadata=data/metadata 
introscope.enterprisemanager.smartstor.directory.archive=/opt/apm/smartstor/archive 
=== 
So the metadata is stored under EM_HOME/data and not under /opt/apm/smartstor 
Normally it is best practice to store all SmartStor data under same directory tree, but the above configurtion is still valid.
Resolution:
To allow SmartStor Tools to access the SmartStor requires that the metadata also be accessible. To enable this without changing the configuration create a symbolic link from EM_HOME/data/metadata to /opt/apm/smartstor/metadata e.g. 
ln -s /root/Introscope10.5.0.28/data/metadata /opt/apm/smartstor/metadata
Then the SmartStor Tools command will be successful.
 
Additional Information:
NOTE: The Enterprise Manager must be stopped for SmartStor Tools to be able to access the SmartStor otherwise a lock message will be received e.g.
Debug options:
    file:/tmp/.options not found
... org.springframework.osgi.extender.internal.activator.ContextLoaderListener start
INFO: Starting [org.springframework.osgi.extender] bundle v.[1.2.1]
...org.springframework.osgi.extender.internal.support.ExtenderConfiguration <init>
INFO: No custom extender configuration detected; using defaults...
... org.springframework.scheduling.timer.TimerTaskExecutor afterPropertiesSet
INFO: Initializing Timer
Metadata DB cannot be opened. Please check that EM is not running.
   IO error: lock /opt/apm/smartstor/metadata/LOCK: Resource temporarily unavailable


Also see the APM docops page:
https://docops.ca.com/ca-apm/10-7/en/administrating/configure-enterprise-manager/configure-and-manage-smartstor-data#ConfigureandManageSmartStorData-SmartStorToolCommands
"SmartStor Tool Commands
Note: SmartStorTools cannot be running together with the Enterprise Manager process. Please check that Enterprise Managers is not running."