Deploying a Grails war to Tomcat5

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Deploying a Grails war to Tomcat5

Kenneth Ayers
This is SO frustrating. The Grails website claims that deploying to Tomcat is "trivial" ... copy the war file to the webapps directory. Well, obviously, that hasn't worked for me, or I wouldn't be posting this.

First of all, I am an experienced client-side Java developer, but fairly new to Grails. I have a fair amount of experience as a Unix/Linux system administrator; but this has "got me down".

I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on a Fedora Core 10 Linux installation. This is on a Linux server, on my local area network (for now).

I've visited literally hundreds of websites, countless posts, and tried numerous tutorials (including Tomcat's configuration docs) to get this configured properly, but nothing seems to work. Depending on which configuration files I tweak, I get everything from "Too many redirects", to "Service Unavailable", to "resource not found" (no idea WHAT resource!).

Note, that I am (or was, at one time) able to run Tomcat's sample application. But my Grails application, which runs OK, locally, in development mode, just isn't happening on my server

Is there any ONE source for how to set this stuff up? I know people are doing it; it can't be "rocket science"!

Thanks in advance for any help.
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

bdrhoa
FWIW - deploying to Tomcat on my local XP machine does "just work".
I'll be moving it Linux soon, so hopefully I won't have problems.
Anyway, you might try deploying to a windows box to make sure your war
file is good. Then you'll at least know you're fight environment
issues.

On Tue, Aug 4, 2009 at 8:58 PM, Kenneth Ayers<[hidden email]> wrote:

>
> This is SO frustrating. The Grails website claims that deploying to Tomcat is
> "trivial" ... copy the war file to the webapps directory. Well, obviously,
> that hasn't worked for me, or I wouldn't be posting this.
>
> First of all, I am an experienced client-side Java developer, but fairly new
> to Grails. I have a fair amount of experience as a Unix/Linux system
> administrator; but this has "got me down".
>
> I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on a
> Fedora Core 10 Linux installation. This is on a Linux server, on my local
> area network (for now).
>
> I've visited literally hundreds of websites, countless posts, and tried
> numerous tutorials (including Tomcat's configuration docs) to get this
> configured properly, but nothing seems to work. Depending on which
> configuration files I tweak, I get everything from "Too many redirects", to
> "Service Unavailable", to "resource not found" (no idea WHAT resource!).
>
> Note, that I am (or was, at one time) able to run Tomcat's sample
> application. But my Grails application, which runs OK, locally, in
> development mode, just isn't happening on my server
>
> Is there any ONE source for how to set this stuff up? I know people are
> doing it; it can't be "rocket science"!
>
> Thanks in advance for any help.
> --
> View this message in context: http://www.nabble.com/Deploying-a-Grails-war-to-Tomcat5-tp24819980p24819980.html
> Sent from the grails - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
---------------------------
www.maf.org/rhoads
www.ontherhoads.org

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

oliverw
In reply to this post by Kenneth Ayers
Maybe a SELinux related problem?

Kenneth Ayers wrote
This is SO frustrating. The Grails website claims that deploying to Tomcat is "trivial" ... copy the war file to the webapps directory. Well, obviously, that hasn't worked for me, or I wouldn't be posting this.

First of all, I am an experienced client-side Java developer, but fairly new to Grails. I have a fair amount of experience as a Unix/Linux system administrator; but this has "got me down".

I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on a Fedora Core 10 Linux installation. This is on a Linux server, on my local area network (for now).

I've visited literally hundreds of websites, countless posts, and tried numerous tutorials (including Tomcat's configuration docs) to get this configured properly, but nothing seems to work. Depending on which configuration files I tweak, I get everything from "Too many redirects", to "Service Unavailable", to "resource not found" (no idea WHAT resource!).

Note, that I am (or was, at one time) able to run Tomcat's sample application. But my Grails application, which runs OK, locally, in development mode, just isn't happening on my server

Is there any ONE source for how to set this stuff up? I know people are doing it; it can't be "rocket science"!

Thanks in advance for any help.
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Graeme Rocher-3
In reply to this post by Kenneth Ayers
Have you checked the logs, you'll need to post more information than
just "its not happening"

Cheers

On Wed, Aug 5, 2009 at 4:58 AM, Kenneth Ayers<[hidden email]> wrote:

>
> This is SO frustrating. The Grails website claims that deploying to Tomcat is
> "trivial" ... copy the war file to the webapps directory. Well, obviously,
> that hasn't worked for me, or I wouldn't be posting this.
>
> First of all, I am an experienced client-side Java developer, but fairly new
> to Grails. I have a fair amount of experience as a Unix/Linux system
> administrator; but this has "got me down".
>
> I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on a
> Fedora Core 10 Linux installation. This is on a Linux server, on my local
> area network (for now).
>
> I've visited literally hundreds of websites, countless posts, and tried
> numerous tutorials (including Tomcat's configuration docs) to get this
> configured properly, but nothing seems to work. Depending on which
> configuration files I tweak, I get everything from "Too many redirects", to
> "Service Unavailable", to "resource not found" (no idea WHAT resource!).
>
> Note, that I am (or was, at one time) able to run Tomcat's sample
> application. But my Grails application, which runs OK, locally, in
> development mode, just isn't happening on my server
>
> Is there any ONE source for how to set this stuff up? I know people are
> doing it; it can't be "rocket science"!
>
> Thanks in advance for any help.
> --
> View this message in context: http://www.nabble.com/Deploying-a-Grails-war-to-Tomcat5-tp24819980p24819980.html
> Sent from the grails - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Graeme Rocher
Head of Grails Development
SpringSource - Weapons for the War on Java Complexity
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Antoine Roux
First you could try with an easier situation: just Tomcat with your database, no Apache as a proxy. If you can make it work this way, then you can begin handle the Apache + Tomcat case. The "Too many redirects" problem looks like an Apache-specific problem.

Then if you still have a problem with Tomcat alone, as Graeme said, post the exact error message with the logs and some more information about your configuration.


Antoine


Graeme Rocher a écrit :
Have you checked the logs, you'll need to post more information than
just "its not happening"

Cheers

On Wed, Aug 5, 2009 at 4:58 AM, Kenneth Ayers[hidden email] wrote:
  
This is SO frustrating. The Grails website claims that deploying to Tomcat is
"trivial" ... copy the war file to the webapps directory. Well, obviously,
that hasn't worked for me, or I wouldn't be posting this.

First of all, I am an experienced client-side Java developer, but fairly new
to Grails. I have a fair amount of experience as a Unix/Linux system
administrator; but this has "got me down".

I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on a
Fedora Core 10 Linux installation. This is on a Linux server, on my local
area network (for now).

I've visited literally hundreds of websites, countless posts, and tried
numerous tutorials (including Tomcat's configuration docs) to get this
configured properly, but nothing seems to work. Depending on which
configuration files I tweak, I get everything from "Too many redirects", to
"Service Unavailable", to "resource not found" (no idea WHAT resource!).

Note, that I am (or was, at one time) able to run Tomcat's sample
application. But my Grails application, which runs OK, locally, in
development mode, just isn't happening on my server

Is there any ONE source for how to set this stuff up? I know people are
doing it; it can't be "rocket science"!

Thanks in advance for any help.
--
View this message in context: http://www.nabble.com/Deploying-a-Grails-war-to-Tomcat5-tp24819980p24819980.html
Sent from the grails - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



    



  
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Fred Janon
In reply to this post by Kenneth Ayers
Hi Ken,

Sorry about all your troubles. I don't understand how you feel, I went through that last year trying to run my app on Ubuntu and Tomcat 5.5. It was less than trivial, mainly due to the fact that I had to install Tomcat manually, Ubuntu didn't at the time have an easy install for Tomcat (not sure about now). Then deploying the war didn't work as it used to do it by just dropping the war in the webapps folder on Windows. I had to deploy my app from the Tomcat web control panel, otherwise it would not deploy. I still don't know why, probably file permissions issues. To the Grails defense, I think the issues are probably more related to the Tomcat install on certain Linux distributions. Like it has been suggested, making sure Tomcat is installed properly and maybe deploy the Tomcat webapps or examples or even a simple Java war would probably help.

You might want to try Tomcat without Apache first. From reading the "Definitive Guide to Tomcat", I didn't find a compelling reason to use Apache on top of Tomcat. The Tomcat logs and the "stacktrace.log" file (a Grails file) in the Tomcat directory should help you. You can also increase the level of logging for Tomcat as well. When you know more about the issue, you can ask your questions on the Tomcat list, they are very responsive.

I just went through one frustrating week trying to deploy my app on a new server with Tomcat, to discover that the Tomcat native library (tc-native something in Windows) was messing up my HTTPS configuration, so I understand your pain. The deployment on Tomcat 5.5 and Windows has been trivial for me (dropping the war file in the webapps directory), except with the HTTPS issue. You might want to stop your Tomcat server, delete any folder with your app unzipped in the webapps and work directory under Tomcat, copy your new war in the webapps and restart Tomcat.

I hope you stick to Grails, it is a fabulous tool and allows to develop web apps in a record time. I have been working with Grails since version 0.3 for about 3 years and Grails improves all the time (sometimes too much or too fast! :) ).

Fred

On Wed, Aug 5, 2009 at 10:58, Kenneth Ayers <[hidden email]> wrote:

This is SO frustrating. The Grails website claims that deploying to Tomcat is
"trivial" ... copy the war file to the webapps directory. Well, obviously,
that hasn't worked for me, or I wouldn't be posting this.

First of all, I am an experienced client-side Java developer, but fairly new
to Grails. I have a fair amount of experience as a Unix/Linux system
administrator; but this has "got me down".

I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on a
Fedora Core 10 Linux installation. This is on a Linux server, on my local
area network (for now).

I've visited literally hundreds of websites, countless posts, and tried
numerous tutorials (including Tomcat's configuration docs) to get this
configured properly, but nothing seems to work. Depending on which
configuration files I tweak, I get everything from "Too many redirects", to
"Service Unavailable", to "resource not found" (no idea WHAT resource!).

Note, that I am (or was, at one time) able to run Tomcat's sample
application. But my Grails application, which runs OK, locally, in
development mode, just isn't happening on my server

Is there any ONE source for how to set this stuff up? I know people are
doing it; it can't be "rocket science"!

Thanks in advance for any help.
--
View this message in context: http://www.nabble.com/Deploying-a-Grails-war-to-Tomcat5-tp24819980p24819980.html
Sent from the grails - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Kenneth Ayers
In reply to this post by oliverw
Thanks, but I disabled SELinux early on. For a server on a LAN, behind a router firewall, it caused WAY more problems than I was willing to deal with.

oliverw wrote
Maybe a SELinux related problem?

Kenneth Ayers wrote
This is SO frustrating. The Grails website claims that deploying to Tomcat is "trivial" ... copy the war file to the webapps directory. Well, obviously, that hasn't worked for me, or I wouldn't be posting this.

First of all, I am an experienced client-side Java developer, but fairly new to Grails. I have a fair amount of experience as a Unix/Linux system administrator; but this has "got me down".

I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on a Fedora Core 10 Linux installation. This is on a Linux server, on my local area network (for now).

I've visited literally hundreds of websites, countless posts, and tried numerous tutorials (including Tomcat's configuration docs) to get this configured properly, but nothing seems to work. Depending on which configuration files I tweak, I get everything from "Too many redirects", to "Service Unavailable", to "resource not found" (no idea WHAT resource!).

Note, that I am (or was, at one time) able to run Tomcat's sample application. But my Grails application, which runs OK, locally, in development mode, just isn't happening on my server

Is there any ONE source for how to set this stuff up? I know people are doing it; it can't be "rocket science"!

Thanks in advance for any help.
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Kenneth Ayers
In reply to this post by Fred Janon
Fred,

Thanks for the reply and the suggestions. I had considered dropping the proxy from Apache, but I have some PHP apps on my server, that I hate to do without. Beside that, my initial target hosting environment is a shared host (I know, I know: Spring for at least virtual private hosting plan ... that's in my future!).  So, I have very little control over the configuration ... and I know my hosting service proxies Apache and Tomcat.

Fred Janon wrote
Hi Ken,

Sorry about all your troubles. I don't understand how you feel, I went
through that last year trying to run my app on Ubuntu and Tomcat 5.5. It was
less than trivial, mainly due to the fact that I had to install Tomcat
manually, Ubuntu didn't at the time have an easy install for Tomcat (not
sure about now). Then deploying the war didn't work as it used to do it by
just dropping the war in the webapps folder on Windows. I had to deploy my
app from the Tomcat web control panel, otherwise it would not deploy. I
still don't know why, probably file permissions issues. To the Grails
defense, I think the issues are probably more related to the Tomcat install
on certain Linux distributions. Like it has been suggested, making sure
Tomcat is installed properly and maybe deploy the Tomcat webapps or examples
or even a simple Java war would probably help.

You might want to try Tomcat without Apache first. From reading the
"Definitive Guide to Tomcat", I didn't find a compelling reason to use
Apache on top of Tomcat. The Tomcat logs and the "stacktrace.log" file (a
Grails file) in the Tomcat directory should help you. You can also increase
the level of logging for Tomcat as well. When you know more about the issue,
you can ask your questions on the Tomcat list, they are very responsive.

I just went through one frustrating week trying to deploy my app on a new
server with Tomcat, to discover that the Tomcat native library (tc-native
something in Windows) was messing up my HTTPS configuration, so I understand
your pain. The deployment on Tomcat 5.5 and Windows has been trivial for me
(dropping the war file in the webapps directory), except with the HTTPS
issue. You might want to stop your Tomcat server, delete any folder with
your app unzipped in the webapps and work directory under Tomcat, copy your
new war in the webapps and restart Tomcat.

I hope you stick to Grails, it is a fabulous tool and allows to develop web
apps in a record time. I have been working with Grails since version 0.3 for
about 3 years and Grails improves all the time (sometimes too much or too
fast! :) ).

Fred

On Wed, Aug 5, 2009 at 10:58, Kenneth Ayers <keayers@keayersdesigns.com>wrote:

>
> This is SO frustrating. The Grails website claims that deploying to Tomcat
> is
> "trivial" ... copy the war file to the webapps directory. Well, obviously,
> that hasn't worked for me, or I wouldn't be posting this.
>
> First of all, I am an experienced client-side Java developer, but fairly
> new
> to Grails. I have a fair amount of experience as a Unix/Linux system
> administrator; but this has "got me down".
>
> I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on
> a
> Fedora Core 10 Linux installation. This is on a Linux server, on my local
> area network (for now).
>
> I've visited literally hundreds of websites, countless posts, and tried
> numerous tutorials (including Tomcat's configuration docs) to get this
> configured properly, but nothing seems to work. Depending on which
> configuration files I tweak, I get everything from "Too many redirects", to
> "Service Unavailable", to "resource not found" (no idea WHAT resource!).
>
> Note, that I am (or was, at one time) able to run Tomcat's sample
> application. But my Grails application, which runs OK, locally, in
> development mode, just isn't happening on my server
>
> Is there any ONE source for how to set this stuff up? I know people are
> doing it; it can't be "rocket science"!
>
> Thanks in advance for any help.
> --
> View this message in context:
> http://www.nabble.com/Deploying-a-Grails-war-to-Tomcat5-tp24819980p24819980.html
> Sent from the grails - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Kenneth Ayers
In reply to this post by Graeme Rocher-3
Graeme,

Sorry. Among other things, I'm not an experienced "poster" ... I mostly search and read (many, many) forum posts, trying to glean answers to whatever problem I am currently having. Consequently, I don't have a good feel for how much is too much information to post.

But, yes, as I mentioned, I have a fair amount of sysadmin experience; so, I know that "log files are my friends". Seriously, I have looked at the Tomcat log files ... until my eyes glazed over! What I saw consistently, was a stack trace that relates to log4j not being able to create its "stacktrace.log" file (permission denied). I've seen this from day-one. However posts, on this and other forums, suggested that this was not the primary problem.

My next move, though, is to take the advice from some other responders: Get down to the basics and go with a Tomcat-only configuration.

Thanks to all for the suggestions. Incidentally, I really want to stick with Grails. I know how productive I can be with that technology behind me. However, the bottom line is that I have a client - who is also a friend, which can be a double-edged sword - depending on me to implement this application. If I can't deploy it, I'll be forced to consider "Plan B" (shudder). The real kicker is that I go looking for, and find, tons of great Grails-powered web applications "out there" ... it can't be rocket science!

Graeme Rocher-3 wrote
Have you checked the logs, you'll need to post more information than
just "its not happening"

Cheers

On Wed, Aug 5, 2009 at 4:58 AM, Kenneth Ayers<keayers@keayersdesigns.com> wrote:
>
> This is SO frustrating. The Grails website claims that deploying to Tomcat is
> "trivial" ... copy the war file to the webapps directory. Well, obviously,
> that hasn't worked for me, or I wouldn't be posting this.
>
> First of all, I am an experienced client-side Java developer, but fairly new
> to Grails. I have a fair amount of experience as a Unix/Linux system
> administrator; but this has "got me down".
>
> I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on a
> Fedora Core 10 Linux installation. This is on a Linux server, on my local
> area network (for now).
>
> I've visited literally hundreds of websites, countless posts, and tried
> numerous tutorials (including Tomcat's configuration docs) to get this
> configured properly, but nothing seems to work. Depending on which
> configuration files I tweak, I get everything from "Too many redirects", to
> "Service Unavailable", to "resource not found" (no idea WHAT resource!).
>
> Note, that I am (or was, at one time) able to run Tomcat's sample
> application. But my Grails application, which runs OK, locally, in
> development mode, just isn't happening on my server
>
> Is there any ONE source for how to set this stuff up? I know people are
> doing it; it can't be "rocket science"!
>
> Thanks in advance for any help.
> --
> View this message in context: http://www.nabble.com/Deploying-a-Grails-war-to-Tomcat5-tp24819980p24819980.html
> Sent from the grails - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Graeme Rocher
Head of Grails Development
SpringSource - Weapons for the War on Java Complexity
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Fred Janon
Ken,

The "stacktrace.log" is the Grails log file. That's the one that tells is something goes wrong with Grails, once it has started. I am not too sure a Grails application starts if Grails fails at creating that file. It might be why your app does not run. Like I said, the troubles I had in deploying Grails on Tomcat on Linux was mainly due to permissions. I think you need to solve this first.

Fred

On Thu, Aug 6, 2009 at 08:50, Kenneth Ayers <[hidden email]> wrote:

Graeme,

Sorry. Among other things, I'm not an experienced "poster" ... I mostly
search and read (many, many) forum posts, trying to glean answers to
whatever problem I am currently having. Consequently, I don't have a good
feel for how much is too much information to post.

But, yes, as I mentioned, I have a fair amount of sysadmin experience; so, I
know that "log files are my friends". Seriously, I have looked at the Tomcat
log files ... until my eyes glazed over! What I saw consistently, was a
stack trace that relates to log4j not being able to create its
"stacktrace.log" file (permission denied). I've seen this from day-one.
However posts, on this and other forums, suggested that this was not the
primary problem.

My next move, though, is to take the advice from some other responders: Get
down to the basics and go with a Tomcat-only configuration.

Thanks to all for the suggestions. Incidentally, I really want to stick with
Grails. I know how productive I can be with that technology behind me.
However, the bottom line is that I have a client - who is also a friend,
which can be a double-edged sword - depending on me to implement this
application. If I can't deploy it, I'll be forced to consider "Plan B"
(shudder). The real kicker is that I go looking for, and find, tons of great
Grails-powered web applications "out there" ... it can't be rocket science!


Graeme Rocher-3 wrote:
>
> Have you checked the logs, you'll need to post more information than
> just "its not happening"
>
> Cheers
>
> On Wed, Aug 5, 2009 at 4:58 AM, Kenneth Ayers<[hidden email]>
> wrote:
>>
>> This is SO frustrating. The Grails website claims that deploying to
>> Tomcat is
>> "trivial" ... copy the war file to the webapps directory. Well,
>> obviously,
>> that hasn't worked for me, or I wouldn't be posting this.
>>
>> First of all, I am an experienced client-side Java developer, but fairly
>> new
>> to Grails. I have a fair amount of experience as a Unix/Linux system
>> administrator; but this has "got me down".
>>
>> I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2,
>> on a
>> Fedora Core 10 Linux installation. This is on a Linux server, on my local
>> area network (for now).
>>
>> I've visited literally hundreds of websites, countless posts, and tried
>> numerous tutorials (including Tomcat's configuration docs) to get this
>> configured properly, but nothing seems to work. Depending on which
>> configuration files I tweak, I get everything from "Too many redirects",
>> to
>> "Service Unavailable", to "resource not found" (no idea WHAT resource!).
>>
>> Note, that I am (or was, at one time) able to run Tomcat's sample
>> application. But my Grails application, which runs OK, locally, in
>> development mode, just isn't happening on my server
>>
>> Is there any ONE source for how to set this stuff up? I know people are
>> doing it; it can't be "rocket science"!
>>
>> Thanks in advance for any help.
>> --
>> View this message in context:
>> http://www.nabble.com/Deploying-a-Grails-war-to-Tomcat5-tp24819980p24819980.html
>> Sent from the grails - user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
>
> --
> Graeme Rocher
> Head of Grails Development
> SpringSource - Weapons for the War on Java Complexity
> http://www.springsource.com
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
>

--
View this message in context: http://www.nabble.com/Deploying-a-Grails-war-to-Tomcat5-tp24819980p24838633.html
Sent from the grails - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Mauro
In reply to this post by Fred Janon
2009/8/5 Fred Janon <[hidden email]>:

> Hi Ken,
>
> Sorry about all your troubles. I don't understand how you feel, I went
> through that last year trying to run my app on Ubuntu and Tomcat 5.5. It was
> less than trivial, mainly due to the fact that I had to install Tomcat
> manually, Ubuntu didn't at the time have an easy install for Tomcat (not
> sure about now). Then deploying the war didn't work as it used to do it by
> just dropping the war in the webapps folder on Windows. I had to deploy my
> app from the Tomcat web control panel, otherwise it would not deploy. I
> still don't know why, probably file permissions issues. To the Grails
> defense, I think the issues are probably more related to the Tomcat install
> on certain Linux distributions.

I think so.
I've installed tomcat in my debian linux system using the deb package.
My grails applications don't work.
Then I've disinstalled tomcat and donwloaded the binary distribution
from apache site.
I've installed it manually and now magically my grails applications works fine.
So I think there are problems with tomcat install on certain
distributions, it is best to install manually downloading binary
distribution from apache site.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Lari Hotari -
In reply to this post by Kenneth Ayers
Kenneth Ayers wrote:
> I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on a
> Fedora Core 10 Linux installation. This is on a Linux server, on my local
> area network (for now).
>
>  
I've deployed in Tomcat 6.0.18 running with Java 1.6.0_14 without any
problems.
Make sure you are running a Sun JVM. Add proper JAVA_HOME to Tomcat's
catalina.sh .

Here's my apache config (Ubuntu / Debian instructions) example for a
production server config.
It adds Expires / Cache-Control maxage headers for js, css & image
resources loaded from grails app. There's also a cache config for the
reverse proxy.

# example of Apache config for Apache 2.2 (Ubuntu 9.04 / Apache 2.2.11)
# save this file in /etc/apache2/sites-available/grailsproxy
#
# activate required apache modules:
# sudo a2enmod expires proxy proxy_http proxy_ajp cache mem_cache headers
# activate this site:
# sudo a2ensite grailsproxy
# restart apache
# sudo /etc/init.d/apache2 restart
#
# modify config to meet your needs. This example uses VirtualHost config
to be able to
# have several websites running on one IP address.
#
<VirtualHost 192.168.1.1:80> # modify ip-address
        ServerName grailsproxy.domain
        ServerAlias grailsproxy

        DocumentRoot /data/www/grailsproxy
        <Directory /data/www/grailsproxy>
                Options FollowSymLinks
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

    RewriteEngine On

    RewriteCond %{HTTP_HOST} !^grailsproxy.domain$
    RewriteRule ^(.*)$    http://grailsproxy.domain$1    [L,R=301]

       <Proxy *>
                AddDefaultCharset off
                Order allow,deny
                Allow from all
        </Proxy>

    ProxyRequests       Off
    ProxyPreserveHost On
        ProxyPass /mygrailsapp ajp://localhost:8009/mygrailsapp
        ProxyPassReverse /mygrailsapp ajp://localhost:8009/mygrailsapp

        ErrorLog /var/log/apache2/grailsproxy-error.log

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

        CustomLog /var/log/apache2/grailsproxy-access.log combined

    # Performance optimizations from here on, you might want to remove these
    # if they cause problems.
   
    # Caching reverseproxy config
    CacheEnable mem /
    MCacheSize 8192
    MCacheMaxObjectCount 1000
    MCacheMinObjectSize 1
    MCacheMaxObjectSize 500000

     # Add expires headers for images, css & js files
     ExpiresActive On
     ExpiresByType image/gif A600
     ExpiresByType image/png A600
     ExpiresByType image/jpeg A600
     ExpiresByType text/css A600
     ExpiresByType text/javascript A600
     ExpiresByType application/x-javascript A600
     ExpiresByType image/x-icon A600

    # prevent max-age calculation from Last-Modified
    <LocationMatch "/mygrailsapp/.*\.(ico|jpg|jpeg|png|gif|js|css)$">
    Header unset Last-Modified
    </LocationMatch>
</VirtualHost>


Regards,

Lari


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Mauro
2009/8/6 Lari Hotari <[hidden email]>:

> Kenneth Ayers wrote:
>>
>> I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache 2.2, on
>> a
>> Fedora Core 10 Linux installation. This is on a Linux server, on my local
>> area network (for now).
>>
>>
>
> I've deployed in Tomcat 6.0.18 running with Java 1.6.0_14 without any
> problems.
> Make sure you are running a Sun JVM. Add proper JAVA_HOME to Tomcat's
> catalina.sh .

Don't work with openjdk?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Marcus Better
In reply to this post by Mauro
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mauro wrote:
> I've installed tomcat in my debian linux system using the deb package.
> My grails applications don't work.

Is it a wild guess that you didn't disable Tomcat's security manager, which
is on by default in Debian/Ubuntu?

Otherwise my Grails apps run nicely on Debian's tomcat6.

Cheers,

Marcus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkp6miMACgkQXjXn6TzcAQmpCQCggl0EmhBmITrJkY1Fntg7NA7C
MNgAnjKRDnBiEJQGGQDiFr6A9JEgaIWE
=gPo1
-----END PGP SIGNATURE-----



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Re: Deploying a Grails war to Tomcat5

Mauro
2009/8/6 Marcus Better <[hidden email]>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mauro wrote:
>> I've installed tomcat in my debian linux system using the deb package.
>> My grails applications don't work.
>
> Is it a wild guess that you didn't disable Tomcat's security manager, which
> is on by default in Debian/Ubuntu?
>
> Otherwise my Grails apps run nicely on Debian's tomcat6.

Where can I disable tomcat's security manager?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Re: Deploying a Grails war to Tomcat5

Mauro
2009/8/6 Mauro <[hidden email]>:

> 2009/8/6 Marcus Better <[hidden email]>:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Mauro wrote:
>>> I've installed tomcat in my debian linux system using the deb package.
>>> My grails applications don't work.
>>
>> Is it a wild guess that you didn't disable Tomcat's security manager, which
>> is on by default in Debian/Ubuntu?
>>
>> Otherwise my Grails apps run nicely on Debian's tomcat6.
>
> Where can I disable tomcat's security manager?

In /etc/default/tomcat6, ok, I've disabled it and now my grails app
works fine :)
Thank you.
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Re: Deploying a Grails war to Tomcat5

Otho
I had some problems deploying a trivail grails app to tomcat (which hosts exactly one other app + manager), too. But in my case it was the huge amount of PermGen space grails apps seem to need.

2009/8/6 Mauro <[hidden email]>
2009/8/6 Mauro <[hidden email]>:
> 2009/8/6 Marcus Better <[hidden email]>:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Mauro wrote:
>>> I've installed tomcat in my debian linux system using the deb package.
>>> My grails applications don't work.
>>
>> Is it a wild guess that you didn't disable Tomcat's security manager, which
>> is on by default in Debian/Ubuntu?
>>
>> Otherwise my Grails apps run nicely on Debian's tomcat6.
>
> Where can I disable tomcat's security manager?

In /etc/default/tomcat6, ok, I've disabled it and now my grails app
works fine :)
Thank you.
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Re: Deploying a Grails war to Tomcat5

Graeme Rocher-3
On Thu, Aug 6, 2009 at 11:36 AM, Otho<[hidden email]> wrote:
> I had some problems deploying a trivail grails app to tomcat (which hosts
> exactly one other app + manager), too. But in my case it was the huge amount
> of PermGen space grails apps seem to need.

This problem will be reduced in Grails 1.2 M2 where we precompile GSPs
hence reducing the need for permgen

Cheers

>
> 2009/8/6 Mauro <[hidden email]>
>>
>> 2009/8/6 Mauro <[hidden email]>:
>> > 2009/8/6 Marcus Better <[hidden email]>:
>> >> -----BEGIN PGP SIGNED MESSAGE-----
>> >> Hash: SHA1
>> >>
>> >> Mauro wrote:
>> >>> I've installed tomcat in my debian linux system using the deb package.
>> >>> My grails applications don't work.
>> >>
>> >> Is it a wild guess that you didn't disable Tomcat's security manager,
>> >> which
>> >> is on by default in Debian/Ubuntu?
>> >>
>> >> Otherwise my Grails apps run nicely on Debian's tomcat6.
>> >
>> > Where can I disable tomcat's security manager?
>>
>> In /etc/default/tomcat6, ok, I've disabled it and now my grails app
>> works fine :)
>> Thank you.
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>



--
Graeme Rocher
Head of Grails Development
SpringSource - Weapons for the War on Java Complexity
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Deploying a Grails war to Tomcat5

Frohnhofer, James
In reply to this post by Kenneth Ayers
My recommendation (for what its worth)
 - Bring down Tomcat.
 - Delete everything in $TOMCAT/logs.  Delete your .war and it's exploded directory in $TOMCAT/webapps if its there
 - Start Tomcat
 - http://yourhost:8080/manager/html and deploy your .war that way.  When you click 'deploy', and the page refreshes, it's going to tell you whether it deployed and whether it is running.
 - If it says runnning, click the link to your webapp on the http://yourhost:8080/manager/html page.  If you see it, then it means you have an Apache problem, and I don't envy you, but at leats you'll know that you're issue is Tomcat-Apache integration, and not Grails related.
 - If it isn't running, stop Tomcat, and then look at the logs.  
 - As has been said here, it's probably a permission problem.  Make sure that the id Tomcat is running under has necessary permissions in the file system (I can't really be more specific than that.)  
 - Also, check the security policy of Tomcat.  I know in corporate environments I've worked in, Tomcat ran under a locked down security policy, and the database server had to be whitelisted as a machine it was OK to open a socket on.


Good luck -- most of us have been there at one time or another.


-----Original Message-----
From: Kenneth Ayers [mailto:[hidden email]]
Sent: Wednesday, August 05, 2009 8:51 PM
To: [hidden email]
Subject: Re: [grails-user] Deploying a Grails war to Tomcat5


Graeme,

Sorry. Among other things, I'm not an experienced "poster" ... I mostly search and read (many, many) forum posts, trying to glean answers to whatever problem I am currently having. Consequently, I don't have a good feel for how much is too much information to post.

But, yes, as I mentioned, I have a fair amount of sysadmin experience; so, I know that "log files are my friends". Seriously, I have looked at the Tomcat log files ... until my eyes glazed over! What I saw consistently, was a stack trace that relates to log4j not being able to create its "stacktrace.log" file (permission denied). I've seen this from day-one.
However posts, on this and other forums, suggested that this was not the primary problem.

My next move, though, is to take the advice from some other responders: Get down to the basics and go with a Tomcat-only configuration.

Thanks to all for the suggestions. Incidentally, I really want to stick with Grails. I know how productive I can be with that technology behind me.
However, the bottom line is that I have a client - who is also a friend, which can be a double-edged sword - depending on me to implement this application. If I can't deploy it, I'll be forced to consider "Plan B"
(shudder). The real kicker is that I go looking for, and find, tons of great Grails-powered web applications "out there" ... it can't be rocket science!


Graeme Rocher-3 wrote:

>
> Have you checked the logs, you'll need to post more information than
> just "its not happening"
>
> Cheers
>
> On Wed, Aug 5, 2009 at 4:58 AM, Kenneth
> Ayers<[hidden email]>
> wrote:
>>
>> This is SO frustrating. The Grails website claims that deploying to
>> Tomcat is "trivial" ... copy the war file to the webapps directory.
>> Well, obviously, that hasn't worked for me, or I wouldn't be posting
>> this.
>>
>> First of all, I am an experienced client-side Java developer, but
>> fairly new to Grails. I have a fair amount of experience as a
>> Unix/Linux system administrator; but this has "got me down".
>>
>> I am trying to deploy this to Tomcat 5.5.27.0, proxied from Apache
>> 2.2, on a Fedora Core 10 Linux installation. This is on a Linux
>> server, on my local area network (for now).
>>
>> I've visited literally hundreds of websites, countless posts, and
>> tried numerous tutorials (including Tomcat's configuration docs) to
>> get this configured properly, but nothing seems to work. Depending on
>> which configuration files I tweak, I get everything from "Too many
>> redirects", to "Service Unavailable", to "resource not found" (no
>> idea WHAT resource!).
>>
>> Note, that I am (or was, at one time) able to run Tomcat's sample
>> application. But my Grails application, which runs OK, locally, in
>> development mode, just isn't happening on my server
>>
>> Is there any ONE source for how to set this stuff up? I know people
>> are doing it; it can't be "rocket science"!
>>
>> Thanks in advance for any help.
>> --
>> View this message in context:
>> http://www.nabble.com/Deploying-a-Grails-war-to-Tomcat5-tp24819980p24
>> 819980.html Sent from the grails - user mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
>
> --
> Graeme Rocher
> Head of Grails Development
> SpringSource - Weapons for the War on Java Complexity
> http://www.springsource.com
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
>

--
View this message in context: http://www.nabble.com/Deploying-a-Grails-war-to-Tomcat5-tp24819980p24838633.html
Sent from the grails - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




PLEASE READ: This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please delete it and all copies from your system, destroy any hard copies and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Nomura Holding America Inc., Nomura Securities International, Inc, and their respective subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state the views of such entity. Unless otherwise stated, any pricing information in this message is indicative only, is subject to change and does not constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as preliminary only and subject to our formal written confirmation.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Deploying a Grails war to Tomcat5

Marcus Better
In reply to this post by Mauro
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mauro wrote:
>> Make sure you are running a Sun JVM. Add proper JAVA_HOME to Tomcat's
>> catalina.sh .

> Don't work with openjdk?

Yes it does, and tomcat6 in Debian/Ubuntu will use that by default.

Cheers,

Marcus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkp78b0ACgkQXjXn6TzcAQl7mACgt4bEgvfeap0Kp0Qz1RH+S/EM
TI8An1jBQ4++7lzFHmjAY7uExlaBXeck
=fDrG
-----END PGP SIGNATURE-----



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email