I have 2 fresh machines with the same version of JDK7 installed.
And on one of the machines I can successfully connect to the remote host from my Java application via HTTPS without any issues and without importing any certificates to the default 'cacerts' keystore.
However on the other machine I'm getting the subj error.
JDKs on both machines are absolutely the same. The only difference between machines is that one of them is located in Europe, and one in the USA (this is the one where I'm getting the error).
Does anybody have a clue to what could cause this error in my case?
UPDATE
Certificate of the host I'm trying to connect to is issued by QuoVadis CA, which by default has the appropriate record in cacerts in Java distibution.
UPDATE2
Looks like the problematic machine for some reason doesn't receive the whole certificate chain from the machine to which it tries to connect (I can see only the last certificate from the chain and right after that follows a message certificate_unknown). So it doesn't get the root certificate.
Besides that the only difference I can see in the log is that working machine uses TLS_RSA_WITH_AES_128_CBC_SHA cipher suite and not working machine uses TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA cipher suite. Could this be a reason of my problem? (I also cannot understand why they use different cipher suites while JDKs are the same and they are connecting to the same machine)