I've noticed that rebooting hosts screws up tasktracker from starting normally via warden. It works fine if I /etc/init.d/mapr-warden restart with a shell that has JAVA_HOME defined.

If that's the problem, what's the best way to set JAVA_HOME for init.d scripts in oneiric? /etc/environment isn't doing the trick, and I assume that the scripts get overwritten at an update (and I don't really like to entertain the thought of changing packaged files)

Thanks!

asked 11 Feb '12, 10:51

peppert's gravatar image

peppert
8791014
accept rate: 0%


Two options would be to set the java home in either the init script for warden directly, or in the hadoop-env.sh file inside /opt/mapr/hadoop/hadoop-ver/

link

answered 11 Feb '12, 17:32

Nabeel's gravatar image

Nabeel ♦♦
2.2k147
accept rate: 24%

so, the answer is apparently "not in a way that doesn't modify the packaged files"? I'm just hoping to avoid pain at the next upgrade :) Thanks.

(12 Feb '12, 10:55) peppert

I think setting JAVA_HOME in /etc/environment should work, but I am not sure if /etc/environment is sourced before or after the scripts in /etc/rc.d/... are run. Putting it in /etc/profile will have no effect for the rc scripts, but is advisable for users logging in to the system.

link

answered 12 Feb '12, 11:07

MC%20Srivas's gravatar image

MC Srivas ♦♦
2.6k1517
accept rate: 35%

unfortunately, no. /etc/environment doesn't work, at least in oneiric. so far only setting it directly in the mapr-warden script or hadoop-env.sh seem to work.

(12 Feb '12, 11:13) peppert

what is oneiric?

(12 Feb '12, 11:18) MC Srivas ♦♦

Ubuntu 11.10 (Oneiric Ocelot)

(12 Feb '12, 17:57) Nabeel ♦♦

I think this does work, just seems the the MapR installation does not use the defined JAVA_HOME. Can someone tell us where MapR is overriding this JAVA_HOME?

link

answered 15 Jul '12, 00:19

bc56's gravatar image

bc56
41445
accept rate: 50%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×35
×2
×1
×1

Asked: 11 Feb '12, 10:51

Seen: 875 times

Last updated: 15 Jul '12, 00:19

powered by OSQA