0

I install apache 2.2.22 and tomcat 7 on ubuntu and deploy ROOT.war In catalina.log file I get this error: Failed to initialize end point associated with ProtocolHandler ["http-bio-80"] java.net.BindException: Permission denied :80

server.xml

<Server port="8005" shutdown="SHUTDOWN">

    <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
    <Listener className="org.apache.catalina.core.JasperListener" />
    <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

    <Service name="Catalina">

        <Connector port="80" protocol="HTTP/1.1" maxThreads="200"
                   maxHttpHeaderSize="21000" connectionTimeout="20000" 
                   redirectPort="443" compression="on" 
                   compressionMinSize="2048" 
                   noCompressionUserAgents="gozilla, traviata"
                   compressableMimeType="text/html,text/xml,text/javascript,application/x-javascript,application/javascript" />

        <Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol"
                    SSLEnabled="true" maxHttpHeaderSize="21000" 
                    maxThreads="200" scheme="https"
                    secure="true" keystoreFile="path"
                    keystorePass="" clientAuth="false" 
                    sslProtocol="TLS" />

        <!-- Define an AJP 1.3 Connector on port 8009 -->

        <Connector port="8009" protocol="AJP/1.3" redirectPort="443" />

       <Engine name="Catalina" defaultHost="localhost">

          <Realm className="org.apache.catalina.realm.LockOutRealm">
           <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
            resourceName="UserDatabase" />
        </Realm>

       <Host name="localhost" appBase="webapps" unpackWARs="true"
        autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
        <Context path="" docBase="ROOT" debug="0" reloadable="true">
            <WatchedResource>WEB-INF/web.xml</WatchedResource>
        </Context>
    </Host>
    </Engine>
 </Service>
  </Server>

workers.properties:

worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

apache2.conf

# Include the virtual host configurations:
Include sites-enabled/

JkShmFile /var/log/apache2/mod_jk.shm
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

Include sites-available/default-ssl

/etc/apache2/sites-enabled/000-default

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

   DocumentRoot /var/www
   <Directory />
     Options FollowSymLinks
    AllowOverride None
  </Directory>
   <Directory /var/www/>
   Options Indexes FollowSymLinks MultiViews
   AllowOverride None
  Order allow,deny
  allow from all
 </Directory>

   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
 <Directory "/usr/lib/cgi-bin">
  AllowOverride None
  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  Order allow,deny
  Allow from all
  </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

  # Possible values include: debug, info, notice, warn, error, crit,
     # alert, emerg.
  LogLevel warn

       CustomLog ${APACHE_LOG_DIR}/access.log combine

  JkMount /* worker1

   </VirtualHost>
Lusi
  • 1

1 Answers1

0

Quick answer is that you have:<Connector port="80" ... telling tomcat to bind to port 80. You also have Apache set to bind to port 80. You probably want to disable/remove the Connector sections for port 80 and port 443.

If you want to be able to debug tomcat without apache, you might want to change those connectors to 8080, and 8443.

becomingwisest
  • 3,328
  • 20
  • 18