生产环境新增几个节点,安装pxf后,启动时报错
stderr:
Traceback (most recent call last):File "/var/lib/ambari-agent/cache/common-services/PXF/3.0.0/package/scripts/pxf.py", line 120, in <module>Pxf().execute()File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in executemethod(env)File "/var/lib/ambari-agent/cache/common-services/PXF/3.0.0/package/scripts/pxf.py", line 53, in startself.__execute_service_command("restart")File "/var/lib/ambari-agent/cache/common-services/PXF/3.0.0/package/scripts/pxf.py", line 71, in __execute_service_commandlogoutput=True)File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__self.env.run()File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in runself.run_action(resource, action)File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_actionprovider_action()File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 238, in action_runtries=self.resource.tries, try_sleep=self.resource.try_sleep)File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in innerresult = function(command, **kwargs)File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_calltries=tries, try_sleep=try_sleep)File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapperresult = _call(command, **kwargs_copy)File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _callraise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of 'service pxf-service restart' returned 1. /var/pxf /
$CATALINA_PID was set but the specified file does not exist. Is Tomcat running? Stop aborted.
/var/pxf /var/pxf /
Tomcat started.
/var/pxf /
Checking if tomcat is up and running...
tomcat not responding, re-trying after 1 second (attempt number 1)
tomcat not responding, re-trying after 1 second (attempt number 2)
Checking if PXF webapp is up and running...
ERROR: PXF webapp is inaccessible but tomcat is up. Check logs for more information
解决方案,查看catalina.log发现找不到引用Jar包
Jun 19, 2017 1:01:26 PM org.apache.hawq.pxf.service.utilities.CustomWebappLoader addRepositories
WARNING: Failed to load entry /usr/phd/current/hadoop-hdfs-client/hadoop-hdfs.jar: java.nio.file.NoSuchFileException: /usr/phd/current/hadoop-hdfs-client
Jun 19, 2017 1:01:26 PM org.apache.hawq.pxf.service.utilities.CustomWebappLoader addRepositories
WARNING: Entry /usr/phd/current/hadoop-hdfs-client/hadoop-hdfs.jar doesn't match any files
Jun 19, 2017 1:01:26 PM org.apache.hawq.pxf.service.utilities.CustomWebappLoader addRepositories
WARNING: Failed to load entry /usr/phd/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core.jar: java.nio.file.NoSuchFileException: /usr/phd/current/hadoop-mapreduce-client
Jun 19, 2017 1:01:26 PM org.apache.hawq.pxf.service.utilities.CustomWebappLoader addRepositories
WARNING: Entry /usr/phd/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core.jar doesn't match any files
Jun 19, 2017 1:01:26 PM org.apache.hawq.pxf.service.utilities.CustomWebappLoader addRepositories
WARNING: Failed to load entry /usr/phd/current/hadoop-client/hadoop-auth.jar: java.nio.file.NoSuchFileException: /usr/phd/current/hadoop-client
Jun 19, 2017 1:01:26 PM org.apache.hawq.pxf.service.utilities.CustomWebappLoader addRepositories
WARNING: Entry /usr/phd/current/hadoop-client/hadoop-auth.jar doesn't match any files
Jun 19, 2017 1:01:26 PM org.apache.hawq.pxf.service.utilities.CustomWebappLoader addRepositories
WARNING: Failed to load entry /usr/phd/current/hadoop-client/hadoop-common.jar: java.nio.file.NoSuchFileException: /usr/phd/current/hadoop-client
Jun 19, 2017 1:01:26 PM org.apache.hawq.pxf.service.utilities.CustomWebappLoader addRepositories
WARNING: Entry /usr/phd/current/hadoop-client/hadoop-common.jar doesn't match any files
Jun 19, 2017 1:01:26 PM org.apache.hawq.pxf.service.utilities.CustomWebappLoader addRepositories
WARNING: Failed to load entry /usr/phd/current/hadoop-client/lib/asm-*[0-9].jar: java.nio.file.NoSuchFileException: /usr/phd/current/hadoop-client/lib
Jun 19, 2017 1:01:26 PM org.apache.hawq.pxf.service.utilities.CustomWebappLoader addRepositories
WARNING: Entry /usr/phd/current/hadoop-client/lib/asm-*[0-9].jar doesn't match any files
明明jar包位置是在/usr/hdp/current/….下,查找从哪里引用了错误的路径。发现 /etc/pxf/conf/下 pxf-private.classpath文件路径正是报错的路径,修改替换掉问题解决。启动PXF成功。