java.lang.RuntimeException:java.lang.IllegalStateException:IIOP1004:密钥库中找不到密钥别名s1

时间:2015-03-09 19:06:21

标签: security ssl glassfish ssl-certificate glassfish-4.1

我正在尝试在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

默认密码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 =新密码

我在服务器启动时遇到以下异常。

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$4.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$4.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$4.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$4.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$4.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$4.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$4.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似乎将此别名用于其他目的。

1 个答案:

答案 0 :(得分:1)

问题在于,相同的证书别名( s1as )也用于ORB IIOP侦听器。

您必须将其更改为新别名。

在Glassfish管理界面中,导航至server-config - ORB并在其SSL标签中更改不同侦听器的证书别名。

ORB listeners