May 23, 2013
Twitter API: 401 Unauthorized
Symptom: Twitter API returns a 401 Unauthorized when you start the OAuth process by obtaining a bearer token. This can happen all of a sudden possibly breaking existing processes that were working.
Wat?
Problem: The most likely culprit is the clock on your server. If this gets out of sync (even by as little as 20s), Twitter’s amazing API will barf and return a helpful “401 Unauthorized”
Solution: A simple
sudo ntpdate ntp.ubuntu.com
should fix it.
Mar 20, 2013
MongoDB 2.4.0 EXT4 Readahead Warnings
After deploying MongoDB 2.4.0 for the first time and connecting to it from a remote shell, it warned me:
MongoDB shell version: 2.4.0 connecting to: abc.com/test Server has startup warnings: Wed Mar 20 22:40:49.850 [initandlisten] Wed Mar 20 22:40:49.850 [initandlisten] ** WARNING: Readahead for /data/db is set to 2048KB Wed Mar 20 22:40:49.850 [initandlisten] ** We suggest setting it to 256KB (512 sectors) or less Wed Mar 20 22:40:49.850 [initandlisten] ** http://dochub.mongodb.org/core/readahead >
The fix for this turned out to be:
sudo blockdev --setra 256 /dev/md2
Where /dev/md2 is the disk where the database files are stored.
Navigate
« To the past
Page 1 of 6
About