<?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 Re: Exit code -1: Invalid mount on running spark with docker and yarn in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Exit-code-1-Invalid-mount-on-running-spark-with-docker-and/m-p/352329#M236492</link>
    <description>&lt;P&gt;Apparently, having multiple directories for yarn and yarn logs causes a misconfiguration when writing the yarn-site.xml file.&lt;BR /&gt;&lt;BR /&gt;The solution is to go to cloudera manager -&amp;gt; yarn -&amp;gt; Configuration&lt;/P&gt;&lt;P&gt;then search for yarn_service_config_safety_valve&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add a new one by pressing the plus sign on the right:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name:&amp;nbsp;yarn.nodemanager.runtime.linux.docker.default-rw-mounts&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Value:&amp;nbsp;/data01/yarn/nm:/data01/yarn/nm,/data02/yarn/nm:/data02/yarn/nm,/data03/yarn/nm:/data03/yarn/nm,/data04/yarn/nm:/data04/yarn/nm,/data01/yarn/container-logs:/data01/yarn/container-logs,/data02/yarn/container-logs:/data02/yarn/container-logs,/data03/yarn/container-logs:/data03/yarn/container-logs,/data04/yarn/container-logs:/data04/yarn/container-logs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course you have to specify the directories as what fits your configs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 12:26:58 GMT</pubDate>
    <dc:creator>MLOpsEngineer</dc:creator>
    <dc:date>2022-09-15T12:26:58Z</dc:date>
    <item>
      <title>Exit code -1: Invalid mount on running spark with docker and yarn</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Exit-code-1-Invalid-mount-on-running-spark-with-docker-and/m-p/349878#M235806</link>
      <description>&lt;P&gt;Hello everyone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to train a ML model on a cluster by using a docker image and spark-submit with yarn.&lt;/P&gt;&lt;P&gt;I already tried to follow this process before on a training cluster I made and I succeeded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I run it this time, yarn prompts that one of the mounts is invalid.&lt;/P&gt;&lt;P&gt;Of course I tried with Kerborise and without, both didn't work and both runs didn't imply any problems related to connection so we are good from this side.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is what I tried:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;spark-submit \&lt;BR /&gt;--master yarn \&lt;BR /&gt;--deploy-mode cluster \&lt;BR /&gt;--conf spark.yarn.appMasterEnv.YARN_CONTAINER_RUNTIME_TYPE=docker \&lt;BR /&gt;--conf spark.yarn.appMasterEnv.YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=image:v1 \&lt;BR /&gt;--conf spark.yarn.appMasterEnv.YARN_CONTAINER_RUNTIME_DOCKER_MOUNTS="/etc/passwd:/etc/passwd:ro,/etc/hadoop:/etc/hadoop:ro,/opt/cloudera/parcels/:/opt/cloudera/parcels/:ro,/data01/yarn/nm/:/data01/yarn/nm/:ro,/data02/yarn/nm/:/data02/yarn/nm/:ro,/data03/yarn/nm/:/data03/yarn/nm/:ro,/etc/krb5.conf:/etc/krb5.conf:ro" \&lt;BR /&gt;--conf spark.executorEnv.YARN_CONTAINER_RUNTIME_TYPE=docker \&lt;BR /&gt;--conf spark.executorEnv.YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=image:v1 \&lt;BR /&gt;--conf spark.executorEnv.YARN_CONTAINER_RUNTIME_DOCKER_MOUNTS="/etc/passwd:/etc/passwd:ro,/etc/hadoop:/etc/hadoop:ro,/opt/cloudera/parcels/:/opt/cloudera/parcels/:ro,/data01/yarn/nm/:/data01/yarn/nm/:ro,/data02/yarn/nm/:/data02/yarn/nm/:ro,/data03/yarn/nm/:/data03/yarn/nm/:ro,/etc/krb5.conf:/etc/krb5.conf:ro" \&lt;BR /&gt;modeling.py&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And this is the results I got:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2022-08-10 17:43:17,694 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl: Application application_1658823376901_2680 failed 2 times due to AM Container for appattempt_1658823376901_2680_000002 exited with exitCode: -1&lt;BR /&gt;Failing this attempt.Diagnostics: [2022-08-10 17:43:17.686]Exception from container-launch.&lt;BR /&gt;Container id: container_e43_1658823376901_2680_02_000001&lt;BR /&gt;Exit code: -1&lt;BR /&gt;Exception message: Invalid mount : /data03/yarn/nm&lt;BR /&gt;Shell error output: &amp;lt;unknown&amp;gt;&lt;BR /&gt;Shell output: &amp;lt;unknown&amp;gt;&lt;/P&gt;&lt;P&gt;[2022-08-10 17:43:17.687]Container exited with a non-zero exit code -1.&lt;BR /&gt;[2022-08-10 17:43:17.687]Container exited with a non-zero exit code -1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;P.S: I followed all the instructions and documentations needed to run this. And made all the necessary configs. Like I said before I already ran this on another cluster.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 15:46:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Exit-code-1-Invalid-mount-on-running-spark-with-docker-and/m-p/349878#M235806</guid>
      <dc:creator>MLOpsEngineer</dc:creator>
      <dc:date>2022-08-10T15:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Exit code -1: Invalid mount on running spark with docker and yarn</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Exit-code-1-Invalid-mount-on-running-spark-with-docker-and/m-p/352329#M236492</link>
      <description>&lt;P&gt;Apparently, having multiple directories for yarn and yarn logs causes a misconfiguration when writing the yarn-site.xml file.&lt;BR /&gt;&lt;BR /&gt;The solution is to go to cloudera manager -&amp;gt; yarn -&amp;gt; Configuration&lt;/P&gt;&lt;P&gt;then search for yarn_service_config_safety_valve&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add a new one by pressing the plus sign on the right:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name:&amp;nbsp;yarn.nodemanager.runtime.linux.docker.default-rw-mounts&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Value:&amp;nbsp;/data01/yarn/nm:/data01/yarn/nm,/data02/yarn/nm:/data02/yarn/nm,/data03/yarn/nm:/data03/yarn/nm,/data04/yarn/nm:/data04/yarn/nm,/data01/yarn/container-logs:/data01/yarn/container-logs,/data02/yarn/container-logs:/data02/yarn/container-logs,/data03/yarn/container-logs:/data03/yarn/container-logs,/data04/yarn/container-logs:/data04/yarn/container-logs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course you have to specify the directories as what fits your configs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 12:26:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Exit-code-1-Invalid-mount-on-running-spark-with-docker-and/m-p/352329#M236492</guid>
      <dc:creator>MLOpsEngineer</dc:creator>
      <dc:date>2022-09-15T12:26:58Z</dc:date>
    </item>
  </channel>
</rss>

