Error downloading Dynamodb ECONNREFUSED
csi-lk opened this issue · 9 comments
During installation step, download is failing, where is it downloading from?
(using serverless-dynamodb-local)
Full stack trace:
sls dynamodb install
[Error: Error getting DynamoDb local latest tar.gz location: 404]
/Users/csilk/dev/project/node_modules/dynamodb-localhost/dynamodb/installer.js:43
throw Error("Error in downloading Dynamodb local " + err);
^
Error: Error in downloading Dynamodb local Error: connect ECONNREFUSED 127.0.0.1:80
at Error (native)
at ClientRequest.<anonymous> (/Users/csilk/dev/project/node_modules/dynamodb-localhost/dynamodb/installer.js:43:27)
at emitOne (events.js:90:13)
at ClientRequest.emit (events.js:182:7)
at Socket.socketErrorListener (_http_client.js:262:9)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at emitErrorNT (net.js:1246:8)
at nextTickCallbackWith2Args (node.js:475:9)
at process._tickDomainCallback (node.js:430:17)
$ sls dynamodb install
[Error: Error getting DynamoDb local latest tar.gz location: 404]
/Users/csilk/dev/project/node_modules/dynamodb-localhost/dynamodb/installer.js:43
throw Error("Error in downloading Dynamodb local " + err);
^
Error: Error in downloading Dynamodb local Error: connect ECONNREFUSED 127.0.0.1:80
at Error (native)
at ClientRequest.<anonymous> (/Users/csilk/dev/project/node_modules/dynamodb-localhost/dynamodb/installer.js:43:27)
at emitOne (events.js:90:13)
at ClientRequest.emit (events.js:182:7)
at Socket.socketErrorListener (_http_client.js:262:9)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at emitErrorNT (net.js:1246:8)
at nextTickCallbackWith2Args (node.js:475:9)
at process._tickDomainCallback (node.js:430:17)
Found the URL in config.json, weird thing is it downloads fine over curl...
curl "http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz" -o "dynamodb_local.tar.gz"
This is weird, I was getting a 404 after visiting the URL this morning. Regardless, the code is looking for a 302 response then downloading from the new location. That URL is returning 200 without a redirect now.
Little workaround for those also using the serverless-dynamodb-local plugin, add npm-shrinkwrap.json in your root project directory with the following:
{
"name": "npm-project-name-here",
"version": "1.0.0",
"dependencies": {
"serverless-dynamodb-local": {
"version": "^0.2.17",
"dependencies": {
"dynamodb-localhost": {
"from": "https://github.com/peterfotinis/dynamodb-localhost.git"
}
}
}
}
}
@peterfotinis thank you!
@peterfotinis, thanks mate great workaround
in case anyone else didn't know about npm shrinkwrap when in your project dir run
npm shrinkwrap
then add the:
"dependencies": {
"dynamodb-localhost": {
"from": "https://github.com/peterfotinis/dynamodb-localhost.git"
}
}
to serverless-dynamodb-local
's part of the npm-shrinkwrap.json
file 👍
@Si1kIfY New dynamodb-localhost (0.0.5) updated to npm and also added the newest version to severless-dynamodb-local (0.2.16)
@peterfotinis Thanks for the PR
Thanks @AshanFernando, closing....
Seems like Amazon changed their URLs and we have the same issue again?
getting the same issue now. been working fine all day...
https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz yields a 403 when doing an sls dynamodb install