Error "Failed to lock" when trying to use wallet connect to oracle via jdbc

1.7k Views Asked by At

I have an application installed on app server that connects to Oracle database 19 using SSL and wallets. All works fine.

Then I cloned my app server and ran the same application on the clone. It cannot connect while producing this error:

SQLException: encountered a problem with the Secret Store. 
Check the wallet location for the presence of an open wallet (cwallet.sso) and ensure that this wallet contains the correct credentials using the mkstore utility: 
java.io.IOException: Failed to lock... 
attempt 1: java.io.FileNotFoundException: /home/ubuntu/wallets/mywallet/ewallet.p12.lck (Permission denied) 
attempt 2: java.io.FileNotFoundException: /tmp/pki_data717030271.lck (No such file or directory) 
  • I have checked the file ewallet.p12.lck - the file exists and my app user can read/write it
  • I have checked the file /tmp/pki_data717030271.lck - this file does not exist, but it does not exist either on the original server where everything works.

What is wrong here and how it can be fixed ?

1

There are 1 best solutions below

0
Michael On

Got it resolved. Just need to delete the ewallet.p12.lck file.

I guess it is part of some locking mechanism which work correctly on one server, but cannot be copied to another one.