Backup jobs

79 views
Skip to first unread message

Iohannes Nerevar

unread,
Feb 2, 2024, 9:02:37 AMFeb 2
to rundeck-discuss
Hi,

I want to export my jobs using Rundeck CLI Tool.
I set the export environment variable "
export RD_URL=http://localhost:4440" and run my command : "rd jobs list -f /path/to/backup/project.xml -p Project1"

I have the following java error:

javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:360)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:303)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:298)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1357)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1232)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1175)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:183)

Is there a Rundeck certificate to add to the java environment? I don't really understand since I work in localhost. Furthermore, everything works correctly in the test environment...
Any ideas?
Thanks

rac...@rundeck.com

unread,
Feb 2, 2024, 9:17:56 AMFeb 2
to rundeck-discuss
Hi,

Could you double-check all RD_XXX environment variables? Is your rundeck instance an HTTPS-based instance?

Regards.
Message has been deleted

Iohannes Nerevar

unread,
Feb 7, 2024, 3:51:42 AMFeb 7
to rundeck-discuss
Hi,

It looks good.

I access the rundeck interface in https, but in the framework.properties file, the value is: 
framework.server.url = http://localhost:4440

I tried to show the way to the keystore in Java environment with commands like :
keytool -importcert -file /path/to/the/certificate.crt -alias rundeck_cert -keystore /path/to/the/keystore
java -Djavax.net.ssl.trustStore=/path/to/the/keystore

Not better.

Regards

rac...@rundeck.com

unread,
Feb 7, 2024, 7:29:37 AMFeb 7
to rundeck-discuss

Hi,

Regarding this:

I access the rundeck interface in https, but in the framework.properties file, the value is framework.server.url = http://localhost:4440

If your instance is HTTPS-based, please change the value to HTTPS on grails.ServerURL parameter (rundeck-config.properties file) and the framework.server.url (framework.properties file). Same for $RD_URL RD CLI env var.

Do you have more $RD_XXX variables defined? Try adding the following env var in your RD CLI host RD_INSECURE_SSL=true (check this).

Here you can see all available RD CLI env vars.

Greetings.

Iohannes Nerevar

unread,
Feb 12, 2024, 4:03:54 AMFeb 12
to rundeck-discuss
Hi,

Setting framework.server.url to https results in an "java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:4440" error and it also doesn't work for $RD_URL RD CLI env var.
On the other hand, taking into account the doc you shared and exporting RD_INSECURE_SSL=true solves my problem. 
I suppose it's not ideal in the long run. I reset the value to "false" after exporting. It'll do for now, I'll try to solve the problem in a more permanent way a bit later, when I have a bit more time to spare.

Thanks a lot for your help

Cheers !
Reply all
Reply to author
Forward
0 new messages