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

Can`t start inside docker container #36

Open
khitsik opened this issue Nov 21, 2019 · 1 comment
Open

Can`t start inside docker container #36

khitsik opened this issue Nov 21, 2019 · 1 comment

Comments

@khitsik
Copy link

khitsik commented Nov 21, 2019

  1. The first question is that I`m always getting:
    sh: launch-kinesis-cluster: not found

Can just launch it through the whole path to the bin/launch.

  1. The second question is why it crushes inside my running node js docker container?
    Getting such error:

/app # ./node_modules/kinesis-client-library/bin/launch --comsumer ./consumer.js --table myTable --stream streamTest --kinesis-endpoint http://localstack:4568 --dynamo-endpoint http://dynamo:8000
{"name":"KinesisClusterLauncher","hostname":"e457956a67b7","pid":35,"level":30,"msg":"Forking CLI","time":"2019-11-21T10:55:16.142Z","v":0}
{"name":"KinesisClusterCLI","hostname":"e457956a67b7","pid":42,"level":30,"msg":"Consumer app path: /app","time":"2019-11-21T10:55:16.387Z","v":0}
{"name":"KinesisClusterCLI","hostname":"e457956a67b7","pid":42,"level":30,"options":{"tableName":"myTable","streamName":"streamTest","dynamoEndpoint":"http://dynamo:8000","localDynamo":false,"kinesisEndpoint":"http://localstack:4568","localKinesis":false},"msg":"Cluster options","time":"2019-11-21T10:55:16.388Z","v":0}
{"name":"KinesisClusterCLI","hostname":"e457956a67b7","pid":42,"level":30,"msg":"Launching cluster","time":"2019-11-21T10:55:16.389Z","v":0}
{"name":"KinesisClusterCLI","hostname":"e457956a67b7","pid":42,"level":30,"msg":"Spawned cluster e457956a67b7@42@1574333716393","time":"2019-11-21T10:55:16.415Z","v":0}
(node:42) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
{"name":"KinesisCluster","hostname":"e457956a67b7","pid":42,"level":30,"table":"myTable","msg":"Creating DynamoDB table","time":"2019-11-21T10:55:16.709Z","v":0}
{"name":"KinesisCluster","hostname":"e457956a67b7","pid":42,"level":30,"msg":"Starting report cluster loop","time":"2019-11-21T10:55:16.950Z","v":0}
{"name":"KinesisCluster","hostname":"e457956a67b7","pid":42,"level":30,"msg":"Starting external network fetch loop","time":"2019-11-21T10:55:16.951Z","v":0}
{"name":"KinesisCluster","hostname":"e457956a67b7","pid":42,"level":30,"newShards":[{"ShardId":"shardId-000000000000","HashKeyRange":{"StartingHashKey":"0","EndingHashKey":"340282366920938463463374607431768211455"},"SequenceNumberRange":{"StartingSequenceNumber":"49601598347922369599837477268999272537358637448319467522"}}],"msg":"Unleased shards available","time":"2019-11-21T10:55:17.028Z","v":0}
{"name":"KinesisCluster","hostname":"e457956a67b7","pid":42,"level":30,"shardId":"shardId-000000000000","leaseCounter":null,"msg":"Spawning consumer","time":"2019-11-21T10:55:17.028Z","v":0}
/app/server.js:1
import settings from './src/settings';
^^^^^^^^

SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:721:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
{"name":"KinesisCluster","hostname":"e457956a67b7","pid":42,"level":50,"shardId":"shardId-000000000000","exitCode":1,"msg":"Consumer exited","time":"2019-11-21T10:55:17.096Z","v":0}

@evansolomon
Copy link
Owner

The launch-kinesis-cluster command is a part of the npm module, so you'll need ./node_modules/.bin in your path.

I'm not sure what's causing the crash. The line in your stack trace import settings from './src/settings'; isn't in this repo as far as I know. I'm guessing it's in your consumer and your node version doesn't support native imports.

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

2 participants