当前,我正在对Oracle WebLogic Server 12c进行一些试验。我设置了一个新域以尝试SSL。我已经创建了一个自定义身份存储,证书和信任请按照此处的说明进行操作:https://helpx.adobe.com/uk/experience-manager/6-3/forms/using/admin-help/configuring-ssl-weblogic-server.html#creating_an_ssl_credential_for_use_on_weblogic_server
我还设置了AdminServer来使用它们,我可以通过激活域范围的管理端口并连接到管理控制台来进行测试。我在浏览器中检查了提供的证书,并可以验证这是我的自定义证书。
到目前为止,一切都很好。但是,当我创建托管服务器并将其配置为也使用我的自定义身份,信任和证书并将设置保存在管理控制台中时,我无法使用提供的startManagedWebLogic.sh脚本来启动服务器。失败的原因是,服务器尝试使用DemoCert和DemoTrust,正如我在日志中看到的那样。因此,它无法连接到AdminServer,并且无法加载其配置。
这是我的问题:如果始终始终使用默认设置来启动托管服务器,那么该如何使用自定义SSL设置启动托管服务器?有什么办法可以修改启动脚本以使用不同的默认值?还是有不同的“最佳实践”?
服务器无法启动的错误是:
<Apr 6, 2020 2:40:46,041 PM CEST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: A MultiException has 6 exceptions. They are:
1. weblogic.security.SecurityInitializationException: Authentication for user weblogic denied.
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.security.SecurityService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.jndi.internal.RemoteNamingService errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.jndi.internal.RemoteNamingService
5. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.io.common.internal.FileService errors were found
6. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.io.common.internal.FileService
A MultiException has 6 exceptions. They are:
1. weblogic.security.SecurityInitializationException: Authentication for user weblogic denied.
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.security.SecurityService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.jndi.internal.RemoteNamingService errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.jndi.internal.RemoteNamingService
5. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.io.common.internal.FileService errors were found
6. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.io.common.internal.FileService
at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:89)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:250)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:305)
Truncated. see log file for complete stacktrace
Caused By: weblogic.security.SecurityInitializationException: Authentication for user weblogic denied.
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:1158)
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.postInitialize(CommonSecurityServiceManagerDelegateImpl.java:1272)
at weblogic.security.service.SecurityServiceManager.postInitialize(SecurityServiceManager.java:586)
at weblogic.security.SecurityService.start(SecurityService.java:130)
at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:76)
Truncated. see log file for complete stacktrace
Caused By: javax.security.auth.login.FailedLoginException: [Security:090938]Authentication failure: The specified user failed to log in. weblogic.security.providers.authentication.LDAPAtnDelegateException: [Security:090295]caught unexpected exception, No such object
at com.bea.common.security.utils.ExceptionHandler.throwFailedLoginException(ExceptionHandler.java:62)
at weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.login(LDAPAtnLoginModuleImpl.java:369)
at com.bea.common.security.internal.service.LoginModuleWrapper$1.run(LoginModuleWrapper.java:117)
at java.security.AccessController.doPrivileged(Native Method)
at com.bea.common.security.internal.service.LoginModuleWrapper.login(LoginModuleWrapper.java:114)
Truncated. see log file for complete stacktrace
>
我已经检查了用户名和密码,它们已经正确输入。
编辑:如果我禁用管理端口,并使用以下命令启动受管服务器
startManagedWeblogic ms0 t3://localhost:7001 (1)
而不是
startManagedWeblogic ms0 t3s://localhost:9001 (2)
服务器将按预期方式启动。尽管在启动过程中尝试访问管理服务器时出现持续性问题,但具有ENABLED管理端口(2)的连续启动确实可以成功。
编辑2:由于以下回复,我已经尝试使用NodeManager。不幸的是,由于SSL异常,我无法从管理控制台访问它:
javax.net.ssl.SSLHandshakeException
我发现,我必须将Nodemanager配置为还使用nodemanager.properties文件中的自定义ssl设置。我使用了以下设置:
## SSL ##
# Configure default SSL
KeyStores=CustomIdentityAndCustomTrust
# Identity keystore
CustomIdentityKeyStoreFileName=/home/iffuw/feck-credentials.jks
CustomIdentityKeyStoreType=jks
CustomIdentityKeyStorePassPhrase=whatever
# private key
CustomIdentityAlias=feck-credentials
CustomIdentityPrivateKeyPassPhrase=whatever
# Trust keystore
CustomTrustKeyStoreFileName=/home/iffuw/feck-ca.jks
CustomTrustKeyStoreType=jks
CustomTrustKeyPassPhrase=whatever
CustomTrustKeyStorePassPhrase=whatever
[请注意,密码短语不全,但是两个KeyStore(Id和Trust)的密码短语是相同的。当我启动nodemanger时,密钥和身份块中的密码被加密。来自信任块的密码短语为空。这里可能出了些问题,但我不知道是什么。有任何想法吗? nodemanager.log说:
<Apr 6, 2020 4:30:40 PM CEST> <INFO> <Upgrade> <Removing NodeManager property: CustomTrustKeyStorePassPhrase>
这正常吗?