'EMR Steps that should takes seconds are taking minutes

I am running a number of very very simple steps on my EMR Cluster. One such step is creating an hbase table like such:

step.json

{
    "Name": "Create table command",
    "Type": "CUSTOM_JAR",
    "ActionOnFailure": "CONTINUE",
    "Jar": "command-runner.jar",
    "Args":
    [
        "bash",
        "-c",
        "echo create \\'myTable\\', \\'a\\' > create_table.txt; hbase shell -n create_table.txt;"
    ]
}

and the command should take about 0.5s to execute but the step is running for longer than 18min right now. The command has executed though. I see in the stdout logfile that it happened:

stdout

Created table factuserdatastep-echo
Took 4.8382 seconds
Hbase::Table - factuserdatastep-echo

And I can verify in the shell that everything is as intended. But the steps just won't terminate. The controller is stuck on this:

controller

...
INFO ProcessRunner started child process 26901
2021-12-14T15:05:45.305Z INFO HadoopJarStepRunner.Runner: startRun() called for s-34LXK66Z Child Pid: 26901
INFO Synchronously wait child process to complete : hadoop jar /var/lib/aws/emr/step-runner/hadoop-...

I am not sure what is taking so long does anyone have an idea why the step won't terminate?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source