Encryption 安全加载数据源时出错。解密数据时出错

Encryption 安全加载数据源时出错。解密数据时出错,encryption,wso2,datasource,esb,Encryption,Wso2,Datasource,Esb,我知道已经有人问过类似的问题,但既然给出的答案对我没有帮助,而且我的问题有点不同,我就要问一个新问题 我通过admin panel->Configure->Datasources创建数据源,效果很好。但若我重新启动服务器,所有创建的数据源将从数据源列表中丢失 当我运行ESB server时,我可以通过日志看到这些数据源无法正确加载,因为ESB server无法解密之前加密的敏感数据: 更新路径“/repository/components/org.wso2.carbon.ndatasource/

我知道已经有人问过类似的问题,但既然给出的答案对我没有帮助,而且我的问题有点不同,我就要问一个新问题

我通过
admin panel->Configure->Datasources
创建数据源,效果很好。但若我重新启动服务器,所有创建的数据源将从数据源列表中丢失

当我运行ESB server时,我可以通过日志看到这些数据源无法正确加载,因为ESB server无法解密之前加密的敏感数据:

更新路径“/repository/components/org.wso2.carbon.ndatasource/myDatasource”处的数据源[remove:false]时发生数据源定位错误

从注册表更新数据源“myDatasource”时出错 [删除:false]:安全加载数据源时出错

元信息:解密数据时出错


虽然数据源列表中缺少myDatasource,但我仍然可以通过
管理面板->注册表->/\u system/config/repository/components/org.wso2.carbon.ndasource/myDatasource在注册表中看到它,我也有同样的问题。这似乎是6.4.0中引入的错误。
6.3.0没有表现出这种行为

作为一种解决方法,如果在/conf/datasources/master datasources.xml中定义数据源,那么数据源将在服务器启动时正确加载。但是,这不是理想的解决方案,因为它们无法通过web控制台进行编辑

或者,您可以下载注册表项,编辑password元素以删除“Encrypted=true”,并将密码更改为未加密。然后将编辑后的文件作为新注册表项与旧注册表项一起上载

这两种方法都不适用于生产环境,因为它们不加密密码

出于兴趣,您是否在Windows上运行此功能?我在EI 6.4.0上还发现,由于路径格式错误,Ciphertool实用程序将无法运行。我怀疑这可能与此有关,但我找不到错误路径的来源,因为它似乎在路径中重复{carbon.home}元素:

    C:\Program Files\WSO2\Enterprise Integrator\6.4.0\bin>ciphertool
Using CARBON_HOME:   C:\Program Files\WSO2\Enterprise Integrator\6.4.0
Using JAVA_HOME:    C:\WSO2\Enterprise Integrator\6.3.0\jdk\jdk1.8.0_192
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:> at index 51: C:\Program Files\WSO2\Enterprise Integrator\6.4.0\C:\Program Files\WSO2\Enterprise Integrator\6.4.0\/repository/resources/security/wso2carbon.jks
        at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
        at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
        at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
        at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
        at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
        at java.nio.file.Paths.get(Paths.java:84)
        at org.wso2.ciphertool.utils.Utils.getConfigFilePath(Utils.java:98)
        at org.wso2.ciphertool.utils.Utils.setSystemProperties(Utils.java:289)
        at org.wso2.ciphertool.CipherTool.initialize(CipherTool.java:93)
        at org.wso2.ciphertool.CipherTool.main(CipherTool.java:52)
C:\ProgramFiles\WSO2\Enterprise Integrator\6.4.0\bin>ciphertool
使用CARBON_HOME:C:\Program Files\WSO2\Enterprise Integrator\6.4.0
使用JAVA\u HOME:C:\WSO2\enterpriseigrator\6.3.0\jdk\jdk1.8.0\u 192
线程“main”java.nio.file.invalidPath异常:索引51处的非法字符:C:\Program Files\WSO2\Enterprise Integrator\6.4.0\C:\Program Files\WSO2\Enterprise Integrator\6.4.0\/repository/resources/security/wso2carbon.jks
位于sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
位于sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
位于sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
位于sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
位于sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
位于java.nio.file.Paths.get(path.java:84)
位于org.wso2.ciphertool.utils.utils.getConfigFilePath(utils.java:98)
位于org.wso2.ciphertool.utils.utils.setSystemProperties(utils.java:289)
位于org.wso2.ciphertool.ciphertool.initialize(ciphertool.java:93)
位于org.wso2.ciphertool.ciphertool.main(ciphertool.java:52)

你好,威尔,祝你身体健康。我知道
/conf/datasources/master datasources.xml
,现在我将其用作临时解决方案。我正在windows上运行这个。CARBON_HOME或JAVA_HOME地址中的空格字符是否可能存在格式错误的路径?这已作为已知问题记录在6.4.0中