serverless-dynamodb-local
serverless-dynamodb-local copied to clipboard
WSL2 Unable to start DynamoDB Local process!
I'm using vscode with wsl2 on windows11 sls dynamodb start
command gives an error
(shakemill) petr@DESKTOP-05VL79Q:~/shakemill/shakemill-api$ sls dynamodb start
Serverless: To ensure safe major version upgrades ensure "frameworkVersion" setting in service configuration (recommended setup: "frameworkVersion: ^2.64.1")
Serverless: Load command interactiveCli
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command config:tabcompletion
Serverless: Load command config:tabcompletion:install
Serverless: Load command config:tabcompletion:uninstall
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 upgrade
Serverless: Load command uninstall
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: Load command requirements
Serverless: Load command requirements:clean
Serverless: Load command requirements:install
Serverless: Load command requirements:cleanCache
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command generate-event
Serverless: Load command test
Serverless: Load command dashboard
Serverless: Load command output
Serverless: Load command output:get
Serverless: Load command output:list
Serverless: Load command param
Serverless: Load command param:get
Serverless: Load command param:list
Serverless: Load command studio
Serverless Warning --------------------------------------
A valid service attribute to satisfy the declaration 'self:provider.staticDomains.local' could not be found.
Serverless Warning --------------------------------------
A valid service attribute to satisfy the declaration 'self:provider.staticDomains.local' could not be found.
Serverless: Configuration warning at 'provider': unrecognized property 'staticDomains'
Serverless:
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
Serverless:
Serverless: Invoke dynamodb:start
Error ---------------------------------------------------
Error: Unable to start DynamoDB Local process!
at Object.start (/home/petr/shakemill/shakemill-api/node_modules/dynamodb-localhost/dynamodb/starter.js:52:19)
at Object.start (/home/petr/shakemill/shakemill-api/node_modules/dynamodb-localhost/index.js:20:32)
at ServerlessDynamodbLocal.startHandler (/home/petr/shakemill/shakemill-api/node_modules/serverless-dynamodb-local/index.js:264:29)
at PluginManager.runHooks (/home/petr/.nvm/versions/node/v16.13.0/lib/node_modules/serverless/lib/classes/PluginManager.js:573:41)
at PluginManager.invoke (/home/petr/.nvm/versions/node/v16.13.0/lib/node_modules/serverless/lib/classes/PluginManager.js:611:20)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async PluginManager.run (/home/petr/.nvm/versions/node/v16.13.0/lib/node_modules/serverless/lib/classes/PluginManager.js:672:7)
at async Serverless.run (/home/petr/.nvm/versions/node/v16.13.0/lib/node_modules/serverless/lib/Serverless.js:467:5)
at async /home/petr/.nvm/versions/node/v16.13.0/lib/node_modules/serverless/scripts/serverless.js:832:9
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 16.13.0
Framework Version: 2.64.1
Plugin Version: 5.5.0
SDK Version: 4.3.0
Components Version: 3.17.1
Error ---------------------------------------------------
Error: spawn java ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 16.13.0
Framework Version: 2.64.1
Plugin Version: 5.5.0
SDK Version: 4.3.0
Components Version: 3.17.1
Serverless: Deprecation warning: Variables resolver reports following resolution errors:
- Variable syntax error at "provider.stage": Invalid variable source at index 13 in "${opt:stage, "local", "dev"}"
From a next major this will be communicated with a thrown error.
Set "variablesResolutionMode: 20210326" in your service config, to adapt to new behavior now
More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER
/home/petr/.nvm/versions/node/v16.13.0/lib/node_modules/serverless/node_modules/essentials/index.js:12
throw reason;
^
[Error: ENOENT: no such file or directory, rename '/tmp/node-process-bac3/health-status' -> '/home/petr/.serverless/last-command-health-status'] {
errno: -2,
code: 'ENOENT',
syscall: 'rename',
path: '/tmp/node-process-bac3/health-status',
dest: '/home/petr/.serverless/last-command-health-status'
}
+1
root@HUAWEI:~/serverless/aws-node-express-dynamodb-api-project# sls dynamodb start
Running "serverless" from node_modules
Environment: linux, node 16.15.1, framework 3.22.0 (local) 3.22.0v (global), plugin 6.2.2, SDK 4.3.2
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
Error: Unable to start DynamoDB Local process!
at Object.start (/root/serverless/aws-node-express-dynamodb-api-project/node_modules/dynamodb-localhost/dynamodb/starter.js:52:19)
at Object.start (/root/serverless/aws-node-express-dynamodb-api-project/node_modules/dynamodb-localhost/index.js:20:32)
at ServerlessDynamodbLocal.startHandler (/root/serverless/aws-node-express-dynamodb-api-project/node_modules/serverless-dynamodb-local/index.js:264:29)
at PluginManager.runHooks (/root/serverless/aws-node-express-dynamodb-api-project/node_modules/serverless/lib/classes/plugin-manager.js:530:15)
at PluginManager.invoke (/root/serverless/aws-node-express-dynamodb-api-project/node_modules/serverless/lib/classes/plugin-manager.js:564:20)
at async PluginManager.run (/root/serverless/aws-node-express-dynamodb-api-project/node_modules/serverless/lib/classes/plugin-manager.js:604:7)
at async Serverless.run (/root/serverless/aws-node-express-dynamodb-api-project/node_modules/serverless/lib/serverless.js:174:5)
at async /root/serverless/aws-node-express-dynamodb-api-project/node_modules/serverless/scripts/serverless.js:771:9
✖ Uncaught exception
/root/serverless/aws-node-express-dynamodb-api-project/node_modules/serverless/scripts/serverless.js:51
throw error;
^
Error: spawn java ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn java',
path: 'java',
spawnargs: [
'-Xms200m',
'-Xmx1g',
'-Djava.library.path=/root/serverless/aws-node-express-dynamodb-api-project/.dynamodb/DynamoDBLocal_lib',
'-jar',
'DynamoDBLocal.jar',
'-port',
8001,
'-inMemory',
'-sharedDb'
]
}
I'm on Windows but not using wsl2 and got the same error. Running serverless dynamodb start
in one terminal then serverless offline
in another worked for me. No idea why.