Thanks *Jeffrey Janner *and *Mark Eggers*, I was able to deploy the app
successfully in its own virtual host. Actually I think apache httpd was
interfering somewhere and I raised the support ticket with my provider.I
think they made some changes to host file and it started working. I had
done same set up as given in the link by Charles.Now it works like a charm
and I also have manager interface to upload war files :)

Sometimes I get this error while using manager interface,

“Error invoking method check” when deploying a WAR on Tomcat
<http://stackoverflow.com/questions/1536364/error-invoking-method-check-when-deploying-a-war-on-tomcat>

But deployment happens quite successfully but it does not start the app.
Need to restart the server fix this.

Quick google search showed me that  its related to OOM. Is this related to
manager app or tomcat is starving of memory?



On Wed, May 13, 2015 at 11:17 AM, Jeffrey Janner <
jeffrey.jan...@polydyne.com> wrote:

> > -----Original Message-----
> > From: Kiran Badi [mailto:ki...@poonam.org]
> > Sent: Tuesday, May 12, 2015 9:30 PM
> > To: Tomcat Users List
> > Subject: Re: Tomcat 7.0.57 - Deployment Issue
> >
> > Thanks Hassan/Prabhu/Charles for reply.
> >
> > I tried the options given in this link.
> >
> > http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts
> >
> > but for some reasons still its not working.I have pasted the server xml
> > for
> > reference. I have unlimited website hosting plan with arvixe.com , but
> > for
> > some reasons it's still not working.Not sure if these guys needs to add
> > something special to hosts file.
> >
> > here is link for actual site -
> >
> > homelyhotels.com - you will probably see cgi-bin folder.
> >
> > Below server xml, I have added just a second host tag for webapp2. I am
> > bit
> > hesitant to make changes wrt to webapp1(removing context tags etc due to
> > lack of time on my end along with lack of sufficient knowledge in case
> > something breaks,however I will eventually clean that as well).
> >
> ...
> >     <!-- An Engine represents the entry point (within Catalina) that
> > processes
> >          every request.  The Engine implementation for Tomcat stand
> > alone
> >          analyzes the HTTP headers included with the request, and passes
> > them
> >          on to the appropriate Host (virtual host).
> >          Documentation at /docs/config/engine.html -->
> >
> >     <!-- You should set jvmRoute to support load-balancing via AJP ie :
> >     <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
> >     -->
> >     <Engine name="Catalina" defaultHost="localhost">
> >
> >       <!--For clustering, please take a look at documentation at:
> >           /docs/cluster-howto.html  (simple how to)
> >           /docs/config/cluster.html (reference documentation) -->
> >       <!--
> >       <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
> >       -->
> >
> >       <!-- Use the LockOutRealm to prevent attempts to guess user
> > passwords
> >            via a brute-force attack -->
> >       <Realm className="org.apache.catalina.realm.LockOutRealm">
> >         <!-- This Realm uses the UserDatabase configured in the global
> > JNDI
> >              resources under the key "UserDatabase".  Any edits
> >              that are performed against this UserDatabase are
> > immediately
> >              available for use by the Realm.  -->
> >         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
> >                resourceName="UserDatabase"/>
> >       </Realm>
> >
> >       <Host name="localhost"  appBase="webapps"
> >             unpackWARs="true" autoDeploy="true">
> >
> >         <!-- SingleSignOn valve, share authentication between web
> > applications
> >              Documentation at: /docs/config/valve.html -->
> >         <!--
> >         <Valve
> > className="org.apache.catalina.authenticator.SingleSignOn" />
> >         -->
> >
> >         <!-- Access log processes all example.
> >              Documentation at: /docs/config/valve.html
> >              Note: The pattern used is equivalent to using
> > pattern="common"
> > -->
> >         <Valve className="org.apache.catalina.valves.AccessLogValve"
> > directory="logs"
> >                prefix="localhost_access_log." suffix=".txt"
> >                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
> >
> >       </Host>
> >
> >        <Host name="webapp1" appBase="/home/myhostid/tomcat/webapps">
> >           <Alias>www.webapp1.com</Alias>
> >           <Alias>myhostid.myserver.mywebhost.com</Alias>
> >           <Context path="/manager" debug="0" privileged="true"
> >               docBase="/home/myhostid/tomcat/webapps/manager">
> >           </Context>
> >        </Host>
> >       <Host name="webapp2.com"
> > appBase="/home/myhostid/hosts/webapp2/webapps" xmlValidation="false"
> > xmlNamespaceAware="false" unpackWARs="true" autoDeploy="true">
> >           <Alias>www.webapp2.com</Alias>
> >           <Valve className="org.apache.catalina.valves.AccessLogValve"
> > directory="logs"
> >                prefix="webapp2_access_log." suffix=".txt"
> >                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
> >        </Host>
> >     </Engine>
> >   </Service>
> > </Server>
> >
> Kiran -
> What no one has asked about yet is this:  What does your directory
> structure look like? Where are the catalina_home and catalina_base
> environment variables pointed?  Is it, I suspect, /home/myhostid/tomcat?
> If so, then deployment of the server using the above config will result in
> the following:
> For localhost and any request that comes in on the server's network
> interfaces that doesn't match your explicit host names or their alias,
> everything under the /home/myhostid/tomcat/webapps will be deployed once
> for the <Host> named "localhost". So, for example
> http://localhost/webapp2/webapps/ would result in reaching the webapp2
> pages (might need to add ROOT or webapp2 to the end, but you could reach
> it).
> For the <Host> named "webapp1", you will essentially re-deploy the
> application(s) that was deployed for localhost. We call that
> double-deployment, and it's something to avoid.
> For the <Host> named "webapp2.com", it will only deploy the application
> webapp2, but in so doing it will unpack the war into a directory named the
> same as the war file, which makes that application now available at the
> other hosts.
>
> What I'm saying is, don't nest your appBase directories.  Make sure they
> are unique.  It OK to create sub-directories under a main
> /home/myhostid/webapps directory, just make sure that no host uses a higher
> directory path as its appBase.
>
> As someone said, you could probably lose the localhost <Host> completely,
> and change the defaultHost setting to point to the webapp1 host. Or just
> add the aliases for webapp1 to the localhost <Host> config and delete the
> one for webapp1.  But by all means make sure that the appBases of all your
> hosts are NOT NESTED.
>
> Also, avoid giving multiple hosts the same <Alias>.  It looks like above
> you did this already, but it won't work.
>
> If you want the manager app for each host, you can add that with a
> manager.xml context file in each of the hosts' directories under
> {catalina_home}/conf/Catalina.
>
> Jeff
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to