fabric8io/fabric8

SSLUtils.isHttpsAvailable(Config) does not expose original exception

mdeknowis opened this issue · 1 comments

We have an issue to get the client running:

WARN io.fabric8.kubernetes.client.internal.SSLUtils - SSL handshake failed. Falling back to insecure connection.

So we tried to understand, what's going wrong and the code of this method io.fabric8.kubernetes.client.internal.SSLUtils.isHttpsAvailable(Config) explains, why we don't see the original exception:

    public static boolean isHttpsAvailable(Config config) {
...
        try {
...
        } catch (Throwable t) {
            LOG.warn("SSL handshake failed. Falling back to insecure connection.");
        } finally {
...
    }

Please could you add at least as DEBUG information, the original exception, so someone has a chance to understand, why the handshake failed?

That would be really nice.

Kind regards

Also is it really a good idea to catch Throwable, hence, to catch OutOfMemoryError, too?