Forum: NGINX previous questoin... maybe I'm grabbing at straws...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
27d07ab5a9b0923e138819caa42e09c1?d=identicon&s=25 Ilan Berkner (Guest)
on 2009-01-15 21:15
(Received via mailing list)
I previously posted a question about getting more information about an
error
that we're getting in our Nginx log files.  The error is as follows:

2009/01/15 11:47:57 [error] 15704#0: *689561 open()
"/home/spellcit/public_html/letters/.mp3" failed (2: No such file or
directory), client: 204.38.160.220, server: www.spellingcity.com,
request:
"GET /letters/.mp3 HTTP/1.1", host: "www.spellingcity.com"
What I'm trying to figure out is which php or swf script (or maybe its
not a
php or swf script) is actually making the call to request this
non-existent
file.

Out of 25,385 errors in our log, 16,952 are caused by this issue.

One of the suggestions I got was to turn on the access logs, which I
did.
In looking at this IP address at the access logs, this is what I get,
which
unfortunately is not much.

204.38.160.220 - - [15/Jan/2009:12:31:26 -0600] 404 "GET /letters/.mp3
HTTP/1.1" 169 "-" "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.2)
Gecko/20030208 Netscape/7.02" "-"

I was thinking about creating a dummy ".mp3" file (or rewrite rule) to
capture traffic and get try to get some more info out of the header...
just
a thought.

Any suggestions / thoughts would be very much appreciated.

Ilan
A50d1b69d837f1cabc58e46cbc866c94?d=identicon&s=25 Juan Fco. Giordana (Guest)
on 2009-01-15 21:47
(Received via mailing list)
You could inspect the headers with firebug or similar tool or add the
$http_referer variable to the log format to see what is causing that or
even a rewrite rule to catch the request in a php script and logs its
output in another file or in a DB.
27d07ab5a9b0923e138819caa42e09c1?d=identicon&s=25 Ilan Berkner (Guest)
on 2009-01-15 21:55
(Received via mailing list)
Thank you for your response.

1. Inspecting the headers with Firebug is not an option as I don't have
access to the system causing the problem (its not a virus / or bot, I'm
pretty sure its one of our apps that is causing it).
2. $http_referer is already part of the access log format and is coming
up
blank.

I am thinking of writing some custom code to catch this particular issue
and
see if I can get more info on it.

Thanks

On Thu, Jan 15, 2009 at 3:35 PM, Juan Fco. Giordana
A50d1b69d837f1cabc58e46cbc866c94?d=identicon&s=25 Juan Fco. Giordana (Guest)
on 2009-01-15 21:57
(Received via mailing list)
What about soundmanager2.swf?

http://www.spellingcity.com/soundmanager2.swf

I see with firebug it's calling /data/null.mp3
27d07ab5a9b0923e138819caa42e09c1?d=identicon&s=25 Ilan Berkner (Guest)
on 2009-01-15 22:10
(Received via mailing list)
Are you going to it directly?

We use soundmanager2.swf to make many calls to .mp3 files.  If you call
it
directly (as you're doing I think) it is showing you the default call
directory.  Soundamanger2.swf requires parameters for it to call the
appropriate mp3 files.  Note that the /data/ directory is not the same
one
that is showing up in the error log (i.e. "/letters/.mp3").

What I'm not clear on is why the referring information is not available
in
the log...




On Thu, Jan 15, 2009 at 3:49 PM, Juan Fco. Giordana
A50d1b69d837f1cabc58e46cbc866c94?d=identicon&s=25 Juan Fco. Giordana (Guest)
on 2009-01-15 22:37
(Received via mailing list)
Ilan Berkner wrote:
> Are you going to it directly?

Just entered on the site and looked at the header information with
Firebug.

> We use soundmanager2.swf to make many calls to .mp3 files.  If you call
> it directly (as you're doing I think) it is showing you the default call
> directory.  Soundamanger2.swf requires parameters for it to call the
> appropriate mp3 files.  Note that the /data/ directory is not the same
> one that is showing up in the error log (i.e. "/letters/.mp3").

I would look in the script (php, xml, fla?) that generates the path for
these mp3 files. I think it's related to an undefined or empty variable
being printed and when the browser sends the request the web server
can't find the file, etc, etc.

You may be doing something like

<code>
$filename = getMyFile($id);
echo '/path-to/ . $filename . '.mp3';
</code>

But if getMyFile() returns an empty string the problem arises.

<code>
if (!$filename = getMyFile($id)) {
     $filename = 'something';
     // or fix the function
}

echo '/path-to/ . $filename . '.mp3';
</code>

Could be a millon things.

> What I'm not clear on is why the referring information is not available
> in the log...

Yesterday I saw on this thread that flash couldn't be sending the
referring information. Otherwise you could post your log settings here
and that may help.
Fda08117336cfde6562315df04b976e8?d=identicon&s=25 Dave Cheney (Guest)
on 2009-01-15 22:42
(Received via mailing list)
What does your access log say, you should be able to grep for 404's,
which may give you the referrer.

You can always disable logging 404's as errors

server {

     log_not_found off;

}

If you want to know more about the request, try ngrep

Cheers

Dave
7c1e290bae5edbadcf736921484617ca?d=identicon&s=25 Gabriel Ramuglia (Guest)
on 2009-01-15 23:01
(Received via mailing list)
Flash doesn't always send referring information. It's pretty hit or
miss and depends on the browser being used, the alignment of the
stars, etc. Bottom line, you might have referring information come
from flash, but definitely DO NOT count on it.
This topic is locked and can not be replied to.