<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Spark produces no logs in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-produces-no-logs/m-p/59639#M67682</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running CDH 5.12 QuickStart VM with package installation (no parcels, and no CM).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't get Spark to produce application logs in the designated HDFS directory, and consequently nothing is displayed by Spark History Server.&amp;nbsp; My Spark jobs run as part of an Oozie workflow, but no Spark logs are produced.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My&amp;nbsp; &lt;EM&gt;/etc/spark/conf/spark-defaults.conf&lt;/EM&gt; contains:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;spark.eventLog.enabled            true
spark.eventLog.dir                hdfs:///user/spark/applicationHistory
spark.history.fs.logDirectory     hdfs:///user/spark/applicationHistory
spark.yarn.historyServer.address  http://quickstart.cloudera:18088&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The HDFS log directory has the following permissions:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;$sudo -u hdfs  hadoop fs -ls /user/spark
Found 1 items
drwxrwxrwt   - spark spark          0 2017-09-06 13:31 /user/spark/applicationHistory&lt;/PRE&gt;&lt;P&gt;The Oozie Spark Task runs on Yarn, and it is defined as:&lt;/P&gt;&lt;PRE&gt;&amp;lt;spark xmlns="uri:oozie:spark-action:0.1"&amp;gt;

		&amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;
		&amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;
		&amp;lt;master&amp;gt;yarn&amp;lt;/master&amp;gt;
		&amp;lt;mode&amp;gt;cluster&amp;lt;/mode&amp;gt;
		....
&amp;lt;/spark&amp;gt;&lt;/PRE&gt;&lt;P&gt;The Oozie workflow runs correctly, and I can see the logs in the Yarn History Server, and in Hue's Oozie Dashboard. However the Spark History Server shows this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;History Server

    Event log directory: hdfs:///user/spark/applicationHistory

No completed applications found!

Did you specify the correct logging directory? Please verify your setting of spark.history.fs.logDirectory and whether you have the permissions to access it.
It is also possible that your application did not run to completion or did not stop the SparkContext. &lt;/PRE&gt;&lt;P&gt;The HDFS directory&lt;EM&gt; /user/spark/applicationHistory &lt;/EM&gt;is empty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have looked everywhere in the documentation, specifically here: &lt;A href="https://www.cloudera.com/documentation/enterprise/5-11-x/topics/admin_spark_history_server.html,&amp;nbsp;" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-11-x/topics/admin_spark_history_server.html,&amp;nbsp;&lt;/A&gt; but I have not been able to find a solution, please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Alex Soto&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 12:12:01 GMT</pubDate>
    <dc:creator>yeyo</dc:creator>
    <dc:date>2022-09-16T12:12:01Z</dc:date>
    <item>
      <title>Spark produces no logs</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-produces-no-logs/m-p/59639#M67682</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running CDH 5.12 QuickStart VM with package installation (no parcels, and no CM).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't get Spark to produce application logs in the designated HDFS directory, and consequently nothing is displayed by Spark History Server.&amp;nbsp; My Spark jobs run as part of an Oozie workflow, but no Spark logs are produced.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My&amp;nbsp; &lt;EM&gt;/etc/spark/conf/spark-defaults.conf&lt;/EM&gt; contains:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;spark.eventLog.enabled            true
spark.eventLog.dir                hdfs:///user/spark/applicationHistory
spark.history.fs.logDirectory     hdfs:///user/spark/applicationHistory
spark.yarn.historyServer.address  http://quickstart.cloudera:18088&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The HDFS log directory has the following permissions:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;$sudo -u hdfs  hadoop fs -ls /user/spark
Found 1 items
drwxrwxrwt   - spark spark          0 2017-09-06 13:31 /user/spark/applicationHistory&lt;/PRE&gt;&lt;P&gt;The Oozie Spark Task runs on Yarn, and it is defined as:&lt;/P&gt;&lt;PRE&gt;&amp;lt;spark xmlns="uri:oozie:spark-action:0.1"&amp;gt;

		&amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;
		&amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;
		&amp;lt;master&amp;gt;yarn&amp;lt;/master&amp;gt;
		&amp;lt;mode&amp;gt;cluster&amp;lt;/mode&amp;gt;
		....
&amp;lt;/spark&amp;gt;&lt;/PRE&gt;&lt;P&gt;The Oozie workflow runs correctly, and I can see the logs in the Yarn History Server, and in Hue's Oozie Dashboard. However the Spark History Server shows this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;History Server

    Event log directory: hdfs:///user/spark/applicationHistory

No completed applications found!

Did you specify the correct logging directory? Please verify your setting of spark.history.fs.logDirectory and whether you have the permissions to access it.
It is also possible that your application did not run to completion or did not stop the SparkContext. &lt;/PRE&gt;&lt;P&gt;The HDFS directory&lt;EM&gt; /user/spark/applicationHistory &lt;/EM&gt;is empty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have looked everywhere in the documentation, specifically here: &lt;A href="https://www.cloudera.com/documentation/enterprise/5-11-x/topics/admin_spark_history_server.html,&amp;nbsp;" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-11-x/topics/admin_spark_history_server.html,&amp;nbsp;&lt;/A&gt; but I have not been able to find a solution, please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Alex Soto&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:12:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-produces-no-logs/m-p/59639#M67682</guid>
      <dc:creator>yeyo</dc:creator>
      <dc:date>2022-09-16T12:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Spark produces no logs</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-produces-no-logs/m-p/59720#M67683</link>
      <description>&lt;P&gt;In case it helps others:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file &lt;EM&gt;/etc/spark/conf/spark-defaults.conf&lt;/EM&gt;&amp;nbsp; is not used by Oozie Spark Actions by default.&amp;nbsp; In order to tell Oozie Spark Action to use this file, I had to add this to /etc/oozie/conf/oozie-site.xml&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;property&amp;gt;
   &amp;lt;name&amp;gt;oozie.service.SparkConfigurationService.spark.configurations&amp;lt;/name&amp;gt;
   &amp;lt;value&amp;gt;*=/etc/spark/conf/&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;Now I can see the logs in the Spark History Server.&amp;nbsp; I wonder why this should be the default.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 15:59:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-produces-no-logs/m-p/59720#M67683</guid>
      <dc:creator>yeyo</dc:creator>
      <dc:date>2017-09-08T15:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Spark produces no logs</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-produces-no-logs/m-p/59727#M67684</link>
      <description>&lt;P&gt;Not sure if this it the correct solution.&amp;nbsp; I am not able to see my Tasks logs, I only see the Spark logs (driver and tasks) but not my application logs.&amp;nbsp; Anything I log from within a closure is not whowing.&amp;nbsp; I tried configuring the log4j.properties file in the &lt;EM&gt;/etc/spark/conf/log4j.properties &lt;/EM&gt;but it doesn't seem to make a difference.&amp;nbsp; The only sucess I had so far was to get the History Server to show something.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 18:57:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-produces-no-logs/m-p/59727#M67684</guid>
      <dc:creator>yeyo</dc:creator>
      <dc:date>2017-09-08T18:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Spark produces no logs</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-produces-no-logs/m-p/93581#M67685</link>
      <description>&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did u checked in Oozie Configuration or in oozie logs like whether the Event logs are writing in some other path apart from the path that was configured in CM?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AKR&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 14:08:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-produces-no-logs/m-p/93581#M67685</guid>
      <dc:creator>AKR</dc:creator>
      <dc:date>2019-07-31T14:08:36Z</dc:date>
    </item>
  </channel>
</rss>

