---
# System prepended metadata

title: CDH Clone Problem

---

# CDH Clone Problem
## 1. /etc/hosts ip修改

- 1.1. Shutdown all services
- 1.2. On all nodes, 
    - ```service cloudera-scm-agent stop```
- 1.3. On the CM server, 
    - ```service cloudera-scm-server stop```
- 1.4. Edit the config.ini to point to the new scm server ip (server_host)
    - ```sudo nano /etc/cloudera-scm-agent/config.ini```
    - ![](https://i.imgur.com/meaFvoD.png)
- 1.5. Change Host IP 
    - ```sudo nano /etc/hosts```
    - ![](https://i.imgur.com/Csy4EtA.png)
- 1.6. Restart the service on all node 
    - ```service cloudera-scm-agent restart```
- 1.7. Restart the service on master node 
    - ```service cloudera-scm-server restart```

## 2. 解決CM charts no data問題

- 2.1. Stop Service Monitor
    - ```service cloudera-scm-agent stop```
    - ```service cloudera-scm-server stop```
- 2.2. Remove cloudera-service-monitor data
    - ```mv /var/lib/cloudera-service-monitor /var/lib/cloudera-service-monitor.moved```
- 2.3. Start Service Monitor
    - ```service cloudera-scm-agent restart```
    - ```service cloudera-scm-server restart```

---

# ---以下需要進到機器調整與確認流程---

---

## 3. Missing replicas問題
- 3.1. 格式化HDFS
```hadoop namenode -format```

> hdfs folder, impala table(null)

## 4. hdfs canary problem:
- 4.1. check /home/var/log/hadoop-hdfs 裡面 hadoop-cmf-hdfs-NAMENODE-daai.log.out 是否有permission denied （如圖）
    - ![](https://i.imgur.com/22IsT9K.png)
- 4.2. hdfs路徑 ‘/’的權限問題
    - ```su hdfs```
    - ```hdfs dfs -chmod 777 /```

## 5. docheckpoint java.io.IOException: Could not find image with txid 246
- 5.1. 確定hdfs snn掛載位置
- 5.2. 確保dfs/snn/current下的資料有備份
- 5.3. 確定dfs/snn/current/VERSION存在，讓snn自己建檔即可
    - ```rm -f edit*```
    - ```rm -f fsimage*```
