PDA

View Full Version : Upload fails from Grails 1.2.1



sbglasius
Feb 22nd, 2010, 10:45 AM
Hi,

Just tried to upload my application via the grails plugin. This is the result:

Welcome to Grails 1.2.1 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: D:\Java\grails-1.2.1

Base Directory: D:\Projects\gr8conf_front
Resolving dependencies...
Dependencies resolved in 563ms.
Running script C:\Users\sbg\.grails\1.2.1\projects\gr8conf_front\ plugins\cloud-foundry-0.1\scripts\CloudFoundryUpload.groovy
Environment set to production

Uploading application gr8conf_front to Cloud Foundry..2s..4s..6s..8s..10s..12s..14s..16s..18s.. 20s..22s..24s..26s..Done.
Error uploading application to Cloud Foundry: Cannot get property 'id' on null object

Any ideas?

In my cloud-foundry "Deployments" tab I have a stall entry, a server that appears to be running, but is stopped long time ago. It also keeps alerting me of problems in this app - but that probably does not have anything to do with the problem above.

Best regards

Søren Berg Glasius
Founder of GR8 Conference

ceracm
Feb 22nd, 2010, 11:40 AM
Earlier this morning we fixed an issue with uploading - could you try again?

sbglasius
Feb 22nd, 2010, 02:45 PM
Sure, the result is almost the same:

Welcome to Grails 1.2.1 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: D:/java/grails-1.2.1

Base Directory: D:\Projects\gr8conf_front
Resolving dependencies...
Dependencies resolved in 860ms.
Running script C:\Users\sbg\.grails\1.2.1\projects\gr8conf_front\ plugins\cloud-foundry-0.1\scripts\CloudFoundryUpload.groovy
Environment set to production

Uploading application gr8conf_front to Cloud Foundry..2s..4s..6s..8s..10s..12s..14s..16s..18s.. 20s..22s..24s..26s..28s..Done.
Uploaded application gr8conf_front with id: -1

Now I get an id of -1, which is probably not right. And when I go to the "Applications" page, it does not show up.

Best regards,
Søren

ceracm
Feb 22nd, 2010, 03:42 PM
Søren,

We suspect that you are specifying an invalid value and that "validation" is failing.
What values are you specifying for the various aspects of your application?
See the upload application screen in the web ui for those values.

Chris

sbglasius
Feb 23rd, 2010, 06:36 AM
My CloudFoundry.groovy looks like this:

cloudFoundry.username="xxxxx@gr8conf.org"
cloudFoundry.password="xxxxxxx"
cloudFoundry.defaultRegion="EU_WEST_1"
cloudFoundry.db.schemaName="front"


I have also tried with defaultRegion set to: eu-west-1, US_EAST_1, us-east-1 with the same result.

I'm really happy that SpringSource and CloudFoundry will help sponsor the GR8 Conference website, but I'm getting a bit desperate here....

Best regards,
Søren

sbglasius
Feb 23rd, 2010, 06:40 AM
I just managed to upload the war via the web-interface.

kpshek
Mar 13th, 2010, 03:00 PM
Did anyone ever figure out what the problem was?

I ran into this same issue today. Here are my steps:

1. grails create-app ec2-playground

2. grails set-version 1.0-SNAPSHOT

3. grails install-plugin cloud-foundry

4. Modified /grails-app/conf/CloudFoundry.groovy as follows:
cloudFoundry.username="myemail@example.com"
cloudFoundry.password="mypassword"
cloudFoundry.defaultRegion="US_EAST_1"
cloudFoundry.db.schemaName="ec2-playground"

5. grails cloud-foundry-upload

At this point I got:

Getting uploaded applications from Cloud Foundry...

Uploading application ec2-playground to Cloud Foundry..2s..4s..6s..8s..10s..12s..14s..Done.
Uploaded application ec2-playground with id: -1

I then decided to try and upload my app via the website. While specifying the DB username and password, the website gave me a warning that my DB user/pass wasn't valid. I was using the default user/pass which is:

production {
dataSource {
dbCreate = "update"
username = "ec2-playground-user"
password = "ec2-playground-pass"
url = "jdbc:mysql://dbmaster/ec2-playground"
}
}

I noticed that if I used a user/pass without dashes, the website did not show the warning. At this point, I decided to change the default DB user/pass in DataSource.groovy to not include dashes. After doing so, the 'grails cloud-foundry-deploy' worked successfully.

It seems to me that the default DB username & password provided by the cloud-foundry plugin should be changed so that everything works out of the box.

I couldn't find an issue tracker for this plugin to log an issue. Where is that located?

dvolk
Mar 15th, 2010, 11:03 PM
It turns out that the problem is not with the dashes, they are legal characters, but with the length of the username and password. According to MySQL, username and password should be up to 16 chars long. Maximum length of the database name is 64 characters.

kpshek
Mar 15th, 2010, 11:51 PM
Hmm, well, that's good to know (regarding the length limit). However, its too bad we don't know the reason for the original poster's problem.

Is there a public bug tracker for the grails cloud-foundry plugin I can log to fix the plugin for this particular case? Someplace I can attach a patch for this?

dvolk
Mar 15th, 2010, 11:58 PM
Unfortunately, there is no public tracker for cloud-foundry plugin at the moment.

We will try to come up with a way to let the plugins know about validation errors in future releases.

kpshek
Mar 16th, 2010, 06:17 AM
Unfortunately, there is no public tracker for cloud-foundry plugin at the moment

What is the plan to get a public bug tracker? Is using JIRA like nearly every other grails plugin not an option?

Frankly, the absence of a public bug tracker where I could log this and provide a patch is a bit concerning for an open source project.