
# 执行distcp命令报错如何处理
#### 问题
为何distcp命令在安全集群上执行失败并发生异常？
客户端出现异常：
```
Invalid arguments:Unexpected end of file from server
```
服务器端出现异常：
```
javax.net.ssl.SSLException:Unrecognized SSL message, plaintext connection?
```
#### 回答
当用户在distcp命令中使用**webhdfs://** 时，会发生上述异常，是由于集群所使用的HTTP策略为HTTPS，即配置在"hdfs-site.xml"（文件路径为"*客户端安装目录* /HDFS/hadoop/etc/hadoop"）的"dfs.http.policy"值为"HTTPS_ONLY"。所以要避免出现此异常，应使用**swebhdfs://** 替代**webhdfs://**。
例如：
**./hadoop distcp** **swebhdfs://IP:PORT/testfile hdfs://IP:PORT/testfile1**
