You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Waseem Azhar <wa...@gmail.com> on 2007/08/08 16:20:37 UTC

enabling tomcat SSL on linux

Hi All,

I am stuck, any idea how to enable tomcat SSL  on linux ? I have configured
tomcat on windows machine and its working perfectly. However when i tried to
port my configurations (server.xml) on linux machine, it refuses to work. I
am listing down a very simple SSL configuration below:

<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector port="80" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

    <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->

    <Connector port="8443" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" disableUploadTimeout="true"
               acceptCount="100" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" keystoreFile="
keystore.store" keystorePass="secret"/>


    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
               enableLookups="false" redirectPort="8443" protocol="AJP/1.3"
/>



My certificate is setup properly. No exception, tomcat is listening properly
on http. I have even tried disabling AJP connector but no use.
Any idea? is there some special setup require to make it work ?

Thanks
-Azhar

Re: enabling tomcat SSL on linux

Posted by Juan Ignacio Garzón <ju...@gmail.com>.
Is there an error message given by Tomcat? Maybe its an access problem
to the keystore file by tomcat process.

Are you sure that you have no other process using that port?

2007/8/8, Waseem Azhar <wa...@gmail.com>:
> Hi All,
>
> I am stuck, any idea how to enable tomcat SSL  on linux ? I have configured
> tomcat on windows machine and its working perfectly. However when i tried to
> port my configurations (server.xml) on linux machine, it refuses to work. I
> am listing down a very simple SSL configuration below:
>
> <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
>     <Connector port="80" maxHttpHeaderSize="8192"
>                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>                enableLookups="false" redirectPort="8443" acceptCount="100"
>                connectionTimeout="20000" disableUploadTimeout="true" />
>
>     <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
>
>     <Connector port="8443" maxHttpHeaderSize="8192"
>                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>                enableLookups="false" disableUploadTimeout="true"
>                acceptCount="100" scheme="https" secure="true"
>                clientAuth="false" sslProtocol="TLS" keystoreFile="
> keystore.store" keystorePass="secret"/>
>
>
>     <!-- Define an AJP 1.3 Connector on port 8009 -->
>     <Connector port="8009"
>                enableLookups="false" redirectPort="8443" protocol="AJP/1.3"
> />
>
>
>
> My certificate is setup properly. No exception, tomcat is listening properly
> on http. I have even tried disabling AJP connector but no use.
> Any idea? is there some special setup require to make it work ?
>
> Thanks
> -Azhar
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: enabling tomcat SSL on linux

Posted by Hassan Schroeder <ha...@gmail.com>.
On 8/8/07, Waseem Azhar <wa...@gmail.com> wrote:
> Connecting to 127.0.0.1:8443... failed: Connection refused is the message i
> get. I get the same message 'Connection refused' when try to connect from
> the browser remotely. I have tried using "netstat -an | grep 8443" command
> but nothing show up. seems tomcat is not listening. What could be the
> possible reason for not being listening ?

Because the Connector didn't start, in which case it should say so
in your logs, hopefully along with something indicating why. :-)

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: enabling tomcat SSL on linux

Posted by Waseem Azhar <wa...@gmail.com>.
Yes, I got it working. Tomcat wasn't able to locate certificate file. "netstat
-an | grep  8443" was a really good tip.

Thanks a lot Peter.

On 8/8/07, Peter Crowther <Pe...@melandra.com> wrote:
>
> > From: Waseem Azhar [mailto:waseemzhr@gmail.com]
> > Connecting to 127.0.0.1:8443... failed: Connection refused is
> > the message i
> > get. I get the same message 'Connection refused' when try to
> > connect from
> > the browser remotely. I have tried using "netstat -an | grep
> > 8443" command
> > but nothing show up. seems tomcat is not listening. What could be the
> > possible reason for not being listening?
>
> If it's not listening due to a config error, I'd expect some output to
> that effect in the logs.  Just as a check, search for the log lines
> saying it's starting up a connector on port XXX - do you see one for
> port 80?  Do you see one for 8443?
>
> > I don't know if
> > this information
> > going to be helpful, I have started tomcat using jsvc on prot
> > 80.
>
> Just to check: is port 80 OK?  You can go to http://localhost and see
> the Tomcat welcome page?
>
>                 - Peter
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: enabling tomcat SSL on linux

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Waseem Azhar [mailto:waseemzhr@gmail.com] 
> Connecting to 127.0.0.1:8443... failed: Connection refused is 
> the message i
> get. I get the same message 'Connection refused' when try to 
> connect from
> the browser remotely. I have tried using "netstat -an | grep 
> 8443" command
> but nothing show up. seems tomcat is not listening. What could be the
> possible reason for not being listening?

If it's not listening due to a config error, I'd expect some output to
that effect in the logs.  Just as a check, search for the log lines
saying it's starting up a connector on port XXX - do you see one for
port 80?  Do you see one for 8443?

> I don't know if 
> this information
> going to be helpful, I have started tomcat using jsvc on prot 
> 80.

Just to check: is port 80 OK?  You can go to http://localhost and see
the Tomcat welcome page?

		- Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: enabling tomcat SSL on linux

Posted by Waseem Azhar <wa...@gmail.com>.
Connecting to 127.0.0.1:8443... failed: Connection refused is the message i
get. I get the same message 'Connection refused' when try to connect from
the browser remotely. I have tried using "netstat -an | grep 8443" command
but nothing show up. seems tomcat is not listening. What could be the
possible reason for not being listening ? I don't know if this information
going to be helpful, I have started tomcat using jsvc on prot 80.  There was
apache running previously on port 443 but i shut it down before running
tomcat (just in case).

Thanks.



On 8/8/07, Peter Crowther <Pe...@melandra.com> wrote:
>
> Azhar, can you give us a little more information as to what the
> "refusal" takes?  What are the symptoms?  That you cannot connect from a
> browser on the same machine / different machine?  Does "netstat -an |
> grep 8443" show a port in LISTENING state?
>
>                 - Peter
>
> > -----Original Message-----
> > From: Waseem Azhar [mailto:waseemzhr@gmail.com]
> > Sent: 08 August 2007 15:21
> > To: users@tomcat.apache.org
> > Subject: enabling tomcat SSL on linux
> >
> > Hi All,
> >
> > I am stuck, any idea how to enable tomcat SSL  on linux ? I
> > have configured
> > tomcat on windows machine and its working perfectly. However
> > when i tried to
> > port my configurations (server.xml) on linux machine, it
> > refuses to work. I
> > am listing down a very simple SSL configuration below:
> >
> > <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
> >     <Connector port="80" maxHttpHeaderSize="8192"
> >                maxThreads="150" minSpareThreads="25"
> > maxSpareThreads="75"
> >                enableLookups="false" redirectPort="8443"
> > acceptCount="100"
> >                connectionTimeout="20000"
> > disableUploadTimeout="true" />
> >
> >     <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
> >
> >     <Connector port="8443" maxHttpHeaderSize="8192"
> >                maxThreads="150" minSpareThreads="25"
> > maxSpareThreads="75"
> >                enableLookups="false" disableUploadTimeout="true"
> >                acceptCount="100" scheme="https" secure="true"
> >                clientAuth="false" sslProtocol="TLS" keystoreFile="
> > keystore.store" keystorePass="secret"/>
> >
> >
> >     <!-- Define an AJP 1.3 Connector on port 8009 -->
> >     <Connector port="8009"
> >                enableLookups="false" redirectPort="8443"
> > protocol="AJP/1.3"
> > />
> >
> >
> >
> > My certificate is setup properly. No exception, tomcat is
> > listening properly
> > on http. I have even tried disabling AJP connector but no use.
> > Any idea? is there some special setup require to make it work ?
> >
> > Thanks
> > -Azhar
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: enabling tomcat SSL on linux

Posted by Peter Crowther <Pe...@melandra.com>.
Azhar, can you give us a little more information as to what the
"refusal" takes?  What are the symptoms?  That you cannot connect from a
browser on the same machine / different machine?  Does "netstat -an |
grep 8443" show a port in LISTENING state?

		- Peter 

> -----Original Message-----
> From: Waseem Azhar [mailto:waseemzhr@gmail.com] 
> Sent: 08 August 2007 15:21
> To: users@tomcat.apache.org
> Subject: enabling tomcat SSL on linux
> 
> Hi All,
> 
> I am stuck, any idea how to enable tomcat SSL  on linux ? I 
> have configured
> tomcat on windows machine and its working perfectly. However 
> when i tried to
> port my configurations (server.xml) on linux machine, it 
> refuses to work. I
> am listing down a very simple SSL configuration below:
> 
> <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
>     <Connector port="80" maxHttpHeaderSize="8192"
>                maxThreads="150" minSpareThreads="25" 
> maxSpareThreads="75"
>                enableLookups="false" redirectPort="8443" 
> acceptCount="100"
>                connectionTimeout="20000" 
> disableUploadTimeout="true" />
> 
>     <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
> 
>     <Connector port="8443" maxHttpHeaderSize="8192"
>                maxThreads="150" minSpareThreads="25" 
> maxSpareThreads="75"
>                enableLookups="false" disableUploadTimeout="true"
>                acceptCount="100" scheme="https" secure="true"
>                clientAuth="false" sslProtocol="TLS" keystoreFile="
> keystore.store" keystorePass="secret"/>
> 
> 
>     <!-- Define an AJP 1.3 Connector on port 8009 -->
>     <Connector port="8009"
>                enableLookups="false" redirectPort="8443" 
> protocol="AJP/1.3"
> />
> 
> 
> 
> My certificate is setup properly. No exception, tomcat is 
> listening properly
> on http. I have even tried disabling AJP connector but no use.
> Any idea? is there some special setup require to make it work ?
> 
> Thanks
> -Azhar
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org