Describe the bug
When I run amplify mock
, after a few seconds the following error is returned:
Failed to start API Mock endpoint Error: max retries hit for starting dynamodb emulator
and hangs indefinitely.
To Reproduce
Steps to reproduce the behavior:
amplify mock
at the root directory. Expected behavior
The command completes successfully and instructs the user on how to access the mock UI.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
npm start
to run the side locally, and all other amplify commands seem to be working properly.
Hey @keenode
I think this is related to this issue : https://github.com/aws-amplify/amplify-cli/issues/2037
Can you try installing lsof ?
Should be fixed with : https://github.com/aws-amplify/amplify-cli/pull/2061
@rakannimer Unfortunately, I've seen those other issues and have lsof installed already. :(
Still getting the error. Any ideas?
Thanks for the help so far!
@keenode do you have Java installed on your machine? Mock uses DynamoDBLocal internally which is a java package and not having Java would cause this to fail.
Could you try running which java
and see if there is Java installed on your machine
Hi @yuth
Yes, I have had a version of java installed on my machine. I ran the command and it is located here:
/usr/bin/java
This is the version of Java I'm on:
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
Hello all!
I am also receiving this message. Similar java version to above.
Any further suggestions are appreciated.
Thanks!
Fixed!
brew cask install java
worked for me.
@BryceAMcDaniel The brew install for java worked for me as well!
Thank you so much! :)
This is not a user error. The error message should be fixed so that others will not run into the same issue.
this is still an issue in 4.26.0. See more info in #4670
Most helpful comment
Fixed!
brew cask install java
worked for me.