- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
This is an article written by Community member Nicolas Honsberger originally posted to Community here.
There is a behavior that can cause trouble with the cache and show up errors in the log file (log file location is: "C:\Program Files\CyberArk\ApplicationPasswordProvider\Logs\APPConsole.log")
Let's assume that we retrieved an account with parameters "safe" and "username". At the time of the initial request, it was the only occurrence of this username in that safe, so everything worked like a charm and the agent cached this account locally.
Then, after some times, we onboarded other accounts, with the same username, in the same safe. These accounts have been onboarded for other needs and on other addresses. Of course, the request that we use on the CP has been adapted to include the address, otherwise we'd got the error that too many accounts exists with the same attributes.
At this point, the next time that the agent will try to refresh the cache, he will get an error that too many accounts exists with the same attributes.
The exact error message shown in log is:
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP032I Main parameters file [main_appprovider.conf.Win.13.00] was loaded successfully
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP258I Supported addresses for this provider [IP_ADDRESS;SERVER_NAME;SERVER_NAME_FQDN]
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP341I Found cache encryption key in cache safe for Credential Provider user Prov_SERVER_NAME
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP035I Application Password Provider [Prov_SERVER_NAME] on machine [IP_ADDRESS] version [13.0.0.6] is up [AAM mode] and working with Vault [VAULT_IP_ADDRESS]
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP251E Too many password objects matching query [Folder=root;safe=SAFE_NAME;Username=USERNAME;] were found. The system will use the password that is already in the cache. However, this is state is not valid and must be fixed. See trace log for more information) (Diagnostic Info: 1)
This is due to the fact that the CP will do a request to refresh the cache entries with same parameters than the initial request. So in that case, using "safe" and "username" for the first entry that he cached (even if we modified the call afterwards) - but, as we added some accounts with same username in the same safe, we got now the error for this account because the address was not part of the initial request.
So now in the cache, we have a first entry with "safe" and "username" (that make the error), and another with "safe", "username", and "address" (that work perfectly).
The only way of getting rid of this error is to clean up the cache. Then, the next time that the new request is used to retrieve the account, it will be cached the right way - including the address and avoiding any errors in logs.
The log will look like that after the first try after the cache clean-up:
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP032I Main parameters file [main_appprovider.conf.Win.13.00] was loaded successfully
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP258I Supported addresses for this provider [IP_ADDRESS;SERVER_NAME;SERVER_NAME_FQDN]
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP341I Found cache encryption key in cache safe for Credential Provider user Prov_SERVER_NAME
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP076I AAM Persistent storage file doesn't exist. Creating storage file...
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP035I Application Password Provider [Prov_SERVER_NAME] on machine [IP_ADDRESS] version [13.0.0.6] is up [AAM mode] and working with Vault [VAULT_IP_ADDRESS]
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP075I Tcp server is down
[dd/mm/aaaa | hh:mm:ss] | :: | APPAP036I Application Password Provider has been normally terminated