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

The spark daemon shell script error, daemon process start successfully but script output fail message.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.1, 1.6.2, 2.0.0, 2.1.0
    • Fix Version/s: 2.0.0
    • Component/s: Deploy
    • Labels:
    • Flags:
      Patch

      Description

      When using sbin/start-master.sh to start spark master daemon, sometimes the daemon service started successfully, but the shell script print error message such as:
      failed to launch org.apache.spark.deploy.master.Master...
      it makes me confused.

      This bug is because, sbin/spark-daemon.sh script use bin/spark-class shell to start daemon, then sleep 2s and check whether the daemon process exists, using shell script like following:
      if [[ ! $(ps -p "$newpid" -o comm=) =~ "java" ]]
      the problem is, some machine with bad performance may start the daemon using a long time(exceeding 2s), but still can start daemon successfully, but in this case, the shell script judgement ! $(ps -p "$newpid" -o comm=) =~ "java" will fail, because at this time, the $newpid process is still shell process, until the daemon started, it turns into java process.

        Attachments

          Activity

            People

            • Assignee:
              WeichenXu123 Weichen Xu
              Reporter:
              WeichenXu123 Weichen Xu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified