Cannot open file:/opt/lucee/tomcat/lucee-server/context/security/cacerts [Keystore was tampered with, or password was incorrect]

gusjohnson: thanks and as you can see from my previous reply, I’ve managed to establish the appropriate edit procedure but it isn’t helping - but I keep trying…

This is really starting to frustrate me. In addition to my documented steps:

  1. deleted the data source from the Server Admin page
  2. created the data source from the Server Admin page without verification
  3. stopped the Lucee service
  4. edited the lucee-server.xml file and saved the file
  5. started the Lucee service
  6. from the Server Admin page, verified the data source

which have been startlingly unsuccessful in proving a working data source, I added a new first step (or 2) of completely uninstalling and re-installing Lucee 5.2.9.31. Everything is the same until step 6 where it can’t find server.cfm. When I check the folder where I edited lucee-server.xml, there is a new file lucee-server.1.buggy!
If I stop the lucee service and replace lucee-server.xml with an un-edited backup copy and then restart the lucee service, server.cfm returns. I’ve checked and re-checked my editing and it’s as per Beardsella’s example. I’ve just about run out of things to try and unless anyone has any useful suggestions, I’ll take my white cane and downgrade MySQL to 5.7.14 and see if that improves the situation.

Downgraded MySQL to 5.7.1.24, loaded my db, created a verified data source and my application works - all is right in the world…for now…

Just to add another perspective, this may be down to MySQL 8.x

I mention that, as I had similar problems connecting Visual Studio 2017 to MySQL 8.x yesterday. Specifically, after creating the “server explorer” database connection, I couldn’t create a data source AT ALL with MySQL 8.x. Tried to achieve same with SQL Server and it worked first time, hence is MySQL 8.x having issues and not Lucee? Perhaps its the new method of encrypted passwords? I don’t know.

Incidentally, I used a completely new install of Windows 10, installed Lucee for the first time, installed MySQL 8.x for the first time (new password format), attempted to create the database connection in Lucee and it brought up same error as the OP

ADDITION INFO
When creating a new datasource for MySQL 8.x in Lucee, I tried the jTDS driver for MySQL and that at least gives a formal error - “Login failed for user xxxx”, instead of Cannot open file:/opt/lucee/tomcat/lucee-server/context/security/cacerts [Keystore was tampered with, or password was incorrect]

ADDITIONAL ADDITIONAL INFO (!)
Uninstall MySQL 8.x, installed MySQL 5.7.24
Went back to Lucee, created my MySQL data source and it works perfectly
Notes: Lucee MySQL driver 8.0.11, Lucee version 5.2.9.31

Same issue as others…

This was working fine for a long time - Lucee 5.2.9 + MySQL JDBC Driver 8.0.11 + Amazon RDS MySQL 5.6

After I upgraded RDS to MySQL 5.7, about 1 day,. I started to see the same error

I downgrade the JDBC driver to 5.1.40, and manually put useSSL=false to the datasource in lucee-server.xml, restart Lucee and everything is back to normal now.

did not try RDS MySQL 8.0 yet.

I also can’t connect to mysql 8 from Lucee 5.2.9.31. I have tried creating the database without verifying and adding ‘&useSSL=false&requireSSL=false’ to the datasource in lucee-server.xml. Hopefully someone can figure out how to connect. Very frustrating. I tried both authentication methods when setting up mysql 8 and both don’t work. When using mysql workbench I can connect just fine.

Looks like the latest 8.0.15 MySQL jdbc driver solves this issue. I am ok to connect now.

1 Like

I could also solve this issue by upgrading the MySQL connection component in Lucee to 8.0.15, was trying to connect Lucee with MySQL 8.0