On 09/11/2012 11:15 PM, Edison Su wrote:
On my 4.0 setup, the value of "init" is encrypted. Do you upgrade from a fresh install 3.0.2 installation? From the code, in 3.0.2, the value is already encrypted.
My 3.0.2 install was fresh and I upgraded an existing database from 3.0.2 to 4.0 with the SQL files.
Seems that I've ran into some weird corner-case then with all my playing around.
It seems that nothing in my database is actually encrypted. I disabled encryption in db.properties and now everything seems to be working.
Wido
-----Original Message----- From: Wido den Hollander [mailto:w...@widodh.nl] Sent: Tuesday, September 11, 2012 12:11 PM To: cloudstack-dev@incubator.apache.org Subject: [utils.crypt.DBEncryptionUtil] (main:null) Error while decrypting: true Hi, I upgraded my 3.0.2 database to 4.0 today and tried to run the latest code on it. After long trial and error for other issues I'm stuck at the last one: 2012-09-11 17:56:26,387 DEBUG [utils.crypt.DBEncryptionUtil] (main:null) Error while decrypting: true 2012-09-11 17:56:26,388 ERROR [cloud.servlet.CloudStartupServlet] (main:null) Exception starting management server org.jasypt.exceptions.EncryptionOperationNotPossibleException at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.decrypt(StandardPBEB yteEncryptor.java:918) at org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPB EStringEncryptor.java:725) at com.cloud.utils.crypt.DBEncryptionUtil.decrypt(DBEncryptionUtil.java:65) at com.cloud.configuration.ConfigurationVO.getValue(ConfigurationVO.java:9 2) at com.cloud.configuration.dao.ConfigurationDaoImpl.getValue(Configuration DaoImpl.java:158) at com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:34) at com.cloud.server.ConfigurationServerImpl.persistDefaultValues(Configura tionServerImpl.java:153) at com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:34) See this: "Error while decrypting: true" When you open ConfigurationServerImpl.java and look at line 153: String init = _configDao.getValue("init"); "init" is in the category "Hidden" in the database and these go to the DBEncryptionUtil (ConfigurationVO.java): public String getValue() { return (("Hidden".equals(getCategory()) || "Secure".equals(getCategory())) ? DBEncryptionUtil.decrypt(value) : value); } In my case the value of "init" is just "true" and doesn't need any decryption, it's in the database plain-text, but what is going wrong here? Any suggestions? Wido