crowell / modpagespeed_tmp

Automatically exported from code.google.com/p/modpagespeed
Apache License 2.0
0 stars 0 forks source link

Fetches for same-domain resources failing with reference to 224.0.0.0 or 127.0.0.1 #213

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Installed as directed here: 
http://wiki.mediatemple.net/w/(dv):Install_mod_pagespeed
2.Only modification made to pagespeed.conf is ModPagespeedRewriteLevel 
CoreFilters
3.Restart Apache

What is the expected output? What do you see instead?
I have a dedicated virtual vps host, it is configured with just one domain, and 
several subdomains.  I see that all of the sites are displaying the 
"X-Mod-Pagespeed: 0.9.15.3-404" header, however when I view the source of the 
main website no css/js/image rewriting is being done.  When I view the 
subdomains all the rewriting is working as expected.  I have tried placing the 
main domain using "ModPagespeedDomain", I've even tried putting an "*" in there 
and it still doesn't affect the primary domain, only the subdomains - any idea 
how to correct this?

What version of the product are you using (please check X-Mod-Pagespeed
header)? ModPagespeedDomain

On what operating system? CentOS

Which version of Apache? Apache/2.2.3

Which MPM? Not sure what this is.

Please provide any additional information below, especially a URL or an
HTML file that exhibits the problem.

Primary domain: pimasheriff.org
Sub domain: dev.pimasheriff.org

Original issue reported on code.google.com by hursey...@gmail.com on 14 Feb 2011 at 9:15

GoogleCodeExporter commented 9 years ago
Sorry pasted the wrong thing is the x-mod-pagespeed version area.  Should be, 
0.9.15.3-404

Original comment by hursey...@gmail.com on 14 Feb 2011 at 9:28

GoogleCodeExporter commented 9 years ago
Also, just to clarify, the main thing that I dont see working on the primary 
domain that is working on the subdomains is the combining of resources such as 
css and js in the source.  In teh subdomains I get something like 

<link rel="stylesheet" type="text/css" 
href="http://dev.pimasheriff.org/themes,_pimasheriff,_main.css+themes,_pimasheri
ff,_typography.css+blocks,_flash_video,_templates,_popup,_css,_prettyPhoto.css+c
oncrete,_css,_ccm.base.css,qv==98bf12d8967d0a6de7a942404f67deb9.pagespeed.cc.eys
E8jlNGb.css"/> 

On the primary, everythings still seperate.

Original comment by hursey...@gmail.com on 14 Feb 2011 at 10:25

GoogleCodeExporter commented 9 years ago
FYI mod_pagespeed does not yet implement js combining.  It's on the queue but 
not yet imminent. 

CSS combining is implemented, as you've observed.  Can at a minimum there 
should be a lot of cache extension going on in your site.

 Can you check your server logs?  My first guess is that there is some problem fetching the js/css/images in the primary domain.

Original comment by jmara...@google.com on 14 Feb 2011 at 10:42

GoogleCodeExporter commented 9 years ago
I am seeing a lot of "File does not exist" errors:

[Tue Feb 15 09:54:58 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/concrete

Everything is still being displayed correctly on the site, but I'm guessing the 
errors are mod_pagespeed not finding the files?  Any idea what could be causing 
this, and why it wouldn't occur on the subdomains?

Original comment by hursey...@gmail.com on 15 Feb 2011 at 4:57

GoogleCodeExporter commented 9 years ago
That error is not from mod_pagespeed.  That error is, I think, from the core of 
Apache.  All mod_pagespeed log messages have the string "mod_pagespeed 
0.9.15.3" in them.

Original comment by jmara...@google.com on 16 Feb 2011 at 1:29

GoogleCodeExporter commented 9 years ago
Do you have any mod_pagespeed errors in your log?

Original comment by sligocki@google.com on 23 Feb 2011 at 10:43

GoogleCodeExporter commented 9 years ago
I did not see any mod_pagespeed errors in the log, but I do notice that once I 
disable/uninstall the .conf file all the "File does not exist" errors stop 
occurring in my logs.  I know the errors aren't specific to mod_pagespeed but 
they are definitely connected in some way - any ideas of what could be 
happening would be greatly appreciated!

Original comment by hursey...@gmail.com on 24 Feb 2011 at 1:04

GoogleCodeExporter commented 9 years ago
Do you have lines in your access.log from 127.0.0.1 (localhost) for these 
files? Can you correlate a visit to the site with specific "File does not 
exist" errors? Could you post longer specific examples? Thanks.

Original comment by sligocki@google.com on 24 Feb 2011 at 4:19

GoogleCodeExporter commented 9 years ago
I think I know my actual problem and this could very well fall outside the 
scope of help you are offering.  Basically I'm running on CentOS and I'm using 
a custom vhost.conf for each individual domain.  My vhost.conf for each 
domain/subdomain look like this:

<Directory /var/www/vhosts/mydomain.org/httpdocs>
  <IfModule sapi_apache2.c>
    php_admin_flag engine on 
    php_admin_flag safe_mode off 
    php_admin_value open_basedir "/var/www/concrete:/var/www/vhosts/mydomain.org/httpdocs:/tmp"
  </IfModule>
  <IfModule mod_php5.c>
    php_admin_flag engine on 
    php_admin_flag safe_mode off 
    php_admin_value open_basedir "/var/www/concrete:/var/www/vhosts/mydomain.org/httpdocs:/tmp"
  </IfModule>
</Directory>
Alias /concrete/ /var/www/concrete/

There is some aliasing going on which I'm sure is causing the issues with the 
files not being found.  Here's is a sample from my error_log:

[Wed Mar 02 15:42:48 2011] [error] [client 127.0.0.1] script 
'/var/www/html/index.php' not found or unable to stat
[Wed Mar 02 15:42:57 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/packages
[Wed Mar 02 15:42:57 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/blocks
[Wed Mar 02 15:42:57 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/blocks
[Wed Mar 02 15:42:57 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Wed Mar 02 15:42:57 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Wed Mar 02 15:43:00 2011] [error] [client 127.0.0.1] script 
'/var/www/html/index.php' not found or unable to stat
[Wed Mar 02 15:43:20 2011] [error] [client 127.0.0.1] script 
'/var/www/html/index.php' not found or unable to stat
[Wed Mar 02 15:43:58 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Wed Mar 02 15:43:58 2011] [error] [client 127.0.0.1] script 
'/var/www/html/index.php' not found or unable to stat
[Wed Mar 02 15:43:59 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Wed Mar 02 15:43:59 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Wed Mar 02 15:44:05 2011] [error] [client 127.0.0.1] script 
'/var/www/html/index.php' not found or unable to stat
[Wed Mar 02 15:44:16 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Wed Mar 02 15:44:22 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/packages
[Wed Mar 02 15:44:22 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/packages
[Wed Mar 02 15:44:22 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/packages
[Wed Mar 02 15:44:22 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/js
[Wed Mar 02 15:44:22 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/packages
[Wed Mar 02 15:44:22 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Wed Mar 02 15:44:22 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files

These errors only occur when I turn ModPagespeed "on" in the pagespeed.conf 
file - and it occurs without making any changes to the default pagespeed.conf 
file.  Other than the errors, somethings appear to be working, files are being 
written to the /cache/ folder, the pages have the appropriate X-MOD-PAGESPEED 
header, etc.

Any idea of how I can get this all configured correctly using my individual 
vhost.conf's would be greatly appreciated.

Original comment by hursey...@gmail.com on 2 Mar 2011 at 10:50

GoogleCodeExporter commented 9 years ago
Is it possible to test with out the Alias commands? We may not be interacting 
correctly with them.

Original comment by sligocki@google.com on 2 Mar 2011 at 10:55

GoogleCodeExporter commented 9 years ago
I will test it out and let you know the results, thanks for your help.

Original comment by hursey...@gmail.com on 3 Mar 2011 at 5:03

GoogleCodeExporter commented 9 years ago
I turned all the aliasing off, I actually reconfigured things so that I don't 
use an individual vhost.conf file for each domain and I'm still getting the 
errors:

[Thu Mar 03 11:07:35 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/blocks
[Thu Mar 03 11:07:35 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/packages
[Thu Mar 03 11:07:35 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:07:35 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/packages
[Thu Mar 03 11:07:35 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:07:35 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:07:38 2011] [error] [client 127.0.0.1] script 
'/var/www/html/index.php' not found or unable to stat
[Thu Mar 03 11:07:42 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:07:57 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:07:57 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:08:38 2011] [error] [client 127.0.0.1] script 
'/var/www/html/index.php' not found or unable to stat
[Thu Mar 03 11:08:43 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:08:43 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:08:55 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:08:57 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:09:01 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:09:01 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:09:01 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:09:01 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:09:01 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:09:01 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/files
[Thu Mar 03 11:09:55 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/themes
[Thu Mar 03 11:09:55 2011] [error] [client 127.0.0.1] File does not exist: 
/var/www/html/themes

The thing is the path that is saying it can't find /var/www/html/something does 
not even exist.  I don't have an "html" directory and the path to the file 
would be something like /var/www/vhosts/mydomain.com/something.  

Original comment by hursey...@gmail.com on 3 Mar 2011 at 6:14

GoogleCodeExporter commented 9 years ago
Also got this in the log:

[Thu Mar 03 11:25:43 2011] [error] [mod_pagespeed 0.9.15.3-404] 
/var/mod_pagespeed/cache/!clean!time!:0: open input file (code=2 No such file 
or directory)

Original comment by hursey...@gmail.com on 3 Mar 2011 at 6:26

GoogleCodeExporter commented 9 years ago
Not sure if its related to this?

http://code.google.com/p/modpagespeed/issues/detail?id=194

Original comment by hursey...@gmail.com on 3 Mar 2011 at 6:29

GoogleCodeExporter commented 9 years ago
Don't worry about the !clean!time messages, unless there are so many such log 
messages that they are filling your disk.  They are not necessarily symptomatic 
of something broken.

This could be related in some way to Issue 194, which is compatibility with 
mod_speling.  I have a fix for that issue coming now and perhaps it will also 
fix this issue.  I'll update this bug when I mark that one fixed.

Original comment by jmara...@google.com on 7 Mar 2011 at 4:07

GoogleCodeExporter commented 9 years ago
Upgraded to the latest version (0.9.16.9-576), still having the same issue.

Original comment by hursey...@gmail.com on 11 Apr 2011 at 3:45

GoogleCodeExporter commented 9 years ago
Please update to latest 0.10.21.2 and let us know if the problem persists.
Be sure to save the current mod_pagespeed.so file in case you need to revert.

Original comment by matterb...@google.com on 9 Feb 2012 at 7:01

GoogleCodeExporter commented 9 years ago
Insufficient data and no response to clarification request.

Original comment by matterb...@google.com on 20 Aug 2012 at 5:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm having this same problem in my server (CentOS 5.8 and Apache 2.2.22) I 
installed the "stable" rpm. Everything seems fine, all virtual hosts are 
online, but no css/js/image rewriting is being done. 

Pagespeed is added to HTTP headers: 

curl -I http://www.ideasagiles.com
HTTP/1.1 200 OK
Date: Tue, 09 Oct 2012 01:31:56 GMT
Server: Apache/2.2.22 (CentOS)
Accept-Ranges: bytes
X-Mod-Pagespeed: 1.0.22.7-2005
Cache-Control: max-age=0, no-cache
Vary: Accept-Encoding,User-Agent
Content-Length: 11144
Content-Type: text/html; charset=UTF-8

Also, on error_log there are lots of logs like this: 

[Mon Oct 08 21:33:40 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/images
[Mon Oct 08 21:34:19 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/cursos
[Mon Oct 08 21:34:19 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/cursos
[Mon Oct 08 21:34:19 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/cursos
[Mon Oct 08 21:34:19 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/cursos
[Mon Oct 08 21:34:19 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/cursos
[Mon Oct 08 21:34:19 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/cursos
[Mon Oct 08 21:34:19 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/cursos
[Mon Oct 08 21:34:19 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/cursos
[Mon Oct 08 21:34:19 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/cursos
[Mon Oct 08 21:34:21 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/images
[Mon Oct 08 21:34:21 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/images
[Mon Oct 08 21:34:21 2012] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/images

Any ideas?

Original comment by ldes...@gmail.com on 9 Oct 2012 at 1:39

GoogleCodeExporter commented 9 years ago
You don't have mod_pagespeed enabled on that site so we cannot debug it from 
here.
Enabling it should be harmless even if it doesn't rewrite.

But, I copied your /index.html and started up a local Apache and it rewrote it 
just fine, with default settings.
Could you please post your pagespeed.conf settings.

Original comment by matterb...@google.com on 9 Oct 2012 at 1:21

GoogleCodeExporter commented 9 years ago
I've attached pagespeed.conf (I'm using the default file, as installed by the 
RPM package). 

Also, I've enabled mod_pagespeed in the site (www.ideasagiles.com). Let me know 
if there is anything I can do to help you. 

Original comment by ldes...@gmail.com on 10 Oct 2012 at 7:08

Attachments:

GoogleCodeExporter commented 9 years ago
Your conf file & site look very optimizable.  Turning on collapse_whitespace, 
that definitely works:

http://www.ideasagiles.com/?ModPagespeed=on&ModPagespeedFilters=collapse_whitesp
ace

then look at view->page source compared to the default.

However your resources look optimizable but are not optimized.  My guess is 
that something is going wrong when trying to fetch them via HTTP from the 
apache module.  Can you check the Apache error log for messages about (say) 
http://www.ideasagiles.com/js/date.js ?

You might need to configure how mod_pagespeed fetches that from origin,  via 
ModPagespeedMapOriginDomain or ModPagespeedLoadFromFile.  See 
https://developers.google.com/speed/docs/mod_pagespeed/domains

Original comment by jmara...@google.com on 10 Oct 2012 at 7:20

GoogleCodeExporter commented 9 years ago
There are no errors at Apache error_log file (besides the ones I reported 
before). 

I've tried ModPagespeedMapOriginDomain with no luck.

I've enabled ModPagespeedLoadFromFile and now something different is going on: 
most js and css are optimized, but there is still no css and js combining. 
Also, three js files are now inline, insted of being linked as external 
resources ("js/google-docs-simple-parser.js", "js/ideasagiles/agenda.js", 
"js-view/index.js").

Any ideas?

Original comment by ldes...@gmail.com on 10 Oct 2012 at 11:39

GoogleCodeExporter commented 9 years ago
I've got the exact same issue with floods of Apache errors whenever I turn on 
mod_pagespeed, otherwise no errors at all.

Is there any update on what's behind this issue? I'm having to disable 
mod_pagespeed in the meantime as I don't feel comfortable having several errors 
per second being logged.

Original comment by msan...@gmail.com on 11 Mar 2013 at 10:33

GoogleCodeExporter commented 9 years ago
msanger: can you paste the errors you've seen?  What makes you think it's the 
exact same issue as this bug (which already seems to be the aggregation of a 
number of different issues..)

Original comment by jmara...@google.com on 11 Mar 2013 at 10:43

GoogleCodeExporter commented 9 years ago
I'm getting continuous floods of these types of errors in Apache, only when I 
enable mod_pagespeed:

[Tue Mar 12 10:32:01 2013] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/forum
[Tue Mar 12 10:32:01 2013] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/forum
[Tue Mar 12 10:32:01 2013] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/forum
[Tue Mar 12 10:32:01 2013] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/forum

I'm on CentOS 5.9 + Webmin/Virtualmin. I currently have it enabled at 
www.murraysworld.com

Original comment by msan...@gmail.com on 12 Mar 2013 at 10:42

GoogleCodeExporter commented 9 years ago
You can bypass CloudFlare by using the 'direct' subdomain.

Original comment by msan...@gmail.com on 12 Mar 2013 at 10:44

GoogleCodeExporter commented 9 years ago
To those still seeing this problem, please try using
   ModPagespeedDomain YOUR_DOMAIN
The recent (Sept 2012 and later) occurrences of this symptom are likely related 
to a security-related change that went into the product at version 0.10.22.6: 
https://developers.google.com/speed/docs/mod_pagespeed/announce-0.10.22.6

Please let us know if this helps.

Another workaround is to use ModPagespeedLoadFromFile to bypass loopback HTTP 
fetches and read resources directly from the file system.  There are 
performance benefits to that approach as well, so it's worth considering.

https://developers.google.com/speed/docs/mod_pagespeed/domains#ModPagespeedLoadF
romFile

Original comment by jmara...@google.com on 12 Mar 2013 at 12:20

GoogleCodeExporter commented 9 years ago
I went ahead and did this:

ModPagespeedLoadFromFile "http://www.murraysworld.com/" 
"/home/murraysworld/public_html/"

That got rid of the flood of errors. But a new type of error occurs several 
times a minute. For example, the error below seems to suggest that it looked in 
/public_html/themes/ instead of /public_html/forum/themes/
Errors:

[Tue Mar 12 16:11:13 2013] [error] [mod_pagespeed 1.1.23.2-2258 @27313] 
/home/murraysworld/public_html/Themes/safblue/images/donor.png:0: opening input 
file: No such file or directory

Original comment by msan...@gmail.com on 12 Mar 2013 at 4:17

GoogleCodeExporter commented 9 years ago
I spoke to soon, although it occurs much less, those File Does Not Exist errors 
are still there:

[Tue Mar 12 16:18:32 2013] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/noscript.css
[Tue Mar 12 16:18:32 2013] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/mw.js
[Tue Mar 12 16:18:32 2013] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/img
[Tue Mar 12 16:18:32 2013] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/img
[Tue Mar 12 16:18:32 2013] [error] [client 224.0.0.0] File does not exist: 
/var/www/html/mw.css

Original comment by msan...@gmail.com on 12 Mar 2013 at 4:19

GoogleCodeExporter commented 9 years ago
Summary was: Primary domain not working with mod_pagespeed

We've prepared a FAQ entry describing remedies.

https://developers.google.com/speed/docs/mod_pagespeed/faq#loopback_fetches

Also, our next beta release should resolve these issues altogether.

Also, RE comment #30 (lost subdirectory), I believe this is 
https://code.google.com/p/modpagespeed/issues/detail?id=648 which was fixed in 
mod_pagespeed 1.3.25.4.

Original comment by jmara...@google.com on 26 Mar 2013 at 12:28

GoogleCodeExporter commented 9 years ago
Issue 596 has been merged into this issue.

Original comment by jmara...@google.com on 26 Mar 2013 at 12:29

GoogleCodeExporter commented 9 years ago
Issue 486 has been merged into this issue.

Original comment by jmara...@google.com on 26 Mar 2013 at 12:30

GoogleCodeExporter commented 9 years ago
As this is about allowed sources for assets... is it possible being behind 
CloudFlare could cause some of these issues?

Original comment by msan...@gmail.com on 27 Mar 2013 at 7:42

GoogleCodeExporter commented 9 years ago
It could be related.  If your HTML is served through a domain CNAMEd to 
Cloudflare, it would be preferable to force same-domain resources to be 
accessed from the local host via ModPagespeedMapOriginDomain, rather than going 
out to the internet to Cloudflare & back.

But I actually don't see a technical problem with looping around through 
Cloudflare; just wasted bandwidth.

Original comment by jmara...@google.com on 27 Mar 2013 at 7:49

GoogleCodeExporter commented 9 years ago

Original comment by jkar...@google.com on 2 Apr 2013 at 3:44