|
Hello all,
I am in the process of migrating the Nettflix's Asgard project to Grails 2.1 (https://github.com/Netflix/asgard/tree/grails-2.1). While I have the app working and the tests passing on my local machine, I've run into a few issues trying to get a Jenkins job running:
First, Grails 2.1 isn't showing up as an option with the 'Install from mirrors' for the Grails Jenkins plugin. This appears to be due to this bug https://issues.jenkins-ci.org/browse/JENKINS-14103.
Due to that issue, I asked our Jenkins admin install Grails 2.1 manually on our build machines. However, when running the build, the Grails command exits with status code '1' and no output.
I logged onto the machine to try running the Grails command directly. At first I received the message 'Caching deactivated: failed to create cache directory: /mnt/builds/.grails'. I then set the cache directory with the -Dgrails.work.dir= parameter, but it continued to fail with code '1' and no output.
Is there any command line flag I can set that could provide more visibility into why Grails is failing? I also tried changing the job to use the new Grails wrapper. Unfortunately, it looks like ~/.grails is hardcoded as the download directory (https://github.com/grails/grails-core/blob/master/grails-wrapper/src/main/java/org/grails/wrapper/GrailsWrapper.java#L120) which isn't writable for our Jenkins installation.
Has anyone else upgrading to Grails 2.1 with Jenkins run into similar issues and worked around them? Thanks, -Jason |
|
Rather than use the 'Install from mirrors' installer you can use the 'Extract *.zip/*tar.gz' installer and give it the url:
http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.1.0.zip Matt On Fri, Jul 13, 2012 at 2:33 PM, Jason Gritman <[hidden email]> wrote: Hello all, |
|
Thanks Matt! I was able to get the Grails installation installed using the method you described.
Unfortunately, I'm still seeing the exit code 1 with no output when running any Grails command even after this change. I suspect it's due to some permissions thing on our slave machine configuration, but I have no visibility into where it's failing.
-Jason
On Fri, Jul 13, 2012 at 2:57 PM, Matt Sheehan <[hidden email]> wrote: Rather than use the 'Install from mirrors' installer you can use the 'Extract *.zip/*tar.gz' installer and give it the url: |
|
Isn't the wrapper feature in 2.1 designed to make CI easier? I haven't done it with Jenkins but just floating it as a possible solution. On Jul 13, 2012 7:28 PM, "Jason Gritman" <[hidden email]> wrote:
Thanks Matt! I was able to get the Grails installation installed using the method you described. |
|
In reply to this post by Jason Gritman
On Fri, Jul 13, 2012 at 4:27 PM, Jason Gritman <[hidden email]> wrote:
Thanks Matt! I was able to get the Grails installation installed using the method you described. Have you used --verbose and --stacktrace (thee are two hyphens in front of each of those)? I don't really understand why, but it seems to be grails policy to provide basically no diagnostic information whatsoever for many error conditions unless you at least specify --verbose. As you've experienced, even catastrophic failures wind up exiting without even a single line of text describing the error. To my mind, it's a very odd policy. One which causes newbs and experienced grails devs alike to occasionally waste huge amounts of time when they don't realize they are experiencing an error.
|
|
In reply to this post by Jason Gritman
Jason Gritman wrote:
> > > I also tried changing the job to use the new Grails wrapper. > Unfortunately, it looks like ~/.grails is hardcoded as the download > directory > (https://github.com/grails/grails-core/blob/master/grails-wrapper/src/main/java/org/grails/wrapper/GrailsWrapper.java#L120) > which isn't writable for our Jenkins installation. > If you file a JIRA to make the download directory configurable via a system property, we can look at making that happen. Thanks for the feedback. jb -- Jeff Brown SpringSource http://www.springsource.com/ Autism Strikes 1 in 166 Find The Cause ~ Find The Cure http://www.autismspeaks.org/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
In reply to this post by ideasculptor
Apologies for veering off-topic, but:
On Sat, Jul 14, 2012 at 6:35 AM, Samuel Gendler <[hidden email]> wrote: > Have you used --verbose and --stacktrace (thee are two hyphens in front of > each of those)? I don't really understand why, but it seems to be grails > policy to provide basically no diagnostic information whatsoever for many > error conditions unless you at least specify --verbose. As you've > experienced, even catastrophic failures wind up exiting without even a > single line of text describing the error. To my mind, it's a very odd > policy. One which causes newbs and experienced grails devs alike to > occasionally waste huge amounts of time when they don't realize they are > experiencing an error. This! I've had similar frustrations with the database error logging code, especially when using H2 in development-mode. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
In reply to this post by Jeff Brown-3
Thanks Jeff, I've written up http://jira.grails.org/browse/GRAILS-9271. If I get time later in the week, I'll see if I can fix it myself and send a pull request.
-Jason
On Sun, Jul 15, 2012 at 6:50 PM, Jeff Brown <[hidden email]> wrote:
|
|
Jason Gritman wrote:
> Thanks Jeff, I've written up http://jira.grails.org/browse/GRAILS-9271. > If I get time later in the week, I'll see if I can fix it myself and > send a pull request. > > -Jason > > Outstanding! Thank you for offering to help. jb -- Jeff Brown SpringSource http://www.springsource.com/ Autism Strikes 1 in 166 Find The Cause ~ Find The Cure http://www.autismspeaks.org/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
In reply to this post by ideasculptor
Good suggestion Samuel. but unfortunately I'm still not seeing any output. Here's the results of issuing commands with various args:
[asgard-public-grails-2.1]$ $GRAILS_HOME/bin/grails
Caching deactivated: failed to create cache directory: /mnt/builds/.grails [asgard-public-grails-2.1]$ $GRAILS_HOME/bin/grails test-app -Dgrails.work.dir=./.grails --verbose --stacktrace --non-interactive
[asgard-public-grails-2.1]$ $GRAILS_HOME/bin/grails test-app [asgard-public-grails-2.1]$ $GRAILS_HOME/bin/grails --nonsense [asgard-public-grails-2.1]$ echo $? 1 [asgard-public-grails-2.1]$
The only difference is that it warns about 'Caching deactivated' if I run the grails command without arguments. When specifying any arguments, even invalid ones, it suppresses that message and I have no output at all.
On Sat, Jul 14, 2012 at 3:35 AM, Samuel Gendler <[hidden email]> wrote:
|
|
Did you have any luck finding the cause (and/or solution) to this problem? I'm having the same problem running grails 2.1.0 on our Jenkins CI server. It looks like it's probably a permission-related issue with the tomcat user, but there's no output to support this hypothesis, only the exit code 1.
Our setup is: * Amazon Linux AMI release 2012.03 (3.2.22-35.60.amzn1.x86_64) * Java(TM) SE Runtime Environment (build 1.6.0_32-b05) * Tomcat 6.0.35 * Jenkins ver. 1.475 The grails 2.0.3 and 2.0.4 installations are working fine for the tomcat user. |
|
Oops, sorry Jason, I didn't see your post in the other thread.
http://jira.grails.org/browse/GRAILS-9279 Looks like I have to make the tomcat directory writeable by "tomcat". Not ideal, but works. |
|
I have recently installed latest jenkins and grails 2.1.0 (manually) and don't have any issues, though I have just a few demo plugins and apps, so may be different case. + I believe tomcat runs as root user, so that's why I don't have issues.
On Mon, Jul 23, 2012 at 8:15 AM, tcrossland <[hidden email]> wrote: Oops, sorry Jason, I didn't see your post in the other thread. |
| Powered by Nabble | Edit this page |
