HDFS-5265. Namenode fails to start when dfs.https.port is unspecified. Contributed by Haohui Mai.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1527093 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
027419832c
commit
b2e174c9a5
@ -356,6 +356,9 @@ Release 2.1.2 - UNRELEASED
|
||||
|
||||
HDFS-5268. NFS write commit verifier is not set in a few places (brandonli)
|
||||
|
||||
HDFS-5265. Namenode fails to start when dfs.https.port is unspecified.
|
||||
(Haohui Mai via jing9)
|
||||
|
||||
Release 2.1.1-beta - 2013-09-23
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -100,7 +100,7 @@ public void start() throws IOException {
|
||||
if (certSSL) {
|
||||
boolean needClientAuth = conf.getBoolean("dfs.https.need.client.auth", false);
|
||||
InetSocketAddress secInfoSocAddr = NetUtils.createSocketAddr(infoHost + ":" + conf.get(
|
||||
DFSConfigKeys.DFS_NAMENODE_HTTPS_PORT_KEY, infoHost + ":" + 0));
|
||||
DFSConfigKeys.DFS_NAMENODE_HTTPS_PORT_KEY, "0"));
|
||||
Configuration sslConf = new Configuration(false);
|
||||
if (certSSL) {
|
||||
sslConf.addResource(conf.get(DFSConfigKeys.DFS_SERVER_HTTPS_KEYSTORE_RESOURCE_KEY,
|
||||
|
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.hadoop.hdfs;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.junit.Test;
|
||||
|
||||
public class TestNameNodeHttpServer {
|
||||
|
||||
@Test
|
||||
public void testSslConfiguration() throws IOException {
|
||||
Configuration conf = new Configuration();
|
||||
conf.setBoolean(DFSConfigKeys.DFS_HTTPS_ENABLE_KEY, true);
|
||||
System.setProperty("jetty.ssl.password", "foo");
|
||||
System.setProperty("jetty.ssl.keypassword", "bar");
|
||||
|
||||
MiniDFSCluster dfsCluster = new MiniDFSCluster.Builder(conf)
|
||||
.numDataNodes(0).build();
|
||||
dfsCluster.waitActive();
|
||||
dfsCluster.shutdown();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user