Getting rid of "Static file referenced by handler not found" from logs - google-app-engine

My logs are full with:
2011-04-22 13:30:02.251
/soc/content/images/melange-logo.jpg
404 0ms 0cpu_ms 0kb
facebookexternalhit/1.0
(+http://www.facebook.com/externalhit_uatext.php),gzip(gfe),gzip(gfe),gzip(gfe)
69.171.224.250 - - [22/Apr/2011:13:30:02 -0700] "GET
/soc/content/images/melange-logo.jpg
HTTP/1.1" 404 0 -
"facebookexternalhit/1.0
(+http://www.facebook.com/externalhit_uatext.php),gzip(gfe),gzip(gfe),gzip(gfe)"
"www.google-melange.com" ms=1 cpu_ms=0
api_cpu_ms=0 cpm_usd=0.000036 W
2011-04-22 13:30:02.250 Static file
referenced by handler not found:
soc/content/melange-logo.jpg
This is a known 404, we changed our url schema and that link isn't used anymore. I'm fine with it serving a 404. What I'm not fine with is the warning in my logs every time Facebook's bot hits that url, which it does about every 5 minutes, polluting my logs.
How can I get rid of this annoying warning?
app.yaml is at:
http://code.google.com/p/soc/source/browse/app/app.yaml.template

You could modify the regular expression for your static file to not match that specific filename. Alternately, provide a dynamic handler that returns a 404 for that path but doesn't log anything. Or, just re-upload the file.

Related

Show full URL in the squid access.log log

Im running an Squid-Proxy and want to see the full requested URL in the /var/log/squid/access.log log.
The only thing that is shown is:
1607565964.095 64 XXX.XXX.126.82 TCP_TUNNEL/200 13744 CONNECT www.mediamarkt.de:443 XXX HIER_DIRECT/XXX.XXX.208.234 -
I requested an full link from mediamarkt, not only the main homepage.
So is there an way to see the full requested link?
For requests against my server it works:
1607565951.279 0 XXX.XXX.122.16 NONE/400 3947 GET /boaform/admin/formLogin?username=XXXXX&psd=XXXXX - HIER_NONE/- text/html
For showing the full requested URL, i need to use ssl_bump.

Gatling check does not fail

I am trying to send a http request and fail if the request returns not 200:
exec(http("Get some html")
.get("${aggUrl}/somePath")
.check(status.is(200))
.check(regex("websocket=(.*?)&").saveAs("wsLink"))
)
The server sends the 401 response:
[HTTP/1.1 401 Unauthorized]{"errors":[{"code":"authentication.failure","message":"Failed to authenticate user details"}]}]
I expect in console something like "expecting code 200, but was 401"
But the actual error is:
[ERROR] i.g.c.a.b.SessionHookBuilder$$anon$1 - 'hook-38' crashed with 'j.u.NoSuchElementException: No attribute named 'wsLink' is defined', forwarding to the next one
[ERROR] i.g.h.a.HttpRequestAction - 'httpRequest-37' failed to execute: No attribute named 'wsLink' is defined
So I assume that the ".check(status.is(200))" is just ignored?
How then should I fail the test?
Thanks in advance,
Andrei Isakov
I think you're mistaken.
[ERROR] i.g.c.a.b.SessionHookBuilder$$anon$1 - 'hook-38' crashed with 'j.u.NoSuchElementException: No attribute named 'wsLink' is defined', forwarding to the next one
[ERROR] i.g.h.a.HttpRequestAction - 'httpRequest-37' failed to execute: No attribute named 'wsLink' is defined
Those errors happens happen AFTER the request you provided the code for, in an exec block you didn't mentioned where you're trying to inspect the Session's content and fetch the wsLink attribute that doesn't exist because the request failed.
Check failures are not logged with ERROR level. You have to either lower the logging level (see logback.xml) or check the HTML reports.

ceilometer --debug meter-list (pike version) error 404 not found

I could see the following result:
See this image please
What could the issue be? Which files should I make modifications in?
I tried changing /etc/ceilometer/ceilometer.conf
[keystone] and [service_credential] auth_uri and auth_url.However,when that did not work I changed it to what it was.
Endpoint is http://controller:8777
auth_uri is http://controller:5000
auth_url is http://controller:35357
Also, ceilometer alarm-list works fine but ceilometer meter-list gives HTTP 404 Not Found Error.

Visualforce: Can't access archived static resource

I'm trying to access some static resource in my visualforce page. I have uploaded a zip file named pqGrid. It's structure is like so:
- pqgrid.min.js
- pggrid.min.css
- images/
--image1.png
--image2.png
Following the directions in the sf docs on [referencing a static resource1, I tried the following:
<apex:includeScript value="{!URLFOR($Resource.pqGrid, 'pqgrid.min.js')}"/>
<apex:stylesheet value="{!URLFOR($Resource.pqGrid, 'pqgrid.min.css')}"/>
Onloading the page, I get a 404:
GET
https://c.cs10.visual.force.com/resource/7975978979000/pqGrid/pqgrid.min.js
404 (Not Found)
GET https://c.cs10.visual.force.com/resource/7975978979000/pqGrid/pqgrid.min.css
I've even tried just referencing an image:
<apex:image url="{!URLFOR($Resource.pqGrid, 'images/cross.png')}"/>
and same 404:
GET
https://c.cs10.visual.force.com/resource/7975978979000/pqGrid/images/cross.png
404 (Not Found)
I've made sure that the resource cache control is public
What am I doing incorrectly?
EDIT
Tried putting all the files into another directory, so it is now pqGrid/stash/[*files]
When I get the 404 not found:
GET
https://c.cs10.visual.force.com/resource/1430434594000/pqGrid/stash/pqgrid.min.css
I tried playing with this url. Trying to navigate to just /stash/ throws a ERR_INVALID_RESPONSE error. Navigating to just /pqGrid/ let's me download the stuff. Trying to go directly to the file, /pqGrid/stash/file.js I just get a blank page.
So the zip is definitely on salesforce, but something is up with accessing it.
Thanks all!
This happens when we specify incorrect paths for our files would suggest to try below
<apex:includeScript value="{!URLFOR($Resource.pqGrid, 'pqgrid/pqgrid.min.js')}"/>
<apex:stylesheet value="{!URLFOR($Resource.pqGrid, 'pqgrid/pqgrid.min.css')}"/>
Sometimes forgetting slash also introduces issues
<apex:includeScript value="{!URLFOR($Resource.pqGrid, '/pqgrid.min.js')}"/>

Google App Engine: Cron handler is called by cron, but no code is run

I have a following problem. I have defined a cron job in Google App Engine, but my get method is not called (or to be precise it is called every other time - if I run it manually it doesn't do anything at the first time, but at the second it works flawlessly). This is output from logging for the call made by cron:
2011-07-04 11:39:08.500 /suggestions/ 200 489ms 70cpu_ms 0kb AppEngine-Google; (+http://code.google.com/appengine)
0.1.0.1 - - [04/Jul/2011:11:39:08 -0700] "GET /suggestions/ HTTP/1.1" 200 0 - "AppEngine-Google; (+http://code.google.com/appengine)" "bazinga-match.appspot.com" ms=489 cpu_ms=70 api_cpu_ms=0 cpm_usd=0.001975 queue_name=__cron task_name=a449e27ff383de24ff8fc5d5f05f2aae
As you can see it makes GET request on /suggestions/, but nothing happens, including my log messages (they are printed, when I run it second time manually). Do you have any idea, why this might be happening?
My handler:
class SuggestionsHandler(RequestHandler):
def get(self):
logging.debug('Creating suggestions')
for key in db.Query(User, keys_only=True).order('last_suggestion'):
make_suggestion(key)
logging.debug('Done creating suggestions')
print
print('Done creating suggestions')
This is my cron.yaml:
cron:
- description: daily suggestion creation
url: /suggestions/
schedule: every 6 hours
and proper section of my app.yaml:
- url: /suggestions/
script: cron.py
login: admin
You're missing this declaration from the bottom of your handler file, after main:
if __name__ == '__main__':
main()
The first time a handler script is run, App Engine simply imports it, and this snippet runs your main in that situation. On subsequent requests, App Engine runs the main function, if you defined one.

Resources