failed to launch: nice -n 0 /bin/spark-class org.apache.spark.deploy.worker.W
程序员文章站
2022-03-24 11:02:54
...
启动hadoop报错
写道
starting org.apache.spark.deploy.master.Master, logging to /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.master.Master-1-hadoop01.out
hadoop01: starting org.apache.spark.deploy.worker.Worker, logging to /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-hadoop01.out
hadoop02: starting org.apache.spark.deploy.worker.Worker, logging to /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-hadoop02.out
hadoop03: starting org.apache.spark.deploy.worker.Worker, logging to /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-hadoop03.out
hadoop02: failed to launch: nice -n 0 /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://hadoop01:7077
hadoop02: full log in /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-hadoop02.out
hadoop03: failed to launch: nice -n 0 /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://hadoop01:7077
hadoop03: full log in /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-hadoop03.out
hadoop01: starting org.apache.spark.deploy.worker.Worker, logging to /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-hadoop01.out
hadoop02: starting org.apache.spark.deploy.worker.Worker, logging to /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-hadoop02.out
hadoop03: starting org.apache.spark.deploy.worker.Worker, logging to /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-hadoop03.out
hadoop02: failed to launch: nice -n 0 /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://hadoop01:7077
hadoop02: full log in /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-hadoop02.out
hadoop03: failed to launch: nice -n 0 /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://hadoop01:7077
hadoop03: full log in /export/servers/spark-2.2.3-bin-2.6.0-cdh5.15.1/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-hadoop03.out
解决方法:
写道
su root
vi /root/.bashrc
export JAVA_HOME=/opt/jdk1.8.0_171
vi /root/.bashrc
export JAVA_HOME=/opt/jdk1.8.0_171
添加JAVA_HOME,重启即可