99x / 99x/serverless-dynamodb-local

WSL2 Unable to start DynamoDB Local process!

Open
#275 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
621
Forks
232
PR merge metrics
No merged PRs in 30d

Description

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'
}
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `sls dynamodb start` under WSL2 and read `node_modules/dynamodb-localhost/dynamodb/starter.js` around line 52, followed by `serverless-dynamodb-local/index.js` around line 264. Determine why the DynamoDB Local process reports `spawn java ENOENT`; done means the command starts DynamoDB Local successfully without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.