hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brahma Reddy Battula <brahmareddy.batt...@huawei.com>
Subject [Hadoop-SecureMode-Webconsole]Mismatch in documentation and Code
Date Mon, 24 Sep 2012 15:12:18 GMT

Dear All,

I started cluster in secure-mode by going through following document.


Got following exception from Name-node.

throw new RuntimeException("Could not read HTTP signature secret file: " + signatureSecretFile);

Then I debugged the code and checked,,Problem with "hadoop.http.authentication.signature.secret"


static final String SIGNATURE_SECRET_FILE = AuthenticationFilter.SIGNATURE_SECRET + ".file";

While Putting into map(" hadoop.http.authentication.signature.secret" is putting)

 for (Map.Entry<String, String> entry : conf) {
      String name = entry.getKey();
      if (name.startsWith(PREFIX)) {
        String value = conf.get(name);
        name = name.substring(PREFIX.length());
        filterConfig.put(name, value);

Getting from Map:(" hadoop.http.authentication.signature.secret.file" is getting)

    String signatureSecretFile = filterConfig.get(SIGNATURE_SECRET_FILE);
    if (signatureSecretFile == null) {
      throw new RuntimeException("Undefined property: " + SIGNATURE_SECRET_FILE);

    try {
      StringBuilder secret = new StringBuilder();
      Reader reader = new FileReader(signatureSecretFile);
      int c = reader.read();
      while (c > -1) {
        c = reader.read();
      filterConfig.put(AuthenticationFilter.SIGNATURE_SECRET, secret.toString());
    } catch (IOException ex) {
      throw new RuntimeException("Could not read HTTP signature secret file: " + signatureSecretFile);


Here I have two questions:

i) why we are puting hadoop.http.authentication.signature.secret and getting hadoop.http.authentication.signature.secret.file..I
mean purpose of this..?(I did not gone thru fully).

ii)If we configure "hadoop.http.authentication.signature.secret.file",we wn't get any exception..

If this is the expectation then better to change documentation.

Please let me know if this needs file..I'll file jira.

Thanks And Regards
Brahma Reddy

View raw message