根据主网站以及其他来源提供的文档,我已经在我的系统上安装了 Oracle Database 12c Release 2、Oracle WebLogic Server 12c(12.2.1.4)和 Oracle Forms and Reports 12c。
WebLogic 服务器(包括 AdminServer、WLS_FORMS 和 WLS_REPORTS)在从 cmd 文件(startWebLogic.cmd、startManagedWebLogic.cmd)启动时运行正常。我希望这些服务器作为 Windows 服务自动启动;安装并重新启动系统后,服务器的状态显示为“正在运行”,但 10-15 分钟后,它们全部停止了。
下面是我安装 AdminServer Windows 服务的脚本:
echo off
SETLOCAL
set DOMAIN_NAME=base_domain
set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain
set SERVER_NAME=AdminServer
set WL_HOME=C:\Oracle\Middleware\Oracle_Home\wlserver
set PRODUCTION_MODE=true
call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\setDomainEnv.cmd"
call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"
ENDLOCAL
PAUSE
以下是安装表单和报告服务器的脚本:
echo off
SETLOCAL
set DOMAIN_NAME=base_domain
set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain
set SERVER_NAME=WLS_FORMS
set ADMIN_URL=http://desktop-q9fv7np:7001
set WL_HOME=C:\Oracle\Middleware\Oracle_Home\wlserver
set PRODUCTION_MODE=true
call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\setDomainEnv.cmd"
call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"
ENDLOCAL
pause
*唯一的变化是 SERVER_NAME=WLS_REPORTS(以报告为例)
AdminServer日志文件显示以下内容:
####<28-Oct-2019 12:35:52,984 o'clock GST> <Critical> <WebLogicServer> <DESKTOP-Q9FV7NP> <AdminServer> <main> <<WLS Kernel>> <> <37f82e0f-2e4a-4618-a72f-a296d7fd4526-00000002> <1572251752984> <[severity-value: 4] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-000362> <Server failed. Reason:
There are 1 nested errors:
oracle.security.jps.JpsException: JPS-01055: Could not create credential store instance. Reason oracle.security.jps.service.policystore.PolicyStoreException: Can not connect DB with URL [jdbc:oracle:thin:@//desktop-q9fv7np:50000/LIGINODB]
at oracle.security.jps.internal.config.OpssCommonStartup.start(OpssCommonStartup.java:228)
at oracle.security.jps.wls.JpsWlsStartup.start(JpsWlsStartup.java:105)
at oracle.security.jps.JpsStartup.startWithRetry(JpsStartup.java:287)
at oracle.security.jps.JpsStartup.start(JpsStartup.java:252)
at oracle.security.jps.wls.JpsDefaultService.start(JpsDefaultService.java:92)
at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:76)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1287)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:333)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:375)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:305)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:90)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1237)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1168)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:786)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:670)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:644)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:415)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:355)
Caused by: oracle.security.jps.service.credstore.CredStoreException: JPS-01055: Could not create credential store instance. Reason oracle.security.jps.service.policystore.PolicyStoreException: Can not connect DB with URL [jdbc:oracle:thin:@//desktop-q9fv7np:50000/LIGINODB]
at oracle.security.jps.internal.credstore.ldap.LdapCredentialStore.init(LdapCredentialStore.java:191)
at oracle.security.jps.internal.credstore.ldap.LdapCredentialStore.start(LdapCredentialStore.java:1030)
at oracle.security.opss.internal.runtime.ServiceContextImpl.start(ServiceContextImpl.java:220)
at oracle.security.opss.internal.runtime.ServiceContextManagerImpl.createDefaultContext(ServiceContextManagerImpl.java:325)
at oracle.security.opss.internal.runtime.ServiceContextManagerImpl.initialize(ServiceContextManagerImpl.java:242)
at oracle.security.jps.internal.config.OpssCommonStartup$1.run(OpssCommonStartup.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.internal.config.OpssCommonStartup.start(OpssCommonStartup.java:159)
... 28 more
Caused by: oracle.security.jps.service.policystore.PolicyStoreException: Can not connect DB with URL [jdbc:oracle:thin:@//desktop-q9fv7np:50000/LIGINODB]
at oracle.security.jps.internal.policystore.util.JpsDataManagerUtil.getDBConnection(JpsDataManagerUtil.java:407)
at oracle.security.jps.internal.policystore.util.JpsDataManagerUtil.isNewSchema(JpsDataManagerUtil.java:249)
at oracle.security.jps.internal.core.datamanager.DataManagerFactoryImpl.isNewSchema(DataManagerFactoryImpl.java:252)
at oracle.security.jps.internal.core.datamanager.DataManagerFactoryImpl.getDBDataManager(DataManagerFactoryImpl.java:319)
at oracle.security.jps.internal.core.datamanager.DataManagerFactoryImpl.getDataManager(DataManagerFactoryImpl.java:161)
at oracle.security.jps.internal.credstore.rdbms.CsfDbmsManager.getDataManager(CsfDbmsManager.java:95)
at oracle.security.jps.internal.credstore.ldap.CsfStoreManager.existsStore(CsfStoreManager.java:298)
at oracle.security.jps.internal.credstore.ldap.CsfStoreManager.completeInit(CsfStoreManager.java:177)
at oracle.security.jps.internal.credstore.rdbms.CsfDbmsManager.<init>(CsfDbmsManager.java:91)
at oracle.security.jps.internal.credstore.rdbms.CsfDbmsManager.createInstance(CsfDbmsManager.java:72)
at oracle.security.jps.internal.credstore.ldap.CsfStoreManager.getInstance(CsfStoreManager.java:121)
at oracle.security.jps.internal.credstore.ldap.LdapCredentialStore.init(LdapCredentialStore.java:188)
... 35 more
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12528, TNS:listener: all appropriate instances are blocking new connections
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:774)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:702)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at oracle.security.jps.internal.policystore.util.JpsDataManagerUtil.getDBConnection(JpsDataManagerUtil.java:400)
... 46 more
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12528, TNS:listener: all appropriate instances are blocking new connections
at oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:271)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:317)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1438)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:518)
... 52 more
>
####<28-Oct-2019 12:35:54,452 o'clock GST> <Notice> <WebLogicServer> <DESKTOP-Q9FV7NP> <AdminServer> <main> <<WLS Kernel>> <> <37f82e0f-2e4a-4618-a72f-a296d7fd4526-00000002> <1572251754452> <[severity-value: 32] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-000365> <Server state changed to FAILED.>
####<28-Oct-2019 12:35:54,453 o'clock GST> <Error> <WebLogicServer> <DESKTOP-Q9FV7NP> <AdminServer> <main> <<WLS Kernel>> <> <37f82e0f-2e4a-4618-a72f-a296d7fd4526-00000002> <1572251754453> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-000383> <A critical service failed. The server will shut itself down.>
####<28-Oct-2019 12:35:54,460 o'clock GST> <Notice> <WebLogicServer> <DESKTOP-Q9FV7NP> <AdminServer> <main> <<WLS Kernel>> <> <37f82e0f-2e4a-4618-a72f-a296d7fd4526-00000002> <1572251754460> <[severity-value: 32] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN.>
####<28-Oct-2019 12:35:54,466 o'clock GST> <Info> <WebLogicServer> <DESKTOP-Q9FV7NP> <AdminServer> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <37f82e0f-2e4a-4618-a72f-a296d7fd4526-00000003> <1572251754466> <[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-000236> <Stopping execute threads.>
####<28-Oct-2019 12:35:54,522 o'clock GST> <Info> <WebLogicServer> <DESKTOP-Q9FV7NP> <AdminServer> <main> <<WLS Kernel>> <> <37f82e0f-2e4a-4618-a72f-a296d7fd4526-00000002> <1572251754522> <[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-000238> <Shutdown has completed.>
我已经尝试查找故障数周了,现在情况紧急。我真的很感激您的帮助!
答案1
如果您参考您共享的错误堆栈,您将看到有关关闭原因的线索。似乎数据库无法访问。这可能意味着它已崩溃或被故意关闭。WLS 存储库数据库需要在运行服务器的整个生命周期内保持可访问。换句话说,您不能停止 WLS 存储库数据库并期望 WLS 服务器保持健康。检查数据库日志以了解详细信息。您可能需要进行一些数据库调整。
如果您认为数据库尚未停止并且正在正常工作,那么其他某些因素正在阻止 WLS 层正确访问数据库。
这是您共享的错误堆栈的片段,其中相关语句以粗体显示。
oracle.security.jps.JpsException:JPS-01055:无法创建凭证存储实例. oracle.security.jps.service.policystore.PolicyStoreException 的原因:无法连接数据库URL 为 [jdbc:oracle:thin:@//desktop-q9fv7np:50000/LIGINODB]... 原因为:oracle.security.jps.service.credstore.CredStoreException:JPS-01055:无法创建凭证存储实例. oracle.security.jps.service.policystore.PolicyStoreException 的原因:无法连接数据库URL 为 [jdbc:oracle:thin:@//desktop-q9fv7np:50000/LIGINODB]