serverless-dynamodb-local: Unable to start DynamoDB Local process!
Any help/idea would be very much appreciated, I’m new to all this serverless thing and want to learn. Thank you in advance!
Actual Behaviour
I’m unable to start DynamoDB locally and general error: Unable to start DynamoDB Local process!, I followed the steps in multiple tutorials, none will make it start.
Expected Behaviour
DynamoDB should be running smoothly on port 8000
Steps to reproduce it
Running the commands “sls dynamodb install” and “sls dynamodb start -p 8000”
LogCat for the issue
`Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command create Serverless: Load command install Serverless: Load command package Serverless: Load command deploy Serverless: Load command deploy:function Serverless: Load command deploy:list Serverless: Load command deploy:list:functions Serverless: Load command invoke Serverless: Load command invoke:local Serverless: Load command info Serverless: Load command logs Serverless: Load command metrics Serverless: Load command print Serverless: Load command remove Serverless: Load command rollback Serverless: Load command rollback:function Serverless: Load command slstats Serverless: Load command plugin Serverless: Load command plugin Serverless: Load command plugin:install Serverless: Load command plugin Serverless: Load command plugin:uninstall Serverless: Load command plugin Serverless: Load command plugin:list Serverless: Load command plugin Serverless: Load command plugin:search Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command rollback Serverless: Load command rollback:function Serverless: Load command create_domain Serverless: Load command delete_domain Serverless: Load command dynamodb Serverless: Load command dynamodb:migrate Serverless: Load command dynamodb:seed Serverless: Load command dynamodb:start Serverless: Load command dynamodb:noStart Serverless: Load command dynamodb:remove Serverless: Load command dynamodb:install Serverless: Load command offline Serverless: Load command offline:start Serverless: Invoke dynamodb:start
Error --------------------------------------------------
Unable to start DynamoDB Local process!
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Stack Trace --------------------------------------------
Error: Unable to start DynamoDB Local process! at Object.start (/Users/alexraducu/work/serverless/ssr-react-next/node_modules/dynamodb-localhost/dynamodb/starter.js:45:19) at Object.start (/Users/alexraducu/work/serverless/ssr-react-next/node_modules/dynamodb-localhost/index.js:20:32) at ServerlessDynamodbLocal.startHandler (/Users/alexraducu/work/serverless/ssr-react-next/node_modules/serverless-dynamodb-local/index.js:226:25) at BbPromise.reduce (/Users/alexraducu/.node/lib/node_modules/serverless/lib/classes/PluginManager.js:400:55) From previous event: at PluginManager.invoke (/Users/alexraducu/.node/lib/node_modules/serverless/lib/classes/PluginManager.js:400:22) at PluginManager.run (/Users/alexraducu/.node/lib/node_modules/serverless/lib/classes/PluginManager.js:431:17) at variables.populateService.then.then (/Users/alexraducu/.node/lib/node_modules/serverless/lib/Serverless.js:114:33) at processImmediate (timers.js:632:19) at process.topLevelDomainCallback (domain.js:120:23) From previous event: at Serverless.run (/Users/alexraducu/.node/lib/node_modules/serverless/lib/Serverless.js:101:6) at serverless.init.then (/Users/alexraducu/.node/lib/node_modules/serverless/bin/serverless:43:28) at /Users/alexraducu/.node/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:111:16 at /Users/alexraducu/.node/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:45:10 at FSReqCallback.args [as oncomplete] (fs.js:147:20) From previous event: at initializeErrorReporter.then (/Users/alexraducu/.node/lib/node_modules/serverless/bin/serverless:43:6) at processImmediate (timers.js:632:19) at process.topLevelDomainCallback (domain.js:120:23) From previous event: at /Users/alexraducu/.node/lib/node_modules/serverless/bin/serverless:28:46 at Object.<anonymous> (/Users/alexraducu/.node/lib/node_modules/serverless/bin/serverless:67:4) at Module._compile (internal/modules/cjs/loader.js:721:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:732:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:560:12) at Function.Module._load (internal/modules/cjs/loader.js:552:3) at Function.Module.runMain (internal/modules/cjs/loader.js:774:12) at executeUserCode (internal/bootstrap/node.js:342:17) at startExecution (internal/bootstrap/node.js:276:5) at startup (internal/bootstrap/node.js:227:5) at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Issues: forum.serverless.com
Your Environment Information ----------------------------- OS: darwin Node Version: 11.6.0 Serverless Version: 1.37.1`
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 32 (2 by maintainers)
0.2.35 worked for me only after removing the latest version and then running through the complete setup again:
Also perhaps worth noting that if the java sdk isn’t installed, an error will occur with a link just to java and not the sdk and so installing it will not help. Google java sdk for latest versions/OS.
In case you want to use the latest version (0.2.36) check this issue https://github.com/99xt/serverless-dynamodb-local/issues/195.
after upgrading running the install command like this fixed the issue for me (on MacOS)
sls dynamodb install --localPath ./bin
Reverting to 0.2.30 has for me fixed the issue
this worked for me:
is exist error with version 0.2.36 serverless-dynamodb-local, then install:
Steps:
npm install serverless-dynamodb-local@0.2.35
sls dynamodb install
sls offline start
Guys, I’ve tried all solutions but didn’t work for me, what works is installing JRE (Java Runtime Engine). DynamoDB local requires Java Runtime Engine version 6.x or newer. Make sure u have installed JRE (Java Runtime Engine) on your machine.
don’t forget to run “sls dynamodb install” before running “sls offline start”
I confirm above worked… used npm …
@jeremiahlukus that would have been tough since I had no idea what the problem was beyond “the new version is broken” and it feels like it would’ve been bad form for a PR to just say “delete everything since the last version” 😉
Luckily for both of us @shalithasuranga already has submitted a pull request, #215, which I think aims to fix this issue via the solution found in issue #195 . Now we’ll just wait and see if it gets merged in and released to NPM…
dynamodb/utils.js:absPath()
in thedynamodb-localhost@0.0.5
package caused this issue“0.2.36” is using older version
0.0.5
ofdynamodb-localhost
, whereas “0.2.35” is usingdynamodb-localhost@0.0.6
the workaround would be update your
package.json
@uccmen java version “1.8.0_211” Java™ SE Runtime Environment (build 1.8.0_211-b12) Java HotSpot™ Client VM (build 25.211-b12, mixed mode, sharing)
I fixed the problem with installing openjdk. I missed reading plugin requirements. 😕
Please try new version
0.2.37
. The issue was fixed@zackzachariah #215 will be merged and npm module will be updated asap 👍
It was something else on my side. The
utils.absPath()
indynamodb-localhost
always does this:When I launch
sls dynamodb install
from the VS code terminal, thepath
passed down is already an absolute path. Theinstall
command then just silently does nothing.I fixed the
absPath()
to be a little more intelligent but it’s already fixed in thedynamodb-localhost
as of 0.0.6. The latest version ofserverless-dynamodb-local
seems to install 0.0.5. I forced the latest using yarn’s resolutions and it now installs and starts just fine: