dev@glassfish.java.net

Re: how does asadmin avoid this exception...

From: kedar <Kedar.Mhaswade_at_Sun.COM>
Date: Thu, 15 Oct 2009 07:35:27 -0700

asadmin attempts a plaintext connection and if it gets a SocketException,
then it examines to see if the server is actually https and not http.
The code that determines this is in:
<v3>/common/common-util/.../NetUtils.java, method: isSecurePort().

That method tries to do some test that tells us with some confidence if the
server is really secure. (JF, you contributed this code, right?) Then asadmin
just reports the same to the user (i.e. server appears secure, retry with
--secure).

Incidentally, Bill is fixing asadmin code such that we are now going to
attempt an https connection if http connection fails (a bug filed by you,
apparently).

In the exception stack trace you get, do you have SocketException or
something else? (YMMV, because it's not clear exactly what exception
you'll get when you try something like this).

vince kraemer wrote:
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to
> find valid certification path to requested target
> I want to extend the v3 plugin for NetBeans to 'play well' with a
> domain that has a secured admin listener and I am being thwarted by this...
>
> I figure we must have code that copes with this in the admin cli. A
> pointer to the right place to start would be great...
>
> Thanks,
> vbk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>