Hello,
I am really excited to try out Rundeck, but hit a roadblock when I couldn't get Rundeck to startup after configuring it to use HTTPS. The service.log shows a lot of
: java.security.UnrecoverableKeyException: Cannot recover key
Anyone able to get Rundeck working successfully, via a new RPM install on CentOS 7.x?
Here's the main error that I keep seeing in the logs:2016-01-22
17:11:41.089:WARN:oejuc.AbstractLifeCycle:FAILED
SslContextFactory@351c421c(/etc/rundeck/ssl/keystore,/etc/rundeck/ssl/truststore):
java.security.UnrecoverableKeyException: Cannot recover key
java.security.UnrecoverableKeyException: Cannot recover key
at sun.security.provider.KeyProtector.recover(KeyProtector.java:328)
at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:138)
at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:55)
at java.security.KeyStore.getKey(KeyStore.java:804)
at sun.security.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyManagerImpl.java:131)
at sun.security.ssl.KeyManagerFactoryImpl$SunX509.engineInit(KeyManagerFactoryImpl.java:68)
at javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:259)
at org.eclipse.jetty.util.ssl.SslContextFactory.getKeyManagers(SslContextFactory.java:1077)
at org.eclipse.jetty.util.ssl.SslContextFactory.doStart(SslContextFactory.java:288)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.ssl.SslSelectChannelConnector.doStart(SslSelectChannelConnector.java:607)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.Server.doStart(Server.java:272)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at com.dtolabs.rundeck.RunServer.run(RunServer.java:118)
at com.dtolabs.rundeck.RunServer.main(RunServer.java:78)
I had an IRC conversation but we couldn't figure out the issue (see below).
Thanks,
Brian
[16:57] <brian-stats> hello, having an issue getting ssl working for my rundeck server
[16:57] <brian-stats> brand new install
[16:57] <brian-stats> getting a lot of this in the logs: java.security.UnrecoverableKeyException: Cannot recover key
[16:58] <brian-stats> running on CentOS 7.2
[17:05] <Alex-SF> hi brian-stats
[17:05] <Alex-SF> password
[17:06] <brian-stats> I don't think that's it
[17:06] <brian-stats> I recreated the keystore to ensure that I typed the password correctly
[17:07] <Alex-SF> paths pointing to desired location for trust/keystore?
[17:07] == blalor has changed nick to blalor_afk
[17:07] <brian-stats> and used the same password for both keypass and keystore
[17:08] <brian-stats> yes. my ssl.properties file points to the correct keystore and truststore files
[17:08] <brian-stats> Is there a requirement on the permissions for these two files?
[17:09] <Alex-SF> brian-stats: anything else in the log file? maybe something related
[17:09] <Alex-SF> brian-stats: just read perms
[17:09] <brian-stats> I have the files as owned by root but permissions are 644
[17:09] <Alex-SF> the rundeck process needs to read them
[17:09] <brian-stats> so they are world-readable
[17:11] <Alex-SF> brian-stats: is this RPM or deb install?
[17:11] <brian-stats> RPM
[17:11] <Alex-SF> can you check /etc/rundeck/profile to see if rundeck.ssl.config is passed as java flag?
[17:12] <brian-stats> yes, give me a sec
[17:13] <brian-stats> where do I check for that?
[17:14] <Alex-SF> brian-stats: grep RDECK_JVM
[17:15] <Alex-SF> make sure that line isn't commented
[17:15] <brian-stats> I do have this line uncommented in my profile file: export RDECK_JVM="$RDECK_JVM -Drundeck.ssl.config=/etc/rundeck/ssl/ssl.properties -Dserver.https.port=${RDECK_HTTPS_PORT}"
[17:15] <Alex-SF> ok
[17:16] <Alex-SF> is /etc/rundeck/ssl/ssl.properties the right path? it might be /etc/rundeck/ssl.properties
[17:16] <brian-stats> on my system, it is /etc/rundeck/ssl/ssl.properties
[17:17] <Alex-SF> ok just want to be sure they are as intended
[17:17] <Alex-SF> can you show the log file?
[17:17] <brian-stats> sure. which one?
[17:17] <Alex-SF> service.log
[17:18] <brian-stats>
2016-01-22 17:11:17.029:INFO:oejs.Server:jetty-7.6.0.v20120127
2016-01-22 17:11:19.403:INFO:oejw.StandardDescriptorProcessor:NO JSP
Support for /, did not find org.apache.jasper.servlet.JspServlet
2016-01-22 17:11:20.528:INFO:/:Initializing Spring root
WebApplicationContext INFO BootStrap: Starting Rundeck 2.6.2-1... INFO BootStrap: using rdeck.base config property: /var/lib/rundeck INFO BootStrap: loaded configuration: /etc/rundeck/framework.properties INFO Boo
[17:19] <brian-stats> doesn't look like that copied in correctly
[17:19] <Alex-SF> gist is better
[17:23] <Alex-SF> hmm, not much more than what you already said
[17:25] <brian-stats> the last line before the first error is related to grails
[17:26] <Alex-SF> which line#?
[17:26] <brian-stats> 10
[17:27] <brian-stats> I checked, and my /etc/rundeck/rundeck-config.properties entry for grails.serverURL looks ok
[17:27] <Alex-SF> brian-stats: even if that was wrong it should not throw that error
[17:28] <Alex-SF> right
[17:28] <Alex-SF> only thing google searches seem to indicate is password or file corruption.
[17:29] <brian-stats> yes, that's what I found too
[17:30] == jyaworski [~jyaworski@fsf/member/jyaworski] has quit [Ping timeout: 264 seconds]
[17:33] <brian-stats> here's something interesting
[17:34] <brian-stats> When I try and start up rundeck, it seems to still have some references to the normal HTTP port of 4440
[17:35] <brian-stats> even though I have it configured everywhere I can to use SSL and Port 4443
[17:35] <Alex-SF> right
[17:35] <Alex-SF> check /etc/rundeck/framework.properties
[17:35] <Alex-SF> look at framework.server.port
[17:36] <brian-stats> this is correctly set to 4443
[17:37] <Alex-SF> grep 4440 /etc/rundeck/*
[17:38] <brian-stats> ]$ sudo grep 4440 /etc/rundeck/* /etc/rundeck/profile:RDECK_HTTP_PORT=4440 grep: /etc/rundeck/ssl: Is a directory
[17:38] <Alex-SF> i think that var isnt even used
[17:42] <brian-stats> I have to take off, and log out of htis IRC
[17:42] <brian-stats> I can create a new topic on the mailing list
[17:42] <brian-stats> do you think that would help?
[17:42] <brian-stats> not sure if you also follow the mailing list
[17:42] <Alex-SF> ya