Spectrum OneClick install fails on Solaris with: Error validating OneClick port (Legacy KB ID CNC TS33826)

Document ID : KB000051780
Last Modified Date : 14/02/2018
Show Technical Document Details

Running Tomcat with an Apache proxy server


 


The Apache Proxy server provides users with port 80 access to our Tomcat server. Our Tomcat server runs as a non-root user, on a port > 1024, but the Apache server runs as root, and forwards port 80 requests to our Tomcat server ports.


 


Web Link:


This link provided a working solution toward the bottom of the page, where it documents using Apache?s reverse proxy mechanisms (section 8.2).


                        http://www.linux-sxs.org/internet_serving/c875.html



 


Spectrum 9.2


Apache 2.2 web server (assumed to be installed)


 


Tomcat Changes


 


The following steps affect Spectrum?s Tomcat server.


 



    • Shut down Tomcat

    • Edit $SPECROOT/tomcat/conf/server.xml file

    • Comment out the "Connector" element that looks like this. (It?ll have the "port=8080" attribute on it.)

     


    <Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" />


     



      • From the $SPECROOT/tomcat/conf/server-default.xml file, copy the following element (having "port=8082") into the $SPECROOT/tomcat/conf/server.xml file after the "Connector" you just commented out in step 3.

       


      <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->


      <!-- See proxy documentation for more information about using this. -->


       


      <!--


      <Connector port="8082" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"           enableLookups="false" acceptCount="100" connectionTimeout="20000" proxyPort="80" disableUploadTimeout="true" />


      -->


                 


      Make sure that the "Connector" element is uncommented, so that it looks like this:


       


      <Connector port="8082" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"           enableLookups="false" acceptCount="100" connectionTimeout="20000" proxyPort="80" disableUploadTimeout="true" />


       


      5.  &nb.sp;   Start Tomcat (usually with "bin/startTomcat.sh)


       


      Setting up Apache 2


       


      As noted above, this guide does not address the installation of Apache 2. We assume that it is installed and running on the Unix box. The following steps address configuring Apache 2 as a proxy to the OneClick Tomcat server.


       



        • Shut down Apache2

        • Edit "etc/httpd.conf".

        • Make sure that the following lines are uncommented. By default, they shipped commented.

                 LoadModule proxy_module modules/mod_proxy.so

                LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
                LoadModule proxy_http_module modules/mod_proxy_http.so
                LoadModule proxy_connect_module modules/mod_proxy_connect.so

         



          • Now, we?ll add the virtual host that will listen on port 80, and forward it to the Tomcat server that?s listening on port 8082. Add the following section to "httpd.conf", using the template below:

           


          <VirtualHost {myServerName}:80>


             ServerName {myServerName}


             DocumentRoot /var/www/html


             DirectoryIndex index.html index.shtml


          ProxyPass /spectrum http://{myServerName}:8082/spectrum



          ProxyPassReverse /spectrum http://{myServerName}:8082/spectrum



          </VirtualHost>


           


                      For example, a server name of "fulto02-sun.ca.com" was used. Thus, after the template replacements, the VirtualHost section looked like this:


           


          <VirtualHost fulto02-sun.ca.com:80>


             ServerName fulto02-sun.ca.com


             DocumentRoot /var/www/html


             DirectoryIndex index.html index.shtml


          ProxyPass /spectrum http://fulto02-sun.ca.com:8082/spectrum



          ProxyPassReverse /spectrum http://fulto02-sun.ca.com:8082/spectrum



          </VirtualHost>


           



            • Start Apache (I used "apache2/sbin/apachectl start") 

            Verifying the proxy works


             


            Open a browser, and navigate to:


             


                        http://{myServerName}/spectrum


             


            You should be taken to the OneClick welcome page. From there, you should be able to use OneClick normally.


             


             


             

            .

            Related Issues/Questions:
            Spectrum OneClick install fails on Solaris with:  Error validating OneClick port
            The OneClick port must be greater than 1024

            Problem Environment:
            Spectrum 9.2

            Causes of this problem:
            The port must be greater than 1024 because tomcat is not run as root.  If you need to connect to the web server at port 80 then you must  install/configure apache to do that.


            (Legacy KB ID CNC TS33826 )