Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission Denied issue when creating an emr cluster #251

Open
hereiskeith opened this issue Aug 27, 2024 · 1 comment
Open

Permission Denied issue when creating an emr cluster #251

hereiskeith opened this issue Aug 27, 2024 · 1 comment

Comments

@hereiskeith
Copy link

hereiskeith commented Aug 27, 2024

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

@alexrashed
Copy link
Contributor

alexrashed commented Aug 28, 2024

Hi @hereiskeith!
Usually issues concerning LocalStack are created in localstack/localstack. But we can try to tackle this here as well.
The issue you are describing looks like either something is off with the permissions.

  • How did you start LocalStack? Did you modify the permissions of LocalStack in any way?
  • Please explicitly pull the image you are using to make sure you are actually using the latest version of the Docker image (instead of a potentially outdated version on your machine).
  • Sometimes the on-demand download of the bigdata tools (for example hive) fails. We do provide a specific "bigdata" image which comes with all packages necessary for the bigdata services: localstack/localstack-pro:latest-bigdata
  • Could you try removing the localstack volume directory on your host machine? This removes the cache and restarts the on-demand download of these packages.

Please let us know if this helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants