You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nehal Sangoi <ne...@patni.com> on 2005/12/21 07:41:58 UTC

deploy fails

Hi,

Below is the build.xml and build.properties files i am using for my app
deployments.
Tomcat 5.5.9
Using Tomcat Virtual Instance
Platform - Solaris/Linux
Manager Deployer used

When i do execute the ant command (ant -f abc.xml), it gives me follwoing
output. What could be the possible reason for such error and failure in
deployments?

Response to my query would be highly appreciated.

Thanks & Regards,
Nehal
============================================================================
====================

clean_dest:
   [delete] Deleting directory /appl/abc/deploy/WAR
    [mkdir] Created dir: /appl/abc/deploy/WAR

copy_code_to_dest:
     [copy] Copying 94 files to /appl/abc/deploy/WAR
     [copy] Copying 142 files to /appl/abc/deploy/WAR/WEB-INF/src
     [copy] Copying 6 files to /appl/abc/deploy/WAR/WEB-INF/lib
   [delete] Deleting directory /appl/abc/deploy/CVS
   [delete] Deleting: /appl/abc/deploy/WAR/WEB-INF/lib/expd2util.jar

clean_classes:
    [mkdir] Created dir: /appl/abc/deploy/WAR/WEB-INF/classes

compile_java_code:
    [javac] Compiling 136 source files to
/appl/abc/deploy/WAR/WEB-INF/classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
     [copy] Copying 6 files to /appl/bcp/deploy/WAR/WEB-INF/classes

create_war:
      [war] Building war: /appl/abc/deploy/WAR/bcp.war
      [war] Warning: selected war files include a WEB-INF/web.xml which will
be ignored (please use webxml attribute to war task)

deploy:

BUILD FAILED
/appl/abc/deploy/build/bcp.xml:87: java.io.FileNotFoundException:
http://3.160.228.52:7451/manager/deploy?path=%2Fabc&update=true

============================================================================
===================================
BUILD FILE


<project name="abc" basedir="." default="deploy">

   <property file="abc.properties"/>

<!-- Configure the context path for this application -->
          <property name="path"     value="/abc"/>

          <!-- Configure properties to access the Manager application -->
          <property name="url"      value="http://ipaddr:port/manager"/>
          <property name="username" value="manager"/>
          <property name="password" value="manager"/>

          <!-- Configure the custom Ant tasks for the Manager
application -->
          <taskdef name="deploy"
classname="org.apache.catalina.ant.DeployTask"/>
          <taskdef name="list"
classname="org.apache.catalina.ant.ListTask"/>
          <taskdef name="reload"
classname="org.apache.catalina.ant.ReloadTask"/>
          <taskdef name="resources"
classname="org.apache.catalina.ant.ResourcesTask"/>
          <taskdef name="roles"
classname="org.apache.catalina.ant.RolesTask"/>
          <taskdef name="start"
classname="org.apache.catalina.ant.StartTask"/>
          <taskdef name="stop"
classname="org.apache.catalina.ant.StopTask"/>
          <taskdef name="undeploy"
classname="org.apache.catalina.ant.UndeployTask"/>

   <path id="lib.path">
           <fileset dir="${java.lib.dir}">
                  <include name="**/*.jar"/>
           </fileset>
           <fileset dir="${common.lib.dir}">
                  <include name="**/*.jar"/>
           </fileset>
        </path>

        <target name="cvs_checkout">
                <delete dir="${cvs.dir}"/>
                <cvs  cvsroot="${cvs.root}"  package="${cvs.module}"
tag="${cvs.tag}"  dest="${cvs.dir}"/>
   </target>

        <target name="clean_dest">
            <delete dir="${war.dir}" failonerror="false"/>
                <mkdir dir="${war.dir}"/>
        </target>

        <target name="copy_code_to_dest" depends="cvs_checkout,clean_dest">
                <copy todir="${war.dir}">
                        <fileset dir="${cvs.dir}/${cvs.module}/appserver">
                                <include name="**/*"/>
                        </fileset>
                </copy>
                <copy todir="${war.dir}/WEB-INF/src">
                        <fileset dir="${cvs.dir}/${cvs.module}/src">
                                <include name="**/*"/>
                        </fileset>
                </copy>
                <copy todir="${war.dir}/WEB-INF/lib">
                        <fileset dir="${cvs.dir}/${cvs.module}/lib">
                                <include name="**/*"/>
                        </fileset>
                </copy>
                <delete dir="${cvs.dir}" />
                <delete file="${war.dir}/WEB-INF/lib/expd2util.jar" />
                <delete file="${war.dir}/WEB-INF/lib/ibmmq.jar" />
                <delete file="$(war.dir)/WEB-INF/lib/jdom.jar" />
        </target>

        <target name="clean_classes" depends="copy_code_to_dest">
                <delete dir="${java.classes.dir}" failonerror="false"/>
                <mkdir dir="${java.classes.dir}"/>
        </target>

        <target name="compile_java_code" depends="clean_classes">
                <javac srcdir="${java.src.dir}"
destdir="${java.classes.dir}">
                        <classpath refid="lib.path" />
                </javac>
                <!-- Copy non java resourece property files...xml files
etc -->
                <copy todir="${java.classes.dir}">
                        <fileset dir="${java.src.dir}">
                              <include name="**/*.*"/>
                              <exclude name="**/*.java"/>
                        </fileset>
                </copy>
        </target>

        <target name="create_war" depends="compile_java_code">
                <war destfile="${war.dir}/${war.name}" basedir="${war.dir}"
duplicate="fail" webxml="${war.dir}/WEB-INF/web.xml" />
        </target>

        <target name="deploy" description="Install web application"
depends="create_war">
                <deploy url="${url}" username="${username}"
password="${password}" path="${path}" war="${war.dir}/abc.war" update="t
rue"/>
        </target>

        <target name="reload" description="Reload web application"
depends="create_war">
                <reload  url="${url}" username="${username}"
password="${password}" path="${path}"/>
--More--</target>

        <target name="undeploy" description="Remove web application">
                <undeploy url="${url}" username="${username}"
password="${password}" path="${path}"/>
        </target>

</project>


=====================================================
PROPERTIES FILE


project.name=abc

# java properties
java.src.dir=/appl/abc/deploy/WAR/WEB-INF/src
java.lib.dir=/appl/abc/deploy/WAR/WEB-INF/lib
java.classes.dir=/appl/bcp/deploy/WAR/WEB-INF/classes

#destination properties
war.dir=/appl/abc/deploy/WAR
source.dir=/appl/abc/deploy/CVS/tomcat
war.name=abc.war

#cvs properties
cvs.root=:pserver:uid:pwd@cvs-server:cvs-path
cvs.module=abc/tomcat
cvs.tag=
cvs.dir=/appl/abc/deploy/CVS

#tomcat properties
common.lib.dir=/appl/abc/shared/lib


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


DNS error, no reply from Tomcat and no clues in the log

Posted by William Claxton <wi...@knowledgeplatform.com>.
I'm trying to upgrade to Tomcat 5.5.14 on Windows2000.  The JRE is 
1.4.2_03.  I've deployed the compatability patch, and commented out 
the Apache Portable Runtime listener from the 'server.xml'.

I encountered an error when starting Tomcat for the first time after 
installation.  The service starts normally, but the browser reports a 
DNS error.  Netstat reports that Tomcat is listening on 8080 (for IP 
0.0.0.0).  But if I telnet to the machine's IP address and connect to 
port 8080 there is no reply.  Perhaps Tomcat is listening on a different IP?

Most perplexing, the Tomcat logs show nothing unusual.  Below are the 
(rather short) logs from my Tomcat startup.  What's missing 
here?  The Catalina logs stop before the expected 
'org.apache.catalina.startup.HostConfig checkResources', WAR 
deployment and context loading.

There are three areas I suspect issues to arise:

- The Java environment is a bit weird, with several versions of the 
JDK on the system.  When the Tomcat installer prompted for a JRE, the 
path suggested was invalid.  I opted to use 'D:\j2sdk1.4.2_03\jre' 
since I can see there is a JRE there, and JAVA_HOME points to 
'D:\j2sdk1.4.2_03'.  If I enter 'java -version' at the command line, I get:

java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)

-  A JK2 ISAPI redirector is in place, and I'm working the 
installation around it.  This is because we can't restart the World 
Wide Web publishing service - it's a production service.

-  There's a separate instance of JRun on the machine, listening on 
port 8000 I think.  Is that the same as the MBean Server?

Any suggestions would be helpful.

Jakarta Service Log
`````````````````````````````
[2005-12-21 19:13:07] [info] Running Service...
[2005-12-21 19:13:07] [info] Starting service...
[2005-12-21 19:13:09] [info] Service started in 1531 ms.

Catalina Log
```````````````````````````
Dec 21, 2005 7:13:11 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Dec 21, 2005 7:13:12 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2890 ms
Dec 21, 2005 7:13:12 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 21, 2005 7:13:12 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.14
Dec 21, 2005 7:13:12 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Dec 21, 2005 7:13:21 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Dec 21, 2005 7:13:22 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Dec 21, 2005 7:13:22 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/110  config=null
Dec 21, 2005 7:13:22 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 10203 ms

STDOUT Log
```````````````````````````
Created MBeanServer with ID: 197a37c:1084d05bf2a:-8000:sinccbwb2kp02:1

Localhost Log
```````````````````````````
Dec 21, 2005 7:13:15 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 21, 2005 7:13:15 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Dec 21, 2005 7:13:16 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 21, 2005 7:13:16 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Dec 21, 2005 7:13:18 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 21, 2005 7:13:18 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()






Regards, Bill Claxton (williamc@knowledgeplatform.com)
MSN: william_claxton@passport.com
Skype: william_claxton@skype.com
Blog: http://learningweb.blogspot.com