Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sunday, October 27, 2013

Hadoop configuration - permissions confusion

I'll start from the end - HDFS permissions are managed by hadoop and are not reflected (even on creation) from the underlying file system.

To make a long story short - I installed hadoop 2.2.0 manually a few days ago on Linux 12.04 LTS. Once finished I ran ./start-all.sh and everything seemed to be working. once I stopped the services I got a message saying that job-tracker is not running and therefor will not be stopped. The log file for job tracker showed said it did not have permission to write to

job-tracker log I get the following error:
FATAL org.apache.hadoop.mapred.JobTracker: 
org.apache.hadoop.security.AccessControlException: 
The systemdir hdfs://localhost:54310/home/hduser/tmp/mapred/system 
is not owned by hduser
googeling about it led me to tons of people have the same problem or variants of it but all solutions did not work. Some of them far fetched (re-install everything) but most of them focused on "mapred-site.xml" and file system permissions. Since my config files were OK I played with the permissions and ownership of the "tmp/mapred" folder and restarting thing over and over again... to no avail. After too much time of bashing my head against an imaginary wall I realized the little "hdfs://" on the begging. Wish I noticed it 2 hours before.
The solution was easy. instead of using regular bash commands I needed to use the hadoop version of them. so with "hadoop fs -chmod" and "hadoop fs -chown" I solved the issue in 10 seconds ("hadoop fs chown -R hduser /home/hduser/tmp/" and "hadoop fs chmod -R 755 /home/hduser/tmp/")

Sunday, July 1, 2012

rails with sqlite - suddenly became a little nightmare

So I decided to reinstall rails on one of my virtual machines since I really fucked it up and there was no restore image available. Though to myself I'll just waste 3 minutes and everything will be up and running. What I did not expect is that reinstalling sqlite3 which I use for Dev will cause me such an headache.

while creating new project using "rails new someProject" the bundler had problems with the sqlite installation saying "an error occurred while installing sqlite3 (1.3.6) " . Googled a bit about it and found so many people having the same problem but nothing worked. the gem file and the sqlite3 installation did not want to work together. The solutions varied from tweaking every possible file related to ruby to uninstalling everything you ever had....
after trying all sorts of voodoo from  stackoverflow I found out the solution (among 10 other I tried) which is to install a dev version of sqlite using "apt-get install libsqlite3-dev".
So first of all I posted it here not to forget it once I'll run into this weird issue again. What surprised me the most is that nothing in the error messages implied that the problem is with the version itself nor did the gem file gave me any clue about it.

Getting back onto linux after so many years working only with windows surely takes its toll.