Rails 3.1 + Heroku: Can someone help me decipher this Heroku log? - ruby-on-rails

I'm experiencing this intermittent issue where my client is receiving multiple JSON responses from (I think) a single HTTP request to my Rails server on Heroku. Here's the Heroku log showing the issue...
2012-04-20T00:22:27+00:00 app[web.1]: Started POST "/games/2/call" for 76.171.181.11 at 2012-04-19 17:22:27 -0700
2012-04-20T00:22:27+00:00 app[web.1]: Processing by GamesController#call as */*
2012-04-20T00:22:27+00:00 app[web.1]: Parameters: {"fb_id"=>"0", "id"=>"2"}
2012-04-20T00:22:27+00:00 app[web.1]: Completed 200 OK in 163ms (Views: 0.3ms | ActiveRecord: 93.3ms)
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4594ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 app[web.1]: cache: [POST /games/2/call] invalidate, pass
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4546ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4594ms status=200 bytes=2012
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4570ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4560ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4534ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[nginx]: 76.171.181.11 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 560 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 76.171.181.11 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 560 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 76.171.181.11 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 539 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 207.151.231.155 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 207.151.231.155 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 207.151.32.38 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 108.70.74.121 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19"
I'm new to Rails and Heroku, so I can't quite understand this log enough to figure out what's happening. Is my Rails app on Heroku receiving multiple HTTP requests from my client, or is it only receiving one HTTP request and returning multiple JSON responses?
Thanks so much in advance for your wisdom!

It's getting 7 POST requests at the same time:
# First Request, heroku starts to process it normally
2012-04-20T00:22:27+00:00 app[web.1]: Started POST "/games/2/call" for 76.171.181.11 at 2012-04-19 17:22:27 -0700
2012-04-20T00:22:27+00:00 app[web.1]: Processing by GamesController#call as */*
2012-04-20T00:22:27+00:00 app[web.1]: Parameters: {"fb_id"=>"0", "id"=>"2"}
# First request returns OK
2012-04-20T00:22:27+00:00 app[web.1]: Completed 200 OK in 163ms (Views: 0.3ms | ActiveRecord: 93.3ms)
# Second request starts
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4594ms status=200 bytes=2013
# It looks like the second request fails
2012-04-20T00:22:27+00:00 app[web.1]: cache: [POST /games/2/call] invalidate, pass
# Request 3-7 come in
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4546ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4594ms status=200 bytes=2012
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4570ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4560ms status=200 bytes=2013
2012-04-20T00:22:27+00:00 heroku[router]: POST myapp.heroku.com/games/2/call dyno=web.1 queue=0 wait=0ms service=4534ms status=200 bytes=2013
# Heroku responds to the requests... though I'm not sure what it's serving up.
2012-04-20T00:22:27+00:00 heroku[nginx]: 76.171.181.11 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 560 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 76.171.181.11 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 560 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 76.171.181.11 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 539 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 207.151.231.155 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 207.151.231.155 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 207.151.32.38 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19" myapp.heroku.com
2012-04-20T00:22:27+00:00 heroku[nginx]: 108.70.74.121 - - [20/Apr/2012:00:22:27 +0000] "POST /games/2/call HTTP/1.1" 200 540 "http://myapp.heroku.com/pages/fb/webplayer_64.unity3d" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19"
I've had issues like this occasionally -- Javascript requests that bubble up the DOM and fire multiple times when I only meant them to fire once. This can crash a server pretty fast, so you should definitely look at your app and make sure you're not rapid-fire triggering AJAX calls.
A really easy way to catch this is to put an alert() immediately before or after any ajax call and see how many times it fires vs. how many you expect it to.
I don't know if that's your problem, but I've had that kind of thing happen to me before.

Related

Tests failing because of a 500 internal server error

[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/ng-file-upload-shim.min.js HTTP/1.1" 200 bytesIn:568 bytesOut:3062 reqTime:0
docker.vm:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/ng-file-upload-all.min.js HTTP/1.1" 200 14565 "http://servertest01:8082/apex/team/50" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
docker.vm:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/ngBootbox.min.js HTTP/1.1" 200 1407 "http://servertest01:8082/apex/team/50" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
docker.vm:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/bootbox.min.js HTTP/1.1" 200 4166 "http://servertest01:8082/apex/team/50" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/ngBootbox.min.js HTTP/1.1" 200 bytesIn:557 bytesOut:1407 reqTime:0
[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/bootbox.min.js HTTP/1.1" 200 bytesIn:556 bytesOut:4166 reqTime:0
[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/ng-file-upload-all.min.js HTTP/1.1" 200 bytesIn:567 bytesOut:14565 reqTime:0
docker.vm:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/moment.min.js HTTP/1.1" 200 20933 "http://servertest01:8082/apex/team/50" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
docker.vm:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/angular-moment.min.js HTTP/1.1" 200 2281 "http://servertest01:8082/apex/team/50" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
docker.vm:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/moment-locale-en-gb.js HTTP/1.1" 200 1385 "http://servertest01:8082/apex/team/50" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
docker.vm:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/smart-table/smart-table.min.js HTTP/1.1" 200 2902 "http://servertest01:8082/apex/team/50" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
docker.vm:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/lrStickyHeader.js HTTP/1.1" 200 1905 "http://servertest01:8082/apex/team/50" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/lrStickyHeader.js HTTP/1.1" 200 bytesIn:559 bytesOut:1905 reqTime:0
[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/moment-locale-en-gb.js HTTP/1.1" 200 bytesIn:563 bytesOut:1385 reqTime:0
[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/angular-moment.min.js HTTP/1.1" 200 bytesIn:563 bytesOut:2281 reqTime:0
[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/smart-table/smart-table.min.js HTTP/1.1" 200 bytesIn:572 bytesOut:2902 reqTime:0
[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/moment.min.js HTTP/1.1" 200 bytesIn:555 bytesOut:20933 reqTime:0
docker.vm:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/stStickyHeader.js HTTP/1.1" 200 816 "http://servertest01:8082/apex/team/50" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /assets/d5e561ce/js/stStickyHeader.js HTTP/1.1" 200 bytesIn:558 bytesOut:816 reqTime:0
[php-fpm:access] 127.0.0.1 - 13/Sep/2019:14:02:09 +0000 "GET /index.php?compDur=0+DAY&getKids=none&open=0&team=50&type=team" 200 /var/www/secure.curtisbanks.co.uk/htdocs/index.php 323.680 8192 30.89%
docker.vm:ip - - [13/Sep/2019:14:02:09 +0000] "GET /tasks/tasksApi/tasks?compDur=0+DAY&getKids=none&open=0&team=50&type=team HTTP/1.1" 200 57634 "http://servertest01:8082/apex/team/50" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
[httpd:access] servertest01:ip - - [13/Sep/2019:14:02:09 +0000] "GET /tasks/tasksApi/tasks?compDur=0+DAY&getKids=none&open=0&team=50&type=team HTTP/1.1" 200 bytesIn:587 bytesOut:576
So I have my tests running each morning at 3 AM aprox. I have some tests that are failing with the same error which is:
03:12:18.785 WARNING - http://servertest/user/account/login - This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see https://goo.
03:12:53.997 WARNING - http://servertest/user/account/login - This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see https://goo.
03:13:18.146 SEVERE - http://servertest/portal/messages/team/id/46/view/onldgdl7g7SrCYl93uyGVFon1yfJP6OGpRpyiJmpQUYuoXKk - [DOM] Found 2 elements with non-unique id #undefined_hint: (More info: https://goo) %o %o
03:13:25.395 SEVERE - http://servertest/portal/messages/exportForKW/ref/onldgdl7g7SrCYl93uyGVFon1yfJP6OGpRpyiJmpQUYuoXKk/ajax/1 - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
I have tried to change the id's where is it filling the user name and password as I can see on the screenshot that the last part of the password is sometimes filled in the username filed, after the user name was already filled in.
$I = new AcceptanceTester($scenario);
$I->wantTo('Search for a caller, go through security, save it and add notes');
//Log in
$I->amOnPage('/user/account/login');
$I->fillField("UserLogin[username]", "");
$I->fillField("UserLogin[password]", "");
$I->click('Log In');
$I->wait(2);
$I->waitForElementVisible('#AdminMemberGrid_status', 30);
//Access the call tab
$I->click('//*[#id="secondaryMenu"]/li[1]/a');
$I->waitForText('Search for caller :');
Here the popup where I wait for text search for caller and pick up transferred call is not visible, in the screenshot it barley appears in front of the first page when I click the Call tab $I->click('//*[#id="secondaryMenu"]/li[1]/a');
I am expecting to see the text and fill the fields, adding a longer wait won't make any difference.
The other tests pass, and they have the same code.
Clicking on the google links will redirect me to the security blog, online google security blog: 2016/09/moving-towards-more-secure-web.html
09:39:55.676 WARNING - http://servertest/user/account/login - This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see
09:41:09.738 SEVERE - http://servertest/nii/index/show/id/144904/type/40x40.max - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
09:41:10.182 SEVERE - http://servertest/nii/index/show/id/144904/type/40x40.max - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
09:41:22.316 SEVERE - http://servertest/nii/index/show/id/144904/type/40x40.max - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
09:41:42.15 SEVERE - http://servertest/nii/index/show/id/144904/type/40x40.max - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
09:42:12.869 SEVERE - http://servertest/nii/index/show/id/144904/type/40x40.max - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
09:42:29.88 WARNING - http://servertest/user/account/login - This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see
09:43:04.33 WARNING - http://servertest/user/account/login - This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see
09:43:30.640 SEVERE - - [DOM] Found 2 elements with non-unique id #undefined_hint: (More info: ) %o %o

react native map issue

My app gives me error when I import MapView on react nativ
Here is my code:
`import MapView from 'react-native-maps'`
just importing it like that gives me an erorr
Here is my dpendency:
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.7",
"react-native-maps": "^0.22.1",
"react-native-router-flux": "^4.0.6"
},
Opening /Users/Desktop/snl/reactNative/ChatApp/node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js with /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl
BUNDLE [ios, dev] ../../index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.
BUNDLE [ios, dev] ../../index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1)::1 - - [09/Dec/2018:08:42:21 +0000] "GET /index.bundle?platform=ios&dev=true&minify=false HTTP/1.1" 200 - "-" "ChatApp/1 CFNetwork/975.0.3 Darwin/17.7.0"
::1 - - [09/Dec/2018:08:42:24 +0000] "POST /symbolicate HTTP/1.1" 200 - "-" "ChatApp/1 CFNetwork/975.0.3 Darwin/17.7.0"
::1 - - [09/Dec/2018:08:42:25 +0000] "POST /symbolicate HTTP/1.1" 200 - "-" "ChatApp/1 CFNetwork/975.0.3 Darwin/17.7.0"
^[[1;2D

Grafana Integration with Identity Provider using openid connect and generic oauth

I am trying to integrate forgerock openAM (Identity Provider) with grafana using generic oauth. I have mentioned the endpoints and all in the configuration.
It redirects to the openAM server and asks for login credentials, but after clicking on the allow button, it's showing a server side error.
grafana.log below:
t=2017-12-31T12:26:52+0530 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/login/generic_oauth status=302 remote_addr=192.168.1.153 time_ms=0 size=338 referer=http://grafana.oneeight.com:3000/login
t=2017-12-31T12:27:26+0530 lvl=eror msg="login.OAuthLogin(get info from generic_oauth)" logger=context userId=0 orgId=0 uname= error="Error getting user info: {\"error_description\":\"The access token provided is expired, revoked, malformed, or invalid for other reasons.\",\"error\":\"invalid_token\"}"
t=2017-12-31T12:27:26+0530 lvl=eror msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/login/generic_oauth status=500 remote_addr=192.168.1.153 time_ms=92 size=1147 referer="http://openam13.oneeight.com:8080/openam/oauth2/authorize?realm=Operators&access_type=online&client_id=operator_id&redirect_uri=http%3A%2F%2Fgrafana.oneeight.com%3A3000%2Flogin%2Fgeneric_oauth&response_type=code&scope=uid+openid+profile&state=OpiuNzehHEqm0hq93ogfKoSG1%2FMJXtcrhPgDz22Glc0%3D"
t=2017-12-31T12:27:26+0530 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/public/css/fonts.min.css status=404 remote_addr=192.168.1.153 time_ms=1 size=11374 referer="http://grafana.oneeight.com:3000/login/generic_oauth?code=ae93d8c7-3349-4618-88d3-c7f31645e6ff&scope=uid%20openid%20profile&state=OpiuNzehHEqm0hq93ogfKoSG1%2FMJXtcrhPgDz22Glc0%3D"
t=2017-12-31T12:27:26+0530 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/public/build/grafana.dark.min.css status=404 remote_addr=192.168.1.153 time_ms=2 size=11374 referer="http://grafana.oneeight.com:3000/login/generic_oauth?code=ae93d8c7-3349-4618-88d3-c7f31645e6ff&scope=uid%20openid%20profile&state=OpiuNzehHEqm0hq93ogfKoSG1%2FMJXtcrhPgDz22Glc0%3D"
Can anyone please help to figure out the solution?
Here is set of logs from OpenAM when grafana tries to access user details
b8efbd7-768a-4038-af7f-cd2de423d285-12480","2018-01-02T06:09:25.965Z","AM-ACCESS-OUTCOME","eb8efbd7-768a-4038-af7f-cd2de423d285-12478","id=vipin,ou=user,o=operators,ou=services,dc=oneeight,dc=com","[""444b699c238b89d301""]","192.168.1.77","8080","192.168.1.153","51058",,,,"false","GET","http://openam13.oneeight.com:8080/openam/oauth2/authorize","{""realm"":[""Operators""],""access_type"":[""online""],""client_id"":[""operator_id""],""response_type"":[""code""],""scope"":[""uid%20openid%20profile""],""state"":[""qbHM3cXul897yzIMeK5rQD4TZicEzw5N22F%2FrS3E8ls%3D""]}","{""accept"":[""text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8""],""host"":[""openam13.oneeight.com:8080""],""referer"":[""http://openam13.oneeight.com:8080/openam/XUI/""],""upgrade-insecure-requests"":[""1""],""user-agent"":[""Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36""]}","{""JSESSIONID"":""9C5CF9FDE026ECFF31BD51935CC8E45D"",""amlbcookie"":""01"",""i18next"":""en-US""}",,"SUCCESSFUL",,,"10","MILLISECONDS","OAuth","/Operators"
"eb8efbd7-768a-4038-af7f-cd2de423d285-12483","2018-01-02T06:09:32.981Z","AM-ACCESS-OUTCOME","eb8efbd7-768a-4038-af7f-cd2de423d285-12481","id=vipin,ou=user,o=operators,ou=services,dc=oneeight,dc=com","[""444b699c238b89d301""]","192.168.1.77","8080","192.168.1.153","51058",,,,"false","POST","http://openam13.oneeight.com:8080/openam/oauth2/authorize","{""realm"":[""Operators""],""access_type"":[""online""],""client_id"":[""operator_id""],""response_type"":[""code""],""scope"":[""uid%20openid%20profile""],""state"":[""qbHM3cXul897yzIMeK5rQD4TZicEzw5N22F%2FrS3E8ls%3D""]}","{""accept"":[""text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8""],""host"":[""openam13.oneeight.com:8080""],""origin"":[""http://openam13.oneeight.com:8080""],""referer"":[""http://openam13.oneeight.com:8080/openam/oauth2/authorize?realm=Operators&access_type=online&client_id=operator_id&redirect_uri=http%3A%2F%2Fgrafana.oneeight.com%3A3000%2Flogin%2Fgeneric_oauth&response_type=code&scope=uid%20openid%20profile&state=qbHM3cXul897yzIMeK5rQD4TZicEzw5N22F%2FrS3E8ls%3D""],""upgrade-insecure-requests"":[""1""],""user-agent"":[""Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36""]}","{""JSESSIONID"":""9C5CF9FDE026ECFF31BD51935CC8E45D"",""amlbcookie"":""01"",""i18next"":""en""}",,"SUCCESSFUL",,,"34","MILLISECONDS","OAuth","/Operators"
"eb8efbd7-768a-4038-af7f-cd2de423d285-12496","2018-01-02T06:09:33.221Z","AM-ACCESS-OUTCOME","eb8efbd7-768a-4038-af7f-cd2de423d285-12484","id=vipin,ou=user,o=operators,ou=services,dc=oneeight,dc=com","[""d02fa012-ddff-40a1-ba83-3de3de2e18d6"",""69b85d3a-7ee8-4f01-a259-0ae26bfec634""]","192.168.1.77","8080","192.168.1.148","57122",,,,"false","POST","http://openam13.oneeight.com:8080/openam/oauth2/access_token","{""realm"":[""Operators""]}","{""host"":[""openam13.oneeight.com:8080""],""user-agent"":[""Go-http-client/1.1""]}","{}",,"SUCCESSFUL",,"{""scope"":""uid openid profile"",""token_type"":""Bearer""}","216","MILLISECONDS","OAuth","/Operators"
The key part of that error is Error getting user info: {\"error_description\":\"The access token provided is expired, revoked, malformed, or invalid for other reasons.\",\"error\":\"invalid_token\"}. That indicates that grafana isn't able to get the user info from OpenAM because it's refusing the token.
The first thing I'd recommend would be to check the OpenAM logs and see whether it gives you any more information about why it rejected the token. The other thing you may want to verify is that you have your scopes set up correctly in the grafana configuration, and that your api_url setting is correct.
Looking at the documentation, it seems like the configuration should be
scopes = openid email profile
auth_url = https://openam.example.com:8443/openam/oauth2/authorize
token_url = https://openam.example.com:8443/openam/oauth2/access_token
api_url = https://openam.example.com:8443/openam/oauth2/userinfo
Where https://openam.example.com:8443 is the address of your OpenAM server.

How do I know if images are being cached properly?

I'm hosting a Rails app on Heroku and not sure if my static images are being cached or not. Below are my logs from loading the same image three times. Are the last two requests being served from the cache? What does "stale, invalid, store" mean?
These are just static assets and I'm not using the asset pipeline in Rails 3.1
2012-01-24T03:37:27+00:00 app[web.1]: cache: [GET /images/offer-new-reward-button.png?1327376077] miss, store
2012-01-24T03:37:27+00:00 heroku[nginx]: (ip) - - [24/Jan/2012:03:37:27 +0000] "GET /images/offer-new-reward-button.png?1327376077 HTTP/1.1" 200 3692 "-" "curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5" myapp.heroku.com
2012-01-24T03:37:27+00:00 heroku[router]: GET myapp.heroku.com/images/offer-new-reward-button.png dyno=web.1 queue=0 wait=0ms service=8ms status=200 bytes=3692
2012-01-24T03:37:52+00:00 app[web.1]: cache: [GET /images/offer-new-reward-button.png?1327376077] stale, invalid, store
2012-01-24T03:37:52+00:00 heroku[nginx]: (ip) - - [24/Jan/2012:03:37:52 +0000] "GET /images/offer-new-reward-button.png?1327376077 HTTP/1.1" 200 3692 "-" "curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5" myapp.heroku.com
2012-01-24T03:37:52+00:00 heroku[router]: GET myapp.heroku.com/images/offer-new-reward-button.png dyno=web.1 queue=0 wait=0ms service=6ms status=200 bytes=3692
2012-01-24T03:38:25+00:00 app[web.1]: cache: [GET /images/offer-new-reward-button.png?1327376077] stale, invalid, store
2012-01-24T03:38:25+00:00 heroku[router]: GET myapp.heroku.com/images/offer-new-reward-button.png dyno=web.1 queue=0 wait=0ms service=7ms status=200 bytes=3692
2012-01-24T03:38:25+00:00 heroku[nginx]: (ip) - - [24/Jan/2012:03:38:25 +0000] "GET /images/offer-new-reward-button.png?1327376077 HTTP/1.1" 200 3692 "-" "curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5" myapp.heroku.com
As you appear to NOT be running on the Cedar stack, your static files should automatically be cached with Varnish.
More info here: http://devcenter.heroku.com/articles/http-caching
To test your caching, simply get one of the images and look at the response headers. You should see the caching headers set here along with a via header from Varnish.

sign-in-with-twitter is not working on Heroku - Rails 3.1

I am using the oa-auth and twitter gem, via this example: https://github.com/sferik/sign-in-with-twitter
When I try to sign in with the button, this is what I see in my logs on Heroku, even though this works perfectly in development:
Started GET "/assets/sign-in-with-twitter-56f86819ac755692904d912373db060b.png" for XX.XX.XXX.XX3 at 2011-10-06 10:27:32 -0700
2011-10-06T17:27:32+00:00 app[web.1]: cache: [GET /assets/sign-in-with-twitter-56f86819ac755692904d912373db060b.png] miss, store
2011-10-06T17:27:32+00:00 heroku[router]: GET domain.heroku.com/assets/sign-in-with-twitter-56f86819ac755692904d912373db060b.png dyno=web.1 queue=0 wait=0ms service=21ms status=200 bytes=2490
2011-10-06T17:27:32+00:00 heroku[nginx]: xx.xx.xxx.xx - - [06/Oct/2011:10:27:32 -0700] "GET /assets/sign-in-with-twitter-56f86819ac755692904d912373db060b.png HTTP/1.1" 200 2490 "http://domain.heroku.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1" mydomain.heroku.com
2011-10-06T17:27:56+00:00 app[web.1]:
2011-10-06T17:27:56+00:00 app[web.1]:
2011-10-06T17:27:56+00:00 app[web.1]: Started GET "/auth/twitter?utf8=%E2%9C%93&commit.x=171&commit.y=8&commit=Sign+in" for xx.xxx.xxx.xx at 2011-10-06 10:27:56 -0700
2011-10-06T17:27:56+00:00 app[web.1]: cache: [GET /auth/twitter?utf8=%E2%9C%93&commit.x=171&commit.y=8&commit=Sign+in] miss
2011-10-06T17:27:56+00:00 heroku[router]: GET mydomain.heroku.com/auth/twitter dyno=web.1 queue=0 wait=0ms service=370ms status=302 bytes=113
2011-10-06T17:27:56+00:00 heroku[nginx]: xx.xxx.xxx.xx - - [06/Oct/2011:10:27:56 -0700] "GET /auth/twitter?utf8=%E2%9C%93&commit.x=171&commit.y=8&commit=Sign+in HTTP/1.1" 302 113 "http://mydomain.heroku.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1" mydomain.heroku.com
2011-10-06T17:27:57+00:00 app[web.1]:
2011-10-06T17:27:57+00:00 app[web.1]:
2011-10-06T17:27:57+00:00 app[web.1]: Started GET "/auth/twitter/callback?utf8=%E2%9C%93&commit.x=171&commit.y=8&commit=Sign+in&oauth_token=eiJ1oauth_verifier=JfqNp7P7lw5g" for xx.xxx.xxx.xx at 2011-10-06 10:27:57 -0700
2011-10-06T17:27:57+00:00 app[web.1]: Processing by SessionsController#create as HTML
2011-10-06T17:27:57+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "commit.x"=>"171", "commit.y"=>"8", "commit"=>"Sign in", "oauth_token"=>"eiVMHybiNjtGOM13ytYTbgkI", "oauth_verifier"=>"JzX1BHjZVA4Z5EiFhq4mw5g"}
2011-10-06T17:27:59+00:00 app[web.1]: Completed 500 Internal Server Error in 1212ms
2011-10-06T17:27:59+00:00 app[web.1]: cache: [GET /auth/twitter/callback?utf8=%E2%9C%93&commit.x=171&commit.y=8&commit=Sign+in&oauth_token=VMHybiNjtGOM13ytYTbgkI&oauth_verifier=JfqNp7adsasdaf3245453462462462dmw5g] miss
2011-10-06T17:27:59+00:00 heroku[router]: GET mydomain.heroku.com/auth/twitter/callback dyno=web.1 queue=0 wait=0ms service=1992ms status=302 bytes=0
2011-10-06T17:27:59+00:00 heroku[nginx]: xx.xxx.xxx.xx - - [06/Oct/2011:10:27:59 -0700] "GET /auth/twitter/callback?utf8=%E2%9C%93&commit.x=171&commit.y=8&commit=Sign+in&oauth_token=eiJ1KQbgkI&oauth_verifier=Jq4mw5g HTTP/1.1" 302 0 "http://mydomain.heroku.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1" mydomain.heroku.com
2011-10-06T17:27:59+00:00 app[web.1]:
2011-10-06T17:27:59+00:00 app[web.1]:
2011-10-06T17:27:59+00:00 app[web.1]: Started GET "/auth/failure?message=invalid_response" for xx.xxxx.xxx.x at 2011-10-06 10:27:59 -0700
2011-10-06T17:27:59+00:00 app[web.1]: Processing by SessionsController#error as HTML
2011-10-06T17:27:59+00:00 app[web.1]: Parameters: {"message"=>"invalid_response"}
2011-10-06T17:27:59+00:00 app[web.1]: Redirected to http://mydomain.heroku.com/
2011-10-06T17:27:59+00:00 app[web.1]: Completed 302 Found in 1ms
2011-10-06T17:27:59+00:00 app[web.1]: cache: [GET /auth/failure?message=invalid_response] miss
2011-10-06T17:27:59+00:00 heroku[router]: GET mydomain.com/auth/failure dyno=web.1 queue=0 wait=0ms service=31ms status=302 bytes=99
2011-10-06T17:27:59+00:00 heroku[nginx]: xx.xx.xxx.xx - - [06/Oct/2011:10:27:59 -0700] "GET /auth/failure?message=invalid_response HTTP/1.1" 302 99 "http://mydomain.heroku.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1" mydomain.heroku.com
I already have everything configured and working in development, but the first time I pushed it to Heroku it doesn't work.
I also added my config vars to Heroku and that seems to be fine.
What should I do?
Thanks.
mydomain.heroku.com is not a valid application. Twitter needs a valid URL to callback to.
So it seems that there was something wrong in my code - specifically the create action of my sessions controller. It wasn't finding the user credentials once the auth credentials were returned.

Resources