java.lang.RuntimeException:java.lang.IllegalStateException:IIOP1004:在密钥库中找不到密钥别名 s1as
java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
我正尝试在 GlassFish Server 4.1 中添加自签名证书,仅用于开发目的。
服务器证书是使用以下命令生成的。
"C:\Program Files\Java\jdk1.8.0_25\bin\keytool" -genkey -alias
server-alias -keyalg RSA -keypass changeit -storepass changeit
-keystore keystore.jks
服务器名称 localhost 是为了响应 keytool 的第一个提示,其中要求输入名字和姓氏。
使用以下命令将生成的服务器证书添加到信任库文件,cacerts.jks。
"C:\Program Files\Java\jdk1.8.0_25\bin\keytool" -import -v
-trustcacerts -alias server-alias -file server.cer -keystore cacerts.jks -keypass changeit -storepass changeit
默认密码更改保持不变。
别名 s1as 已替换为上述命令中使用的别名,即服务器别名(在 Configurations->server-config->Http Service->Http Listeners->http-listener-2
下,http://localhost:4848/
上的 SSL 选项卡)。
keystore.jks 和 cacerts.jks 存储在 C:\Program Files\glassfish-4.1\glassfish\domains\domain1\config
.
下
Configurations->server-config->JVM Settings
下的 JVM 选项,http://localhost:4848/
上的 JVM 选项选项卡,以下选项
-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks
-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks
已被提及,但未被触及。
由于我没有更改默认密码changeit,所以我也没有在其中提及以下选项。
-Djavax.net.ssl.keyStorePassword=new-password
我在服务器启动时遇到以下异常。
Severe: iiop.init_exception
java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:152)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:755)
at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
at com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:492)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:657)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
... 47 more
Severe: enterprise_util.excep_in_createorb
org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory vmcid: OMG minor code: 14 completed: No
at com.sun.proxy.$Proxy194.badCustomSocketFactory(Unknown Source)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:763)
at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
at com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:492)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:657)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:202)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:755)
... 39 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:152)
... 45 more
Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
... 47 more
Severe: Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method
java.lang.RuntimeException: EJB Container initialization error
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: IIOP Protocol Manager initialization failed. Possible cause is that ORB is not available in this container
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:901)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:657)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
... 20 more
Caused by: java.lang.RuntimeException: Orb initialization erorr
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:191)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
... 25 more
Caused by: java.lang.RuntimeException: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory vmcid: OMG minor code: 14 completed: No
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:626)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
... 27 more
Caused by: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory vmcid: OMG minor code: 14 completed: No
at com.sun.proxy.$Proxy194.badCustomSocketFactory(Unknown Source)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:763)
at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
at com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:492)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
... 30 more
Caused by: java.lang.IllegalStateException: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:202)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:755)
... 39 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:152)
... 45 more
Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
... 47 more
Severe: Exception during lifecycle processing
java.lang.RuntimeException: EJB Container initialization error
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: IIOP Protocol Manager initialization failed. Possible cause is that ORB is not available in this container
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:901)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:657)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
... 20 more
Caused by: java.lang.RuntimeException: Orb initialization erorr
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:191)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
... 25 more
Caused by: java.lang.RuntimeException: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory vmcid: OMG minor code: 14 completed: No
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:626)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
... 27 more
Caused by: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory vmcid: OMG minor code: 14 completed: No
at com.sun.proxy.$Proxy194.badCustomSocketFactory(Unknown Source)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:763)
at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
at com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:492)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
... 30 more
Caused by: java.lang.IllegalStateException: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:202)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:755)
... 39 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:152)
... 45 more
Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
... 47 more
Severe: Exception while loading the app
Severe: Application deployment failed: Exception while loading the app
GlassFish Server 不喜欢什么?
它仅在使用别名 s1as
重新生成这些文件 keystore.jks 和 cacerts.jks 时有效,但它因给定的异常而失败,当使用不同的别名(证书昵称)时用来。 GlassFish 似乎在其他地方将此别名用于其他目的。
问题是相同的证书别名 (s1as) 也用于 ORB IIOP 侦听器。
您必须将其更改为您的新别名。
在 Glassfish Admin UI 中,导航至 server-config
- ORB
并在其 SSL 选项卡中更改不同侦听器的证书别名。
我正尝试在 GlassFish Server 4.1 中添加自签名证书,仅用于开发目的。
服务器证书是使用以下命令生成的。
"C:\Program Files\Java\jdk1.8.0_25\bin\keytool" -genkey -alias server-alias -keyalg RSA -keypass changeit -storepass changeit -keystore keystore.jks
服务器名称 localhost 是为了响应 keytool 的第一个提示,其中要求输入名字和姓氏。
使用以下命令将生成的服务器证书添加到信任库文件,cacerts.jks。
"C:\Program Files\Java\jdk1.8.0_25\bin\keytool" -import -v -trustcacerts -alias server-alias -file server.cer -keystore cacerts.jks -keypass changeit -storepass changeit
默认密码更改保持不变。
别名 s1as 已替换为上述命令中使用的别名,即服务器别名(在 Configurations->server-config->Http Service->Http Listeners->http-listener-2
下,http://localhost:4848/
上的 SSL 选项卡)。
keystore.jks 和 cacerts.jks 存储在 C:\Program Files\glassfish-4.1\glassfish\domains\domain1\config
.
Configurations->server-config->JVM Settings
下的 JVM 选项,http://localhost:4848/
上的 JVM 选项选项卡,以下选项
-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks
-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks
已被提及,但未被触及。
由于我没有更改默认密码changeit,所以我也没有在其中提及以下选项。
-Djavax.net.ssl.keyStorePassword=new-password
我在服务器启动时遇到以下异常。
Severe: iiop.init_exception
java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:152)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:755)
at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
at com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:492)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:657)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
... 47 more
Severe: enterprise_util.excep_in_createorb
org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory vmcid: OMG minor code: 14 completed: No
at com.sun.proxy.$Proxy194.badCustomSocketFactory(Unknown Source)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:763)
at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
at com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:492)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:657)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:202)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:755)
... 39 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:152)
... 45 more
Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
... 47 more
Severe: Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method
java.lang.RuntimeException: EJB Container initialization error
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: IIOP Protocol Manager initialization failed. Possible cause is that ORB is not available in this container
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:901)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:657)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
... 20 more
Caused by: java.lang.RuntimeException: Orb initialization erorr
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:191)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
... 25 more
Caused by: java.lang.RuntimeException: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory vmcid: OMG minor code: 14 completed: No
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:626)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
... 27 more
Caused by: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory vmcid: OMG minor code: 14 completed: No
at com.sun.proxy.$Proxy194.badCustomSocketFactory(Unknown Source)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:763)
at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
at com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:492)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
... 30 more
Caused by: java.lang.IllegalStateException: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:202)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:755)
... 39 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:152)
... 45 more
Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
... 47 more
Severe: Exception during lifecycle processing
java.lang.RuntimeException: EJB Container initialization error
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: IIOP Protocol Manager initialization failed. Possible cause is that ORB is not available in this container
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:901)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:657)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
... 20 more
Caused by: java.lang.RuntimeException: Orb initialization erorr
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:191)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:898)
... 25 more
Caused by: java.lang.RuntimeException: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory vmcid: OMG minor code: 14 completed: No
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:626)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
... 27 more
Caused by: org.omg.CORBA.DATA_CONVERSION: WARNING: 02410014: org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory is not a valid custom socket factory vmcid: OMG minor code: 14 completed: No
at com.sun.proxy.$Proxy194.badCustomSocketFactory(Unknown Source)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:763)
at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:62)
at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:84)
at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:77)
at com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:492)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:562)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:697)
at com.sun.corba.ee.impl.orb.ORBImpl.setParameters(ORBImpl.java:684)
at com.sun.corba.ee.spi.osgi.ORBFactory.initialize(ORBFactory.java:107)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
... 30 more
Caused by: java.lang.IllegalStateException: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:202)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at com.sun.corba.ee.impl.orb.ParserTable.operate(ParserTable.java:755)
... 39 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:112)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.init(IIOPSSLSocketFactory.java:250)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:152)
... 45 more
Caused by: java.lang.IllegalStateException: IIOP1004: Key alias s1as not found in keystore
at com.sun.enterprise.iiop.security.IIOPSSLUtilImpl.getKeyManagers(IIOPSSLUtilImpl.java:93)
... 47 more
Severe: Exception while loading the app
Severe: Application deployment failed: Exception while loading the app
GlassFish Server 不喜欢什么?
它仅在使用别名 s1as
重新生成这些文件 keystore.jks 和 cacerts.jks 时有效,但它因给定的异常而失败,当使用不同的别名(证书昵称)时用来。 GlassFish 似乎在其他地方将此别名用于其他目的。
问题是相同的证书别名 (s1as) 也用于 ORB IIOP 侦听器。
您必须将其更改为您的新别名。
在 Glassfish Admin UI 中,导航至 server-config
- ORB
并在其 SSL 选项卡中更改不同侦听器的证书别名。