Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Failed to connect to Web Service API

TakeTheLongPathAug 19 2015 — edited Aug 21 2015

I have switched my OVMM (3.3.3) weblogic server to using a non-self-signed SSL certificate.

I am able to get into Weblogic console. But the OVM console and CLI have errors.

Log entry:

==> AdminServer.out <==

<2015-08-19T10:08:13.812-0500> <Error> <com.oracle.ovm.appfw.coreinterface.ConnectionManager> <BEA-000000> <AppFw session 1: Failed to connect to Web Service API.

com.sun.jersey.api.client.ClientHandlerException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

  at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)

  at com.sun.jersey.api.client.Client.handle(Client.java:648)

  at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)

  at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)

  at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:558)

  Truncated. see log file for complete stacktrace

Caused By: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

  at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)

  at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904)

  at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279)

  at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273)

  at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1446)

  Truncated. see log file for complete stacktrace

Caused By: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

  at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)

  at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)

  at sun.security.validator.Validator.validate(Validator.java:260)

  at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)

  at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)

  Truncated. see log file for complete stacktrace

Caused By: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

  at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196)

  at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268)

  at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)

  at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)

  at sun.security.validator.Validator.validate(Validator.java:260)

  Truncated. see log file for complete stacktrace

>

Steps to get here:

1. I have a private key and certificate generated using OpenSSL because I need PEM version to use with Apache as well.

2. I import the private key and certificate into a brand new keystore using an ImportKey.class file (Import private key and certificate into Java Key Store (JKS))

3. Import the CA for the certificate above into jks and mark as trusted

4. copy the new jks to   /u01/app/oracle/ovm-manager-3/domains/ovm_domain/security/

5. Set the ENV variables:

export JAVA_HOME=/u01/app/oracle/java/
export WL_HOME=/u01/app/oracle/Middleware/wlserver_10.3/
export MW_HOME=/u01/app/oracle/Middleware

6. run script provided to "setsslkey" to the one in the jks

/u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovmkeytool.sh setsslkey "

Was successful.

Restarted OVMM service and connected to weblogic and OVM console and the Certificate is green! Success!

Able to log in to weblogic console.

Not able to log in to the OVMM console.

Google showed me a blog and script to run to configure the client certs:

/u01/app/oracle/ovm-manager-3/bin/configure_client_cert_login.sh from Harri's Oracle Technology Blog: OracleVM 3.3.1 and External Authentication

This completes -- this solved an error before when I had to restore from a backup after a failed update.

Still get the errors above.

I have imported my host certificate and my CA's certificate into the ovmtrust JKS file in /u01/app/oracle/ovm-manager-3/domains/ovm_domain/security/

(because I know the passwords to them, having previously run the re-create-all script...)

This post has been answered by TakeTheLongPath on Aug 21 2015
Jump to Answer

Comments

fac586

Richard Legge wrote:

Hi all, this mornings question.. please let it be a nice simple answer...

Im using APEX 4.2, and have switch to theme 15. simple blue.

Ive got a menu list on the left hand side. so it needs to sit in region 2. its designated as a sidebar region.   I'm trying to use the sidebar template so that I get a menu header and a border... However region 2 on this theme has a blue background... and also has a header and footer area / image.

So my sidebar region looks odd inside it.

From my research, I should be able to override the region template to remove this header / footer / background colour and associated attributes, leaving me with a nice sidebar menu... Ive don lots of research, and think I should be referencing the region class in the definition of my menu??? but dont seem to be able to get it right..

Please could somebody help

Somebody would be able to help more quickly and effectively if they had an example on apex.oracle.com to refer to...

However, if you're using 4.2 and not supporting legacy (IE6/7) browsers I would recommend not using theme 15, nor any of the other legacy quirks mode themes (marked with a "*"). You'll find it much easier to work with—and get support for—the more modern standards-based themes.

Richard Legge

Have I missed something then, as Ive only got two standard themes.. 23 (uniframe) and 26 (productivity Apps).. It doesn't give me much to work with... are there others available?

Thanks

Richard

fac586

Richard Legge wrote:

Have I missed something then, as Ive only got two standard themes.. 23 (uniframe) and 26 (productivity Apps).. It doesn't give me much to work with... are there others available?

You must have some of the "Standard" themes already installed in the app.

When you go through the Create Theme wizard, on the Identify Theme page, select All Themes from the Theme Type select list, and use any of them except those marked with a "*": 8, 10, 11, 13 (which is not marked but should be), 14, 15, 16, 18, 19, and 20.

All of the other themes (regardless of their 4.2 labelling as "Standard" or "Legacy") contain a DOCTYPE declaration that will trigger standards mode in browsers.

Richard Legge

ahh.  Thanks. Yes, forgot that if Id already imported them, they dont show up on the list.. many thanks

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 18 2015
Added on Aug 19 2015
2 comments
3,608 views