amazon-kinesis-client-net icon indicating copy to clipboard operation
amazon-kinesis-client-net copied to clipboard

Boostrapper cant find .NET App specified in kcl.properties

Open sachabarber opened this issue 6 years ago • 5 comments

So I am new to AWS Kinesis, and I have the sample basis producer working just fine with using my default profile which has my IAM user details in the store.

I can see that the producer send messages to the single stream shard. That's all good.

I downloaded the sample code from here and have done the following

  • Run the boostrapper to obtain the relevant KCL MultiLanuage JAR files
  • Made sure I had environment variables for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for the bootstrap app
  • Made sure I had Java installed
  • Ensured the bootstrap had these command line args to include "--properties kcl.properties --execute"
  • Made sure the kcl.properties file has the correct streamName/executableName/regionName (which I changed to match my region for producer/my AWS account, so eu-west-2)
  • Then when I run the bootstrap app I get this exception

The application to execute does not exist: 'C:\Users\sacha\Downloads\amazon-kinesis-client-net-master\amazon-kinesis-client-net-master\SampleConsumer\SampleConsumer.dll

Thing is this is the actual path to where the correct DLL lives (see the \bin\Debug\netcoreapp2.0 part of the path, that is standard .NET Core build path)

C:\Users\sacha\Downloads\amazon-kinesis-client-net-master\amazon-kinesis-client-net-master\SampleConsumer\bin\Debug\netcoreapp2.0\SampleConsumer.dll

SO what am I mean to change in order to get the boostrapper to recognize that the DLL is actually in the bin\Debug\netcoreapp2.0 folder.

Do I need to change the kcl.properties file?

Should I be changing the kcl.properties file line to this

executableName = dotnet \bin\Debug\netcoreapp2.0\SampleConsumer.dll

The producer is 100% fine.

This is the relevant stack trace

SEVERE: Received error line from subprocess [The application to execute does not exist: 'C:\Users\sacha\Downloads\amazon-kinesis-client-net-master\amazon-kinesis-client-net-master\SampleConsumer\SampleConsumer.dll'] for shard shardId-000000000000
The application to execute does not exist: 'C:\Users\sacha\Downloads\amazon-kinesis-client-net-master\amazon-kinesis-client-net-master\SampleConsumer\SampleConsumer.dll'
Sep 13, 2018 10:44:32 PM com.amazonaws.services.kinesis.multilang.DrainChildSTDERRTask handleLine
SEVERE: Received error line from subprocess [] for shard shardId-000000000000

Sep 13, 2018 10:44:32 PM com.amazonaws.services.kinesis.multilang.LineReaderTask call
INFO: Starting: Reading next message from STDIN for shardId-000000000000
Sep 13, 2018 10:44:32 PM com.amazonaws.services.kinesis.multilang.LineReaderTask call
INFO: Stopping: Reading STDERR for shardId-000000000000
Sep 13, 2018 10:44:32 PM com.amazonaws.services.kinesis.multilang.LineReaderTask call
INFO: Stopping: Reading next message from STDIN for shardId-000000000000
Sep 13, 2018 10:44:32 PM com.amazonaws.services.kinesis.multilang.MultiLangProtocol futureMethod
SEVERE: Failed to get status message for initialize action for shard shardId-000000000000
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Reached end of STDIN of child process for shard shardId-000000000000 so won't be able to return a message.
        at java.util.concurrent.FutureTask.report(Unknown Source)
        at java.util.concurrent.FutureTask.get(Unknown Source)
        at com.amazonaws.services.kinesis.multilang.MultiLangProtocol$$Lambda$5/72916411.get(Unknown Source)
        at com.amazonaws.services.kinesis.multilang.MultiLangProtocol.futureMethod(MultiLangProtocol.java:197)
        at com.amazonaws.services.kinesis.multilang.MultiLangProtocol.waitForStatusMessage(MultiLangProtocol.java:171)
        at com.amazonaws.services.kinesis.multilang.MultiLangProtocol.waitForStatusMessage(MultiLangProtocol.java:138)
        at com.amazonaws.services.kinesis.multilang.MultiLangProtocol.initialize(MultiLangProtocol.java:78)
        at com.amazonaws.services.kinesis.multilang.MultiLangRecordProcessor.initialize(MultiLangRecordProcessor.java:94)
        at com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitializeTask.call(InitializeTask.java:97)
        at com.amazonaws.services.kinesis.clientlibrary.lib.worker.MetricsCollectingTaskDecorator.call(MetricsCollectingTaskDecorator.java:49)
        at com.amazonaws.services.kinesis.clientlibrary.lib.worker.MetricsCollectingTaskDecorator.call(MetricsCollectingTaskDecorator.java:24)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Reached end of STDIN of child process for shard shardId-000000000000 so won't be able to return a message.
        at com.amazonaws.services.kinesis.multilang.GetNextMessageTask.returnAfterEndOfInput(GetNextMessageTask.java:84)
        at com.amazonaws.services.kinesis.multilang.GetNextMessageTask.returnAfterEndOfInput(GetNextMessageTask.java:31)
        at com.amazonaws.services.kinesis.multilang.LineReaderTask.call(LineReaderTask.java:70)
        ... 4 more

Sep 13, 2018 10:44:32 PM com.amazonaws.services.kinesis.multilang.MultiLangRecordProcessor stopProcessing
SEVERE: Encountered an error while trying to initialize record processor
java.lang.RuntimeException: Failed to initialize child process
        at com.amazonaws.services.kinesis.multilang.MultiLangRecordProcessor.initialize(MultiLangRecordProcessor.java:95)
        at com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitializeTask.call(InitializeTask.java:97)
        at com.amazonaws.services.kinesis.clientlibrary.lib.worker.MetricsCollectingTaskDecorator.call(MetricsCollectingTaskDecorator.java:49)
        at com.amazonaws.services.kinesis.clientlibrary.lib.worker.MetricsCollectingTaskDecorator.call(MetricsCollectingTaskDecorator.java:24)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Sep 13, 2018 10:44:32 PM com.amazonaws.services.kinesis.multilang.LineReaderTask call

Anyone have any ideas?

sachabarber avatar Sep 13 '18 21:09 sachabarber

I'm on Mac OS and have a similar issue. It fails with: No executable found matching command "dotnet-SampleConsumer.dll"

Update: fixed it by putting the full path of SampleConsumer.dll in the executableName in kcl.properties

ohildur avatar Sep 14 '18 13:09 ohildur

Wow really, I tried with more of the partial path. I will try that full path later too

sachabarber avatar Sep 14 '18 14:09 sachabarber

Yeah putting in full path in kcl.properties did not fix it. I still get this

The application to execute does not exist: 'C:\Users\sacha\Downloads\amazon-kinesis-client-net-master\amazon-kinesis-client-net-master\SampleConsumer\UserssachaDownloadsamazon-kinesis-client-net-masteramazon-kinesis-client-net-masterSampleConsumerbinDebug

Anyone got any ideas of how to fix this, this is driving me crazy

sachabarber avatar Sep 16 '18 18:09 sachabarber

Ok finally got this to work, fiddled around a bit more, turns out the IAM user I was using also needed dynamoDB permission. Though path thing above was main issue

sachabarber avatar Sep 16 '18 19:09 sachabarber

For what it's worth, I think the issues in this thread are related to path problems for the bootstrap executableName. I'm running KCL on Windows 10 and ran into similar issues and thankfully wasn't stuck for long.

You can use either an absolute or relative path in the kcl.properties file, these work for me:

executableName = dotnet "E:\\Absolute\\Path\\YourConsumer.dll"

executableName = dotnet "..\\bin\\Debug\\netcoreapp2.2\\YourConsumer.dll"

I haven't checked this running on Linux, so it may need tweaked.

ericbrumfield avatar Feb 19 '19 15:02 ericbrumfield