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

examples/aws-node-rest-api-with-dynamodb-and-offline/ Unable to start DynamoDB Local process! #359

Open
FrancoConci opened this issue Feb 19, 2019 · 5 comments

Comments

@FrancoConci
Copy link

hello i cloned the examples repository and followed the instructions for the above mentioned example. when i run the command serverless offline start , i get the following output:

`Error --------------------------------------------------

Unable to start DynamoDB Local process!

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information -----------------------------
OS: linux
Node Version: 9.11.2
Serverless Version: 1.37.1`

@FrancoConci
Copy link
Author

with debug enabled, i get the following output:

`SLS_DEBUG=* serverless offline start
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 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 offline: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 (/home/franco/dev/temp/examples/aws-node-rest-api-with-dynamodb-and-offline/node_modules/dynamodb-localhost/dynamodb/starter.js:45:19)
at Object.start (/home/franco/dev/temp/examples/aws-node-rest-api-with-dynamodb-and-offline/node_modules/dynamodb-localhost/index.js:20:32)
at ServerlessDynamodbLocal.startHandler (/home/franco/dev/temp/examples/aws-node-rest-api-with-dynamodb-and-offline/node_modules/serverless-dynamodb-local/index.js:226:25)
at BbPromise.reduce (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:400:55)
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:400:22)
at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:431:17)
at variables.populateService.then.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:114:33)
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
at process.topLevelDomainCallback (domain.js:102:23)
From previous event:
at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:101:6)
at serverless.init.then (/usr/local/lib/node_modules/serverless/bin/serverless:43:28)
at /usr/local/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:111:16
at /usr/local/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:45:10
at FSReqWrap.oncomplete (fs.js:153:20)
From previous event:
at initializeErrorReporter.then (/usr/local/lib/node_modules/serverless/bin/serverless:43:6)
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
at process.topLevelDomainCallback (domain.js:102:23)
From previous event:
at /usr/local/lib/node_modules/serverless/bin/serverless:28:46
at Object. (/usr/local/lib/node_modules/serverless/bin/serverless:67:4)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information -----------------------------
OS: linux
Node Version: 9.11.2
Serverless Version: 1.37.1`

@Muddasser
Copy link

@FrancoConci Found any solution? I have having the same problem.

This is my log

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 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/muddasser.hussain/Development/pid-cid-service/node_modules/dynamodb-localhost/dynamodb/starter.js:45:19)
    at Object.start (/Users/muddasser.hussain/Development/pid-cid-service/node_modules/dynamodb-localhost/index.js:20:32)
    at ServerlessDynamodbLocal.startHandler (/Users/muddasser.hussain/Development/pid-cid-service/node_modules/serverless-dynamodb-local/index.js:226:25)
    at BbPromise.reduce (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:400:55)
From previous event:
    at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:400:22)
    at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:431:17)
    at variables.populateService.then.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:114:33)
    at processImmediate (timers.js:637:19)
    at process.topLevelDomainCallback (domain.js:120:23)
From previous event:
    at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:101:6)
    at serverless.init.then (/usr/local/lib/node_modules/serverless/bin/serverless:43:28)
    at /usr/local/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:111:16
    at /usr/local/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:45:10
    at FSReqCallback.args [as oncomplete] (fs.js:146:20)
From previous event:
    at initializeErrorReporter.then (/usr/local/lib/node_modules/serverless/bin/serverless:43:6)
    at processImmediate (timers.js:637:19)
    at process.topLevelDomainCallback (domain.js:120:23)
From previous event:
    at /usr/local/lib/node_modules/serverless/bin/serverless:28:46
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless:67:4)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:797:12)
    at executeUserCode (internal/bootstrap/node.js:526:15)
    at startMainThreadExecution (internal/bootstrap/node.js:439: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.9.0
     Serverless Version:     1.37.0```

@jalie
Copy link
Contributor

jalie commented Feb 27, 2019

I have the same situation, that's my log:

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 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 downloadDocumentation

 Serverless Warning --------------------------------------

  A valid option to satisfy the declaration 'opt:profile,self:custom.profiles.local' could not be found.


 Serverless Warning --------------------------------------

  A valid service attribute to satisfy the declaration 'self:custom.configs.local' could not be found.

Serverless: Invoke offline: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 (/usr/app/node_modules/dynamodb-localhost/dynamodb/starter.js:45:19)
    at Object.start (/usr/app/node_modules/dynamodb-localhost/index.js:20:32)
    at ServerlessDynamodbLocal.startHandler (/usr/app/node_modules/serverless-dynamodb-local/index.js:226:25)
    at BbPromise.reduce (/usr/app/node_modules/serverless/lib/classes/PluginManager.js:407:55)
From previous event:
    at PluginManager.invoke (/usr/app/node_modules/serverless/lib/classes/PluginManager.js:407:22)
    at PluginManager.run (/usr/app/node_modules/serverless/lib/classes/PluginManager.js:438:17)
    at variables.populateService.then.then (/usr/app/node_modules/serverless/lib/Serverless.js:114:33)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
From previous event:
    at Serverless.run (/usr/app/node_modules/serverless/lib/Serverless.js:101:6)
    at serverless.init.then (/usr/app/node_modules/serverless/bin/serverless:43:28)
    at /usr/app/node_modules/graceful-fs/graceful-fs.js:111:16
    at /usr/app/node_modules/graceful-fs/graceful-fs.js:45:10
    at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
    at initializeErrorReporter.then (/usr/app/node_modules/serverless/bin/serverless:43:6)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
From previous event:
    at /usr/app/node_modules/serverless/bin/serverless:28:46
    at Object.<anonymous> (/usr/app/node_modules/serverless/bin/serverless:67:4)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information -----------------------------
     OS:                     linux
     Node Version:           8.10.0
     Serverless Version:     1.38.0```

@jalie
Copy link
Contributor

jalie commented Feb 27, 2019

@Muddasser After investigating some more time into it, I found out - it's not related to the serverless/examples.

Did the trick for me:
sls dynamodb install --localPath ./bin

Found the solution here:
99x/serverless-dynamodb-local#210
99x/serverless-dynamodb-local#195

So basically this issue can be closed since it's not related to the example :-)

@kakchan
Copy link

kakchan commented Mar 13, 2019

dynamodb/utils.js:absPath() in the [email protected] package caused this issue

"0.2.36" is using older version 0.0.5 of dynamodb-localhost, whereas "0.2.35" is using[email protected]

the workaround would be update your package.json

  "resolutions": {
    "dynamodb-localhost": "0.0.7"   // or "0.0.6"
  }

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

4 participants