SSL setup

I am trying to get AS9 up but I am having difficulty getting the Server to recognize the new Server Cert. I have gone through most of the Sun documentation and have been unable to find a problem. This is the dump from the log file.

[#|2006-07-27T14:22:24.500-0500|INFO|sun-appserver-pe9.0|javax.enterprise.syste m.core|_ThreadID=10;_ThreadName=main;|Server shutdown complete.|#]

[#|2006-07-27T14:22:29.281-0500|INFO|sun-appserver-pe9.0|javax.enterprise.tools .launcher|_ThreadID=10;_ThreadName=main;|

d:/Sun/AppServer/jdk\bin\java

-client

-Xmx512m

-XX:NewRatio=2

-Dcom.sun.aas.defaultLogFile=D:/Sun/AppServer/domains/domain1/logs/server.log

-Djava.endorsed.dirs=d:/Sun/AppServer/lib/endorsed

-Djava.security.policy=D:/Sun/AppServer/domains/domain1/config/server.policy

-Djava.security.auth.login.config=D:/Sun/AppServer/domains/domain1/config/login .conf

-Dsun.rmi.dgc.server.gcInterval=3600000

-Dsun.rmi.dgc.client.gcInterval=3600000

-Djava.ext.dirs=d:/Sun/AppServer/jdk/jre/lib/ext;D:/Sun/AppServer/domains/domai n1/lib/ext;d:/Sun/AppServer/javadb/lib

-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver

-Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.App ServerMBeanServerBuilder

-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise .config.serverbeans.AppserverConfigEnvironmentFactory

-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar

-Dcom.sun.enterprise.taglisteners=jsf-impl.jar

-Djava.security.manager

-Djavax.net.ssl.keyStore=D:/Sun/AppServer/domains/domain1/Cert/OwlCert.jks

-Djavax.net.ssl.trustStore=D:/Sun/AppServer/domains/domain1/Cert/TrustedCA.jks

-Djavax.net.ssl.keyStorePassword=javabean

-Dcom.sun.aas.classloader.optionalOverrideableChain=appserv-ws.jar,commons-logg ing.jar,commons-launcher.jar

-Dcom.sun.aas.classloader.appserverChainJars=admin-cli.jar,admin-cli-ee.jar,dbs chema.jar,j2ee-svc.jar

-Dcom.sun.aas.classloader.serverClassPath.ee=%HADB_HOME%/lib/hadbjdbc4.jar,d:/S un/AppServer/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,%HADB_HOME%/lib/dbstate.jar,%HADB_H OME%/lib/hadbm.jar,%HADB_HOME%/lib/hadbmgt.jar,d:/Sun/AppServer/lib/SUNWmfwk/lib /mfwk_instrum_tk.jar

-Dcom.sun.aas.configName=server-config

-Ddomain.name=domain1

-Djmx.invoke.getters=true

-Dcom.sun.aas.promptForIdentity=true

-Dcom.sun.aas.classloader.optionalOverrideableChain.ee=

-Dcom.sun.aas.instanceRoot=D:/Sun/AppServer/domains/domain1

-Dcom.sun.aas.domainName=domain1

-Dcom.sun.aas.classloader.sharedChainJars=javaee.jar,d:/Sun/AppServer/jdk/lib/t ools.jar,install/applications/jmsra/imqjmsra.jar,commons-launcher.jar,d:/Sun/App Server/imq/lib/jaxm-api.jar,d:/Sun/AppServer/imq/lib/fscontext.jar,d:/Sun/AppSer ver/imq/lib/imqbroker.jar,d:/Sun/AppServer/imq/lib/imqjmx.jar,d:/Sun/AppServer/i mq/lib/imqxm.jar,d:/Sun/AppServer/lib/ant/lib/ant.jar,appserv-ws.jar,mail.jar,js f-api.jar,jsf-impl.jar,appserv-jstl.jar,appserv-env.jar,jmxremote_optional.jar,d :/Sun/AppServer/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,commons-logging.jar,activation.j ar,appserv-rt.jar,appserv-admin.jar,appserv-cmp.jar

-Dcom.sun.aas.classloader.sharedChainJars.ee=appserv-se.jar,appserv-ee.jar,%HAD B_HOME%/lib/dbstate.jar,%HADB_HOME%/lib/hadbjdbc4.jar,jgroups-all.jar,d:/Sun/App Server/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar

-Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager

-Dcom.sun.enterprise.overrideablejavaxpackages=javax.xml.bind,javax.help,javax. portlet

-Dcom.sun.aas.classloader.serverClassPath=d:/Sun/AppServer/lib/install/applicat ions/jmsra/imqjmsra.jar,d:/Sun/AppServer/imq/lib/jaxm-api.jar,d:/Sun/AppServer/i mq/lib/fscontext.jar,d:/Sun/AppServer/imq/lib/imqbroker.jar,d:/Sun/AppServer/imq /lib/imqjmx.jar,d:/Sun/AppServer/lib/ant/lib/ant.jar,d:/Sun/AppServer/lib/SUNWjd mk/5.1/lib/jdmkrt.jar

-Dcom.sun.aas.classloader.appserverChainJars.ee=

-Dcom.sun.aas.configRoot=d:/Sun/AppServer/config

-Djava.library.path=d:\Sun\AppServer\lib;d:\Sun\AppServer\lib;d:\Sun\AppServer\ jdk\bin;.;C:\WINNT\system32;C:\WINNT;d:\Sun\AppServer\lib;d:\Sun\AppServer\bin;d :\Sun\AppServer\bin;d:\Sun\AppServer\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\Sys tem32\Wbem;C:\CA_APPSW;C:\NSM\services\bin;C:\NSM\services\tools;C:\NSM\help;C:\ NSM\BIN;C:\PROGRA~1\CA\SHARED~1\SCANEN~1;D:\cal

-Dcom.sun.aas.instanceName=server

-Dcom.sun.aas.processLauncher=SE

-Dcom.sun.aas.installRoot=d:/Sun/AppServer

-Dcom.sun.aas.ClassPathPrefix=

-Dcom.sun.aas.ClassPathSuffix=

-Dcom.sun.aas.ServerClassPath=

-cp

;d:/Sun/AppServer/lib/appserv-launch.jar;D:\Classes\ojdbc14.jar

com.sun.enterprise.server.PELaunch

start|#]

[#|2006-07-27T14:22:30.625-0500|INFO|sun-appserver-pe9.0|javax.enterprise.syste m.core|_ThreadID=10;_ThreadName=main;|Starting Sun Java System Application Server Platform Edition 9.0 (build b48) ...|#]

[#|2006-07-27T14:22:32.921-0500|INFO|sun-appserver-pe9.0|javax.enterprise.syste m.core|_ThreadID=10;_ThreadName=main;|CORE5098: AS Socket Service Initialization has been completed.|#]

[#|2006-07-27T14:22:33.078-0500|INFO|sun-appserver-pe9.0|javax.enterprise.syste m.core|_ThreadID=10;_ThreadName=main;Java HotSpot(TM) Client VM;1.5.0_06;Sun Microsystems Inc.;|CORE5076: Using [Java HotSpot(TM) Client VM, Version 1.5.0_06] from [Sun Microsystems Inc.]|#]

[#|2006-07-27T14:22:33.406-0500|INFO|sun-appserver-pe9.0|javax.enterprise.syste m.core.security|_ThreadID=10;_ThreadName=main;|SEC1001: Security Manager is ON.|#]

[#|2006-07-27T14:22:35.609-0500|INFO|sun-appserver-pe9.0|javax.enterprise.syste m.tools.admin|_ThreadID=10;_ThreadName=main;|ADM0001:MBeanServer initialized successfully|#]

[#|2006-07-27T14:22:40.609-0500|WARNING|sun-appserver-pe9.0|javax.enterprise.sy stem.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=2dec306d-1cfb-4d7c-91b1 -1420a9b3a55c;|java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)

Caused by: java.lang.ExceptionInInitializerError

at com.sun.enterprise.security.SecurityLifecycle.onInitialization(SecurityLifecycl e.java:85)

at com.sun.enterprise.server.ApplicationServer.onInitialization(ApplicationServer. java:238)

at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(OnDemandServ er.java:93)

at com.sun.enterprise.server.PEMain.run(PEMain.java:316)

at com.sun.enterprise.server.PEMain.main(PEMain.java:260)

... 5 more

Caused by: java.lang.IllegalStateException: Keystore was tampered with, or password was incorrect

at com.sun.enterprise.security.SecuritySupportImpl.loadStores(SecuritySupportImpl. java:98)

at com.sun.enterprise.security.SecuritySupportImpl.<init>(SecuritySupportImp l.java:66)

at com.sun.enterprise.security.SecuritySupportImpl.<init>(SecuritySupportImp l.java:61)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at com.sun.enterprise.pluggable.PluggableFeatureFactoryBaseImpl.invoke(PluggableFe atureFactoryBaseImpl.java:71)

at $Proxy0.getSecuritySupport(Unknown Source)

at com.sun.enterprise.security.SecurityUtil.getSecuritySupport(SecurityUtil.java:3 56)

at com.sun.enterprise.security.SSLUtils.<clinit>(SSLUtils.java:89)

... 10 more

|#]

[8214 byte] By [rnm@uno] at [2007-11-26 9:06:04]
# 1
What is the keystore-password for: Cert/OwlCert.jks?The default password is "changeit". If you have changed the password, you'll need to pass that password as the relevant JSSE -D to the server VM at startup.HTH,Kedar
kedarmhaswade at 2007-7-6 23:18:48 > top of Java-index,Application & Integration Servers,Application Servers...
# 2
-Djavax.net.ssl.keyStorePassword=javabeanI have tried the password both quoted and unquoted. I verified that this is the correct password for both the keystore and the certificate with keytool.
rnm@uno at 2007-7-6 23:18:48 > top of Java-index,Application & Integration Servers,Application Servers...
# 3
Hmm. There could be a problem/bug.Can you please (for the time-being) :- Use keytool and change the password of this keystore to "changeit" and then remove this password related -D?Thanks,Kedar
kedarmhaswade at 2007-7-6 23:18:48 > top of Java-index,Application & Integration Servers,Application Servers...
# 4
Yes. I tried that and it still doesn't work. The only key I have working is the key that JAS came with. Is there another place I should be looking? Is the key location or the key alias hardcoded in someplace? Please give me an idea.
rnm@uno at 2007-7-6 23:18:48 > top of Java-index,Application & Integration Servers,Application Servers...
# 5

> Yes. I tried that and it still doesn't work. The only

> key I have working is the key that JAS came with. Is

> there another place I should be looking? Is the key

> location or the key alias hardcoded in someplace?

> Please give me an idea.

OK, this is becoming a little too awkward. Let me see if I can get you some help.

Thanks,

Kedar

kedarmhaswade at 2007-7-6 23:18:48 > top of Java-index,Application & Integration Servers,Application Servers...
# 6
From error message, the password is not correct.Please make sure that the keystore password and key password are the same as before. In AS, one cannot change the keystore password directly at keystore, you have to use "asadmin change-master-password" command.
ShingWaiChan at 2007-7-6 23:18:48 > top of Java-index,Application & Integration Servers,Application Servers...