schematool -dbType mysql -initSchema 初始化hive时报错
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. SQL Error code: 0 Use --verbose for detailed stacktrace. *** schemaTool failed ***
然后发现在容器中ping宿主机不通,但是宿主机可以ping通容器
问题解决:找学长帮忙的,问题出在宿主机的iptables被修改,在宿主机把他设置成默认的就可以了,执行下面两条命令
sudo iptables -t filter -F
sudo iptables -t filter -X
最后去docker容器继续执行schematool -dbType mysql -initSchema成功