I have a jar file which when executed directly using java -jar filename.jar
it is able to read and consume an aws stream. However when I create a systemctl service in he same environment to run the exact same jar file as a service every time it runs it initiates a graceful shutdown without any error specified.
- Tomcat started on port 8092 (http) with context path '/'
- Started Bootstrap in 3.906 seconds (process running for 4.903)
- Initial state: [StreamConfig(streamIdentifier=stream_name, initialPositionInStreamExtended=InitialPositionInStreamExtended(position=LATEST, timestamp=null), consumerArn=null)]
- With failover time 10000 ms and epsilon 25 ms, LeaseCoordinator will renew leases every 3308 ms, takeleases every 20050 ms, process maximum of 2147483647 leases and steal 1 lease(s) at a time.
- With failover time 10000 ms and epsilon 25 ms, LeaseCoordinator will renew leases every 3308 ms, takeleases every 20050 ms, process maximum of 2147483647 leases and steal 1 lease(s) at a time.
- Initializing LeaseCoordinator attempt 1
- Waiting up to 20 seconds for shutdown to complete.
- Starting lease cleanup thread.
- Number of pending leases to clean before the scan : 0
- Starting LeaseCoordinator
- Scheduling periodicShardSync
- Initialization complete. Starting worker loop.
- Worker shutdown requested.
- Elected leaders: fd1ceed5-3f45-42a3-aef2-...
- Worker 5d35a20a-35a1-46f4-8ae2-... has successfully stopped lease-tracking threads
- Stopping the lease cleanup thread.
- Shutting down leader decider on worker 5d35a20a-35a1-46f4-8ae2-...
- Successfully stopped leader election on the worker
- Shutting down periodic shard sync task scheduler on worker 5d35a20a-35a1-46f4-8ae2-...
- All record processors have been shutdown successfully.
- Starting worker's final shutdown.
- Shutting down CWPublication thread.
- CWPublication thread finished.
- Worker loop is complete. Exiting from worker.`
- Completed, shutting down now.
I have attempted to change file permissions and file ownership to match the user executing directly but no luck.
I have also tried increasing the failover time to 10mins without success