localstack-samples / localstack-samples/localstack-pro-samples

Permission Denied issue when creating an emr cluster

Open
#251 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
196
Forks
65
PR merge metrics
No merged PRs in 30d

Description

I have got my trials localstack pro license and I could start localstack without any issue.

When I was trying the happy path of running emr steps within an EMR cluster under localstack I saw that all of them failed right away. (No log got generated for the EMR steps). So I looked back to the logs of localstack container and found this line during the creation of an EMR cluster:
Unable to start up EMR cluster: [Errno 13] Permission denied: '/var/lib/localstack/lib/hive/2.3.9/bin/schematool'

This is the simple script I ran to create the EMR cluster:

awslocal emr create-cluster \
 --name "test-emr" \
 --log-uri "s3://test-local/logs" \
 --release-label "emr-6.11.0" \
 --instance-groups '[{"InstanceCount":2,"InstanceGroupType":"CORE","Name":"keith-core","InstanceType":"c4.large","EbsConfiguration":{"EbsBlockDeviceConfigs":[{"VolumeSpecification":{"VolumeType":"gp2","SizeInGB":50},"VolumesPerInstance":1}],"EbsOptimized":true}},{"InstanceCount":1,"InstanceGroupType":"MASTER","Name":"test-master","InstanceType":"c4.large","EbsConfiguration":{"EbsBlockDeviceConfigs":[{"VolumeSpecification":{"VolumeType":"gp2","SizeInGB":32},"VolumesPerInstance":2}]}}]' \
 --applications Name=Spark \
 --scale-down-behavior "TERMINATE_AT_TASK_COMPLETION" \
 --ebs-root-volume-size "50" \
 --auto-termination-policy '{"IdleTimeout":10800}' \
 --region "us-east-2"

Can anyone suggest what could possibly go wrong? Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided awslocal emr create-cluster command and inspect the LocalStack container log for the schematool permission error. Trace the EMR cluster startup path involving /var/lib/localstack/lib/hive/2.3.9/bin/schematool. Done means the cluster starts successfully and its EMR steps generate logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, shell
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.