awslabs / awslabs/amazon-kinesis-client-nodejs
run consumer as background service
- Dominant language
- JavaScript
- Stars
- 304
- Forks
- 198
- Avg merge
- 36m
- Merged PRs (30d)
- 2
Description
I have been trying to use it as background service on ubuntu 16.06. absolute paths gives exception
` /home/ubuntu/kcl/bin/kcl-bootstrap --java /usr/bin/java -e -p /home/ubuntu/kcl/samples/basic_sample/consumer/sample.properties -s
`
results in
```
Starting Multi-Lang Daemon ...
Exception in thread "main" java.lang.NullPointerException
at java.util.Properties$LineReader.readLine(Properties.java:434)
at java.util.Properties.load0(Properties.java:353)
at java.util.Properties.load(Properties.java:341)
at com.amazonaws.services.kinesis.multilang.MultiLangDaemonConfig.loadProperties(MultiLangDaemonConfig.java:135)
at com.amazonaws.services.kinesis.multilang.MultiLangDaemonConfig.(MultiLangDaemonConfig.java:85)
at com.amazonaws.services.kinesis.multilang.MultiLangDaemonConfig.(MultiLangDaemonConfig.java:70)
at com.amazonaws.services.kinesis.multilang.MultiLangDaemonConfig.(MultiLangDaemonConfig.java:57)
```
also tried with `/etc/init.d/` and changed directory to `consumer` folder and ran `../../../bin/kcl-bootstrap --java /usr/bin/java -e -p ./sample.properties -s`
is there any way I can run it as background service (relaunch if it crashes and start on boot)
thanks for any help
Contributor guide
Research direction
Start with bin/kcl-bootstrap and the sample.properties path used in the report, then inspect MultiLangDaemonConfig.loadProperties at the stack-trace location. Reproduce the absolute-path and consumer-directory commands on Ubuntu; done means the consumer starts without the NullPointerException and the supported background-service behavior, including restart and boot startup, is established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript, linux
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100