CDH版本的Sqoop安装后无法启动
-
报错信息:
WARNING: Can't load server.xml from /var/lib/sqoop2/tomcat-deployment/conf/server.xml
May 05, 2019 9:44:42 AM org.apache.catalina.startup.Catalina load
WARNING: Can't load server.xml from /var/lib/sqoop2/tomcat-deployment/conf/server.xml
May 05, 2019 9:44:42 AM org.apache.catalina.startup.Catalina start
SEVERE: Cannot start server. Server instance is not configured.
-------------------------------------------------------------------------------------------------
+ env TOMCAT_CONF=/opt/cloudera/parcels/CDH-5.14.4-1.cdh5.14.4.p0.3/lib/sqoop2/../../etc/sqoop2/tomcat-conf.dist
TOMCAT_DEPLOYMENT=/var/lib/sqoop2/tomcat-deployment SQOOP2_HOME=/opt/cloudera/parcels/CDH-5.14.4-1.cdh5.14.4.p0.3/lib/sqoop2
bash /opt/cloudera/parcels/CDH-5.14.4-1.cdh5.14.4.p0.3/lib/sqoop2/tomcat-deployment.sh
cp: cannot open ‘/opt/cloudera/parcels/CDH-5.14.4-1.cdh5.14.4.p0.3/lib/sqoop2/../../etc/sqoop2/tomcat-conf.dist/conf/server.xml’ for reading: Permission denied
-
解决思路
- 从日志文件中可以看出肯定是server.xml这个文件的问题
- 仔细发现是由于权限的问题,for reading: Permission denied在读的时候没有权限
- 既然初步判断是权限的问题,那么有两种解决方式: (1)将这个/etc/sqoop2/tomcat-conf.dist/conf/server.xml复制到/opt/cloudera/parcels/CDH-5.14.4-1.cdh5.14.4.p0.3/lib/sqoop2/路径下 (2)修改文件的权限,根据自己的实际情况改权限:进入到/etc/sqoop2/tomcat-conf.dist/conf/目录下,将server.xml权限改成777,chmod 777 server.xml
- 我只尝试了第二种,改完权限再回到CM管理界面去试着安装并启动sqoop能否正常启动;
- 就是因为权限的问题,sqoop需要cp server.xml这个文件,所以改完权限后一切能正常启动。
-
解决结果
- 问题顺利解决,这个问题卡了好久,反正sqoop怎么安装都是启动失败,都无语了,经过别人的一番指点后自己尝试后成功了莫名的开心;
- 但是也是自己太粗心,出问题一定要先看日志文件,因为其实大多数问题的答案就在日志文件里面
- 继续加油,每天进步一点点!!!
2019-05-0514:31:07