Checkpoints database file(/var/run/aws-kinesis-agent) is disappeared after EC2 reboot. Due to this agent started throwing below error.
2017-07-05 17:15:06.702-0600 localhost (main) com.amazon.kinesis.streaming.agent.Agent [INFO] Reading configuration from file: /etc/aws-kinesis/agent.json
2017-07-05 17:15:06.791-0600 localhost (main) com.amazon.kinesis.streaming.agent.processing.processors.AgentDataConverterChain [DEBUG] Using data converter chain: AgentDataConverterChain [com.amazon.kinesis.streaming.agent.processing.processors.LogToJSONDataConverter@6a983034 ]
2017-07-05 17:15:06.814-0600 localhost (main) com.amazon.kinesis.streaming.agent.Agent [INFO] null: Agent will use up to 15 threads for sending data.
2017-07-05 17:15:06.834-0600 localhost (main) com.amazon.kinesis.streaming.agent.tailing.checkpoints.SQLiteFileCheckpointStore [DEBUG] Connecting to database /var/run/aws-kinesis-agent/checkpoints...
2017-07-05 17:15:06.844-0600 localhost (main) com.amazon.kinesis.streaming.agent.Agent [ERROR] Unhandled error.
java.lang.RuntimeException: Failed to create or connect to the checkpoint database.
at com.amazon.kinesis.streaming.agent.tailing.checkpoints.SQLiteFileCheckpointStore.connect(Unknown Source)
at com.amazon.kinesis.streaming.agent.tailing.checkpoints.SQLiteFileCheckpointStore.<init>(Unknown Source)
at com.amazon.kinesis.streaming.agent.Agent.<init>(Unknown Source)
at com.amazon.kinesis.streaming.agent.Agent.main(Unknown Source)
Caused by: java.nio.file.AccessDeniedException: /var/run/aws-kinesis-agent
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:383)
at java.nio.file.Files.createDirectory(Files.java:630)
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:734)
at java.nio.file.Files.createDirectories(Files.java:720)
... 4 more
Checkpoints database file(/var/run/aws-kinesis-agent) is disappeared after EC2 reboot. Due to this agent started throwing below error.