<?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: spark continously running with exit code 1 in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/spark-continously-running-with-exit-code-1/m-p/378108#M243425</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you want to run the spark application using Standalone mode. Please follow the following steps:&lt;/P&gt;&lt;P&gt;1. Install the Apache Spark&lt;/P&gt;&lt;P&gt;2. Start the Standalone master and workers. By default master will start with port 7777. Try to access and Standalone UI and see all workers are running expected.&lt;/P&gt;&lt;P&gt;3. Once it is running as expected then submit spark application by specifying standalone master host with 7777&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2023 04:49:24 GMT</pubDate>
    <dc:creator>RangaReddy</dc:creator>
    <dc:date>2023-10-25T04:49:24Z</dc:date>
    <item>
      <title>spark continously running with exit code 1</title>
      <link>https://community.cloudera.com/t5/Support-Questions/spark-continously-running-with-exit-code-1/m-p/359359#M238091</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to apache spark so Im not sure if this is the best set up, my goal is to create an environment where I can test and evaluate before making decision. I set up cluster on Windows using the steps from:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://aamargajbhiye.medium.com/apache-spark-setup-a-multi-node-standalone-cluster-on-windows-63d413296971" target="_blank" rel="noopener"&gt;https://aamargajbhiye.medium.com/apache-spark-setup-a-multi-node-standalone-cluster-on-windows-63d413296971&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The cluster version Im using is the latest: 3.3.1\Hadoop 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The master node is starting without an issue and Im able to register the workers on each worker node using the following comand:&lt;/P&gt;&lt;P&gt;spark-class org.apache.spark.deploy.worker.Worker spark://&amp;lt;Master-IP&amp;gt;:7077 --host &amp;lt;Worker-IP&amp;gt;&lt;/P&gt;&lt;P&gt;When I register the worker , its able to connect and register successfully as the message indicates , and Im able to see both workers in the US with the ALIVE status.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I tried submitting&amp;nbsp; simple&amp;nbsp; hello_world py job using:&lt;/P&gt;&lt;P&gt;spark-submit --master spark://&amp;lt;Master-IP&amp;gt;:7077 hello_world.py&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My hello_world.py application is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;spark=SparkSession.builder.appName("Hello World").getOrCreate()
print("Hello From Spark!")  
sparkContext=spark.sparkContext
rdd=sparkContext.parallelize([1,2,3])
print(rdd.collect())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What happens when I submit the job is that spark will continuously try to create different executors as if its retrying&amp;nbsp; but they all exit with code 1, and I have to kill it in order to stop.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I check the UI and I click on a given executor I see the following in the stdout &amp;amp; std err:&lt;/P&gt;&lt;P&gt;stdout:&lt;/P&gt;&lt;PRE&gt;22/12/12 08:04:11 INFO CoarseGrainedExecutorBackend: Started daemon with process name: 6544@HOU12-FSRM01
22/12/12 08:04:11 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
22/12/12 08:04:11 INFO SecurityManager: Changing view acls to: vnetadmin
22/12/12 08:04:11 INFO SecurityManager: Changing modify acls to: vnetadmin
22/12/12 08:04:11 INFO SecurityManager: Changing view acls groups to: 
22/12/12 08:04:11 INFO SecurityManager: Changing modify acls groups to: 
22/12/12 08:04:11 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users  with view permissions: Set(vnetadmin); groups with view permissions: Set(); users  with modify permissions: Set(vnetadmin); groups with modify permissions: Set()&lt;/PRE&gt;&lt;P&gt;stderr:&lt;/P&gt;&lt;PRE&gt;sing Spark's default log4j profile: org/apache/spark/log4j2-defaults.properties
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
	....
Caused by: org.apache.spark.SparkException: Exception thrown in awaitResult: 
	at org.apache.spark.util.ThreadUtils$.awaitResult(ThreadUtils.scala:301)
	at org.apache.spark.rpc.RpcTimeout.awaitResult(RpcTimeout.scala:75)
	at org.apache.spark.rpc.RpcEnv.setupEndpointRefByURI(RpcEnv.scala:102)
	at Caused by: java.io.IOException: Failed to connect to &amp;lt;Master DNS&amp;gt;/&amp;lt;Master IP&amp;gt;:56526
	at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:288)
	.....
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: &amp;lt;Master DNS&amp;gt;/&amp;lt;Master IP&amp;gt;:56526
Caused by: java.net.ConnectException: Connection refused: no further information
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:715)
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
	....&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure how to fix the error above. I tried opening the referenced port "Failed to connect to &amp;lt;Master DNS&amp;gt;/&amp;lt;Master IP&amp;gt;:&lt;STRONG&gt;56526&lt;/STRONG&gt;" from the master node but every time it shows a different port.&lt;/P&gt;&lt;P&gt;Note sure what else I can do or how to troubleshoot.&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 14:40:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/spark-continously-running-with-exit-code-1/m-p/359359#M238091</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2022-12-12T14:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: spark continously running with exit code 1</title>
      <link>https://community.cloudera.com/t5/Support-Questions/spark-continously-running-with-exit-code-1/m-p/378108#M243425</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you want to run the spark application using Standalone mode. Please follow the following steps:&lt;/P&gt;&lt;P&gt;1. Install the Apache Spark&lt;/P&gt;&lt;P&gt;2. Start the Standalone master and workers. By default master will start with port 7777. Try to access and Standalone UI and see all workers are running expected.&lt;/P&gt;&lt;P&gt;3. Once it is running as expected then submit spark application by specifying standalone master host with 7777&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 04:49:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/spark-continously-running-with-exit-code-1/m-p/378108#M243425</guid>
      <dc:creator>RangaReddy</dc:creator>
      <dc:date>2023-10-25T04:49:24Z</dc:date>
    </item>
  </channel>
</rss>

