Quantcast

Cloud foundry and resources plugin with js/css

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cloud foundry and resources plugin with js/css

antony
Hi,

I've recently upgraded my application to Grails 2.0. Previously I was
running it on 1.3.7 on cloud-foundry.

After a cf-update, I notice that I can't see any css or js resources
(images mostly work on some of the 3 nodes I've deployed on, which is,
unfortunately, normal behaviour)

JS and CSS are 404ing though, even after a re-deploy, a clean, and a
restart. Every single one - I literally have no JS or CSS

Any ideas on what could cause this? Everything works fine locally.

Cheers,
Antony

--
________________________________
ꜽ . antony jones . http://www.enzy.org

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

antony
Hi,

I've tried deleting and re-pushing+binding the application, to no
avail. The logs don't show anything, and there is nothing pertinent in
google.

Does anybody have any clue what might cause this? Apologies, but I
can't provide a URL for contractual reasons. I can say that on the
initial page load, this shows in the browser's console:

GET http://xxx.cloudfoundry.com/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js
404 (Not Found)
GET http://xxx.cloudfoundry.com/static/bundle-bundle_table-sorter_head.js
404 (Not Found)
GET http://xxx.cloudfoundry.com/static/bundle-bundle_table-sorter_head.css
404 (Not Found)
GET http://xxx.cloudfoundry.com/static/bundle-bundle_xxx_head.js 404 (Not Found)
GET http://xxx.cloudfoundry.com/static/bundle-bundle_xxx_head.css 404
(Not Found)

Images seem to work fine, and are loading from URLs like
http://xxx.cloudfoundry.com/static/images/assets/screenshot.png

Cheers,
Antony

On 29 December 2011 18:36, Antony Jones <[hidden email]> wrote:

> Hi,
>
> I've recently upgraded my application to Grails 2.0. Previously I was
> running it on 1.3.7 on cloud-foundry.
>
> After a cf-update, I notice that I can't see any css or js resources
> (images mostly work on some of the 3 nodes I've deployed on, which is,
> unfortunately, normal behaviour)
>
> JS and CSS are 404ing though, even after a re-deploy, a clean, and a
> restart. Every single one - I literally have no JS or CSS
>
> Any ideas on what could cause this? Everything works fine locally.
>
> Cheers,
> Antony
>
> --
> ________________________________
> ꜽ . antony jones . http://www.enzy.org



--
________________________________
ꜽ . antony jones . http://www.enzy.org

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

pledbrook
Have you tried with a single instance? Are you using cached-resources
or some other Resources derivative? What version of Resources are you
using? I would definitely up the logging for Resources and see what it
spits out.

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

antony
I'm using a single instance, and I've tried it with 3 instances.
Latest version of resources, and no add-ons to that, just plain
resources plugin.

I'll up the logging as you suggest and see if I can spot anything
unusual - cheers!

Antony

On 9 January 2012 18:31, Peter Ledbrook <[hidden email]> wrote:

> Have you tried with a single instance? Are you using cached-resources
> or some other Resources derivative? What version of Resources are you
> using? I would definitely up the logging for Resources and see what it
> spits out.
>
> Peter
>
> --
> Peter Ledbrook
> Grails Advocate
> SpringSource - A Division of VMware
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>



--
________________________________
ꜽ . antony jones . http://www.enzy.org

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

dMitin
Hi.
I have the same situation, grails 2.0 platform, published on clodfoundry (http://vetprivet.cloudfoundry.com/). All worked fine, before i installed resource plugins (i installed full bundle - resources, zipped, casched) all latest versions. After that, application can't find resources.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

pledbrook
> I have the same situation, grails 2.0 platform, published on clodfoundry
> (http://vetprivet.cloudfoundry.com/). All worked fine, before i installed
> resource plugins (i installed full bundle - resources, zipped, casched) all
> latest versions. After that, application can't find resources.

A version of the Grails website application is currently up on Cloud
Foundry without any Resources issues:

    http://grails-website.cloudfoundry.com/

It's using Resources 1.1.3, not the latest. Can you try that version
just to see whether it fixes the problem?

Thanks,

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

antony
Hi dMitin,

Yours appears to be working now - did 1.1.3 fix it? I'm going to try asap.

Cheers,
Antony

On 10 January 2012 10:27, Peter Ledbrook <[hidden email]> wrote:

>> I have the same situation, grails 2.0 platform, published on clodfoundry
>> (http://vetprivet.cloudfoundry.com/). All worked fine, before i installed
>> resource plugins (i installed full bundle - resources, zipped, casched) all
>> latest versions. After that, application can't find resources.
>
> A version of the Grails website application is currently up on Cloud
> Foundry without any Resources issues:
>
>    http://grails-website.cloudfoundry.com/
>
> It's using Resources 1.1.3, not the latest. Can you try that version
> just to see whether it fixes the problem?
>
> Thanks,
>
> Peter
>
> --
> Peter Ledbrook
> Grails Advocate
> SpringSource - A Division of VMware
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>



--
________________________________
ꜽ . antony jones . http://www.enzy.org

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

antony
Hi,

grails-website doesn't seem to be up. VCAP not found.
I've tried resources 1.1.3 in my application with no success. Still
getting 404s for all JS and CSS.
I'll turn debugging on and see if I can see what's happenning.

Cheers,
Antony

On 12 January 2012 11:40, Antony Jones <[hidden email]> wrote:

> Hi dMitin,
>
> Yours appears to be working now - did 1.1.3 fix it? I'm going to try asap.
>
> Cheers,
> Antony
>
> On 10 January 2012 10:27, Peter Ledbrook <[hidden email]> wrote:
>>> I have the same situation, grails 2.0 platform, published on clodfoundry
>>> (http://vetprivet.cloudfoundry.com/). All worked fine, before i installed
>>> resource plugins (i installed full bundle - resources, zipped, casched) all
>>> latest versions. After that, application can't find resources.
>>
>> A version of the Grails website application is currently up on Cloud
>> Foundry without any Resources issues:
>>
>>    http://grails-website.cloudfoundry.com/
>>
>> It's using Resources 1.1.3, not the latest. Can you try that version
>> just to see whether it fixes the problem?
>>
>> Thanks,
>>
>> Peter
>>
>> --
>> Peter Ledbrook
>> Grails Advocate
>> SpringSource - A Division of VMware
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> ________________________________
> ꜽ . antony jones . http://www.enzy.org



--
________________________________
ꜽ . antony jones . http://www.enzy.org

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

pledbrook
> grails-website doesn't seem to be up. VCAP not found.

It's back up.

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

antony
Hi Again,

After a bit of fiddling with the BuildConfig, this line 'fixed' the issue:

grails.resources.processing.enabled = false

But of course; that all but turns off the plugin. It seems like the
plugin can serve images from /static/, but it can't serve any
processed js or css.

I realise that cloudfoundry doesn't have a writeable filesystem which
I am aware that the resource processing needs - but I would assume
that there is a workaround built-in for that? Or I would expect to see
a warning of some sort...

Cheers,
Antony

On 12 January 2012 14:15, Peter Ledbrook <[hidden email]> wrote:

>> grails-website doesn't seem to be up. VCAP not found.
>
> It's back up.
>
> --
> Peter Ledbrook
> Grails Advocate
> SpringSource - A Division of VMware
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>



--
________________________________
ꜽ . antony jones . http://www.enzy.org

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

pledbrook
> I realise that cloudfoundry doesn't have a writeable filesystem which
> I am aware that the resource processing needs - but I would assume
> that there is a workaround built-in for that? Or I would expect to see
> a warning of some sort...

It does have a writable filesystem, it's just volatile (i.e. you can't
rely on stuff remaining there). As long as the application regenerates
the files it needs on startup, it's fine.

I really don't understand why you're still having problems when myself
and others aren't. Seems bizarre. I can't think of any ideas for
tracking down the issue right now, sorry.

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

antony
Just did another cf-update, with no code changes from last time, and
now the resources are broken again - this time even with no
processing.

Getting pretty painful now. I'll have to reserve some time to debug
this and see if I can figure out what's going on.

Cheers,
Antony

On 12 January 2012 18:19, Peter Ledbrook <[hidden email]> wrote:

>> I realise that cloudfoundry doesn't have a writeable filesystem which
>> I am aware that the resource processing needs - but I would assume
>> that there is a workaround built-in for that? Or I would expect to see
>> a warning of some sort...
>
> It does have a writable filesystem, it's just volatile (i.e. you can't
> rely on stuff remaining there). As long as the application regenerates
> the files it needs on startup, it's fine.
>
> I really don't understand why you're still having problems when myself
> and others aren't. Seems bizarre. I can't think of any ideas for
> tracking down the issue right now, sorry.
>
> Peter
>
> --
> Peter Ledbrook
> Grails Advocate
> SpringSource - A Division of VMware
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>



--
________________________________
ꜽ . antony jones . http://www.enzy.org

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

antony
Just another follow up, here's what I'm seeing in the logs:

2012-01-18 17:52:15,826 [http-62788-4] ERROR resource.ResourceMeta  -
Resource not found:
/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js
2012-01-18 17:52:15,826 [http-62788-3] ERROR resource.ResourceMeta  -
Resource not found:
/static/images/jquery.tablesorter/theme-xxx/style.css
2012-01-18 17:52:15,826 [http-62788-5] ERROR resource.ResourceMeta  -
Resource not found: /static/css/screen.css
2012-01-18 17:52:15,828 [http-62788-1] ERROR resource.ResourceMeta  -
Resource not found: /static/js/xxx.js

Doesn't really tell me much though, I added _debugResources=y on the
end of my query and I don't see anything extra?

Cheers,
Antony

On 16 January 2012 13:12, Antony Jones <[hidden email]> wrote:

> Just did another cf-update, with no code changes from last time, and
> now the resources are broken again - this time even with no
> processing.
>
> Getting pretty painful now. I'll have to reserve some time to debug
> this and see if I can figure out what's going on.
>
> Cheers,
> Antony
>
> On 12 January 2012 18:19, Peter Ledbrook <[hidden email]> wrote:
>>> I realise that cloudfoundry doesn't have a writeable filesystem which
>>> I am aware that the resource processing needs - but I would assume
>>> that there is a workaround built-in for that? Or I would expect to see
>>> a warning of some sort...
>>
>> It does have a writable filesystem, it's just volatile (i.e. you can't
>> rely on stuff remaining there). As long as the application regenerates
>> the files it needs on startup, it's fine.
>>
>> I really don't understand why you're still having problems when myself
>> and others aren't. Seems bizarre. I can't think of any ideas for
>> tracking down the issue right now, sorry.
>>
>> Peter
>>
>> --
>> Peter Ledbrook
>> Grails Advocate
>> SpringSource - A Division of VMware
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> ________________________________
> ꜽ . antony jones . http://www.enzy.org



--
________________________________
ꜽ . antony jones . http://www.enzy.org

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

vadims
I am experiencing exactly the same issue. The code used worked with Grails 1.3.7. After I migrated it to version 2.0 the static resources disappeared (404 error)

Here is my list of plug-ins related to the static resource management:

cache-headers       1.1.5            --  Caching Headers Plugin
cached-resources    1.0              --  Cached Resources
yui-minify-resources0.1.4            --  YUI Minify Resources
zipped-resources    1.0              --  Zipped Resources
resources           1.1.5            --  Resources

Please look into this

Vadim
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloud foundry and resources plugin with js/css

vadims
Solved it.

Make sure you have the following line in your Config.groovy

grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']

My config was missing it. I must have removed it accidently...
Loading...