WSO2 GR无法启动Carbon SecureVault

时间:2013-12-19 13:04:42

标签: java wso2 wso2carbon

我正在运行WSO2 GR安装,它运行正常。但是,当我尝试使用以下方向启用SecureVault时,服务器无法启动。 wso2carbon.log中唯一的输出是:

TID: [0] [Greg] [2013-12-19 13:44:12,307]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets. {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler}
TID: [0] [Greg] [2013-12-19 13:44:12,315]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets. {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler}
TID: [0] [Greg] [2013-12-19 13:44:12,317]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets. {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler}
TID: [0] [Greg] [2013-12-19 13:44:12,366]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Starting WSO2 Carbon... {org.wso2.carbon.core.internal.CarbonCoreActivator}
TID: [0] [Greg] [2013-12-19 13:44:12,366]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Operating System : Linux 2.6.32-358.el6.x86_64, amd64 {org.wso2.carbon.core.internal.CarbonCoreActivator}
TID: [0] [Greg] [2013-12-19 13:44:12,366]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Home        : /usr/lib/jvm/jdk1.6.0_45/jre {org.wso2.carbon.core.internal.CarbonCoreActivator}
TID: [0] [Greg] [2013-12-19 13:44:12,366]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Version     : 1.6.0_45 {org.wso2.carbon.core.internal.CarbonCoreActivator}
TID: [0] [Greg] [2013-12-19 13:44:12,366]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java VM          : Java HotSpot(TM) 64-Bit Server VM 20.45-b01,Sun Microsystems Inc. {org.wso2.carbon.core.internal.CarbonCoreActivator}
TID: [0] [Greg] [2013-12-19 13:44:12,367]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Carbon Home      : /opt/wso2/gr {org.wso2.carbon.core.internal.CarbonCoreActivator}
TID: [0] [Greg] [2013-12-19 13:44:12,367]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Temp Dir    : /opt/wso2/gr/tmp {org.wso2.carbon.core.internal.CarbonCoreActivator}
TID: [0] [Greg] [2013-12-19 13:44:12,367]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  User             : wso2, en-US, Europe/Amsterdam {org.wso2.carbon.core.internal.CarbonCoreActivator}
TID: [0] [Greg] [2013-12-19 13:44:12,451]  WARN {org.wso2.carbon.core.bootup.validator.SystemValidator} -  Could not validate the system for configuration parameter : certFingerprint {org.wso2.carbon.core.bootup.validator.SystemValidator}
TID: [0] [Greg] [2013-12-19 13:44:12,453]  WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} -  RAM size (MB): 1500 of the system is below the recommended minimum size :2048 {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter}
TID: [0] [Greg] [2013-12-19 13:44:12,466]  INFO {org.wso2.carbon.databridge.agent.thrift.AgentHolder} -  Agent created ! {org.wso2.carbon.databridge.agent.thrift.AgentHolder}
TID: [0] [Greg] [2013-12-19 13:44:12,491]  INFO {org.wso2.carbon.databridge.agent.thrift.internal.AgentDS} -  Successfully deployed Agent Client {org.wso2.carbon.databridge.agent.thrift.internal.AgentDS}
TID: [0] [Greg] [2013-12-19 13:44:23,209]  INFO {org.apache.catalina.startup.TaglibUriRule} -  TLD skipped. URI: http://tiles.apache.org/tags-tiles is already defined {org.apache.catalina.startup.TaglibUriRule}

我使用以下步骤配置SecureVault:

  1. 更改repository/resources/security/wso2carbon.jksrepository/resources/security/client-truststore.jks密钥库

  2. 上的密码
  3. 在wso2carbon.jks密钥库中更改wso2carbon私钥的密码。

  4. 修改repository/conf/tomcat/catalina-server.xml,在连接器协议部分中为SSL连接器添加:

    keystoreFile="/opt/wso2/gr/repository/resources/security/wso2carbon.jks"
    keystorePass="newPassword"
    keyAlias="wso2carbon"`
    
  5. 使用以下内容填充repository/conf/security/cipher-text.properties文件:

    Carbon.Security.KeyStore.Password=[newPassword]
    Carbon.Security.KeyStore.KeyPassword=[newPassword]
    Carbon.Security.TrustStore.Password=[newPassword]
    Datasources.WSO2_CARBON_DB.Configuration.Password=[newPassword]`
    
  6. 运行bin/ciphertool.sh -Dconfigure。这似乎很成功。

  7. 将密码放在WSO2基础目录中名为password的文件中

  8. 重新启动GR

  9. 完成这些步骤后,我得到上面列出的输出。

    有谁知道如何解决这个问题或从哪里获得更多信息?

2 个答案:

答案 0 :(得分:2)

您是将服务器作为后台进程启动还是仅在控制台中运行服务器...?如果从后台开始,则需要创建tmp文件(CARBON_HOME目录中的password-tmp)以提供主密码。如果您只启动服务器运行脚本,那么您将被提升为输入主密码,您可以在命令行中提供它。您可以从here

中找到更多详细信息

答案 1 :(得分:1)

如果您在Linux环境中,请创建一个名为run.sh的文件,并添加下面提到的脚本。然后,使用./run.sh执行脚本。它将获取wso2server.sh进程的secure-vault密码。如果需要,您可以进一步修改此密码以询问用户的密码,而不是硬编码。

$ cat ~/wso2esb-4.0.2/run.sh

#!/bin/sh
cat > password << EOF
securevaultPassword
EOF
nohup ./bin/wso2server.sh -DapplyPatches
tail -f nohup.out