users@grizzly.java.net

Re: Grizzly with SSL

From: Sabyasachi Biswas <sabyforjava_at_gmail.com>
Date: Wed, 11 Aug 2010 17:11:28 +0200

Hi Alexey,

Thank you for your response, I was just wondering about one thing if the
grizzly framework is not able to start in the defined port, does it revert
back to the default port 8080.

I see even if https access is not available http port is available,I do not
see any stacktraces in the grizzly logs, or on my application logs.

In case of port binding errors as this one shouldn't we expect to see some
error in the logs.

Please let me know.

Regards,
Sabyasachi.



On 8/11/10, Sabyasachi Biswas <sabyforjava_at_gmail.com> wrote:
>
> Hi,
>
> I have been trying to build a SOAP Message Routing server with Grizzly.
> Everything was working fine when I was
> using http to access the server. But, since I have started using the server
> in the secure mode, clients are receiving 'Connection Refused Error'.
>
> Even static resources are not found with https , but those can be found
> with http on the default port.
>
> My code looks like this:
>
> GrizzlyWebServer grizzlyWebServer=new
> GrizzlyWebServer(443,WEB_APP_ROOT,true);
> SSLConfig sslConfig=new SSLConfig();
> sslConfig.setKeyStoreFile("-Path-");
> sslConfig.setKeyStorePass("****");
> sslConfig.setTrustStoreFile("-Path-");
> sslConfig.setTrustStorePass("**");
> sslConfig.validateConfiguration();
> grizzlyWebServer.setSSLConfig(sslConfig);
> //server settings
> grizzlyWebServer.enableProtocol(GrizzlyWebServer.PROTOCOL.HTTP);
> grizzlyWebServer.setCoreThreads(CORE_THREADS);
> grizzlyWebServer.setMaxThreads(MAX_THREADS);
>
> SOAPMessageAdapter adapter=new SOAPMessageAdapter(WEB_APP_ROOT);
> adapter.setHandleStaticResources(true);
> grizzlyWebServer.addGrizzlyAdapter(adapter,new String[]{"/esbgateway"});
> grizzlyWebServer.start();
>
> SOAPMessageAdapter extends the GrizzlyAdapter.
>
> With this construction https connection is not working , please can you let
> me know what am I missing?
>
> Regards,
> Sabyasachi.
>