Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-19900

[Standalone] Master registers application again when driver relaunched

    XMLWordPrintableJSON

Details

    Description

      I've found some problems when node, where driver is running, has unstable network. A situation is possible when two identical applications are running on a cluster.

      Steps to Reproduce:

      1. prepare 3 node. One for the spark master and two for the spark workers.
      2. submit an application with parameter spark.driver.supervise = true
      3. go to the node where driver is running (for example spark-worker-1) and close 7077 port
        # iptables -A OUTPUT -p tcp --dport 7077 -j DROP
        
      4. wait more 60 seconds
      5. look at the spark master UI
        There are two spark applications and one driver. The new application has WAITING state and the second application has RUNNING state. Driver has RUNNING or RELAUNCHING state (It depends on the resources available, as I understand it) and it launched on other node (for example spark-worker-2)
      6. open the port
        # iptables -D OUTPUT -p tcp --dport 7077 -j DROP
        
      7. look an the spark UI again
        There are no changes

      In addition, if you look at the processes on the node spark-worker-1

      # ps ax | grep spark
      

      you will see that the old driver is still working!

      Spark master logs:

      17/03/10 05:26:27 WARN Master: Removing worker-20170310052240-spark-worker-1-35039 because we got no heartbeat in 60 seconds
      17/03/10 05:26:27 INFO Master: Removing worker worker-20170310052240-spark-worker-1-35039 on spark-worker-1:35039
      17/03/10 05:26:27 INFO Master: Telling app of lost executor: 1
      17/03/10 05:26:27 INFO Master: Telling app of lost executor: 0
      17/03/10 05:26:27 INFO Master: Re-launching driver-20170310052347-0000
      17/03/10 05:26:27 INFO Master: Launching driver driver-20170310052347-0000 on worker worker-20170310052411-spark-worker-2-40473
      17/03/10 05:26:35 INFO Master: Registering app TestApplication
      17/03/10 05:26:35 INFO Master: Registered app TestApplication with ID app-20170310052635-0001
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got status update for unknown executor app-20170310052354-0000/1
      17/03/10 05:31:07 WARN Master: Got status update for unknown executor app-20170310052354-0000/0
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 WARN Master: Got heartbeat from unregistered worker worker-20170310052240-spark-worker-1-35039. Asking it to re-register.
      17/03/10 05:31:07 INFO Master: Registering worker spark-worker-1:35039 with 8 cores, 10.8 GB RAM
      17/03/10 05:31:07 INFO Master: Launching executor app-20170310052354-0000/4 on worker worker-20170310052240-spark-worker-1-35039
      17/03/10 05:31:07 INFO Master: Launching executor app-20170310052354-0000/5 on worker worker-20170310052240-spark-worker-1-35039
      

      I expect the following behaviour:

      1. when the driver is relaunching it should not create a new application or the old application should be removed
      2. the process with old driver should be killed

      Correct me please if I do not understand something or I missed some settings.

      Attachments

        Activity

          People

            lyc Li Yichao
            Ssergey Sergey
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: