oconnormi/docker-ddf-base

Tailing ddf log fails in entrypoint sometimes due to log file not being created fast enough

oconnormi opened this issue · 1 comments

In some scenarios the main log file takes a while to get created (mem/cpu/disk). Currently the entrypoint doesn't gracefully handle this. It should not throw an error about a missing file, but instead should wait for the file to exist before tailing it

Here's what the output looks when this error happens:

Updating DDF certificates
localhost key found in /opt/ddf/etc/keystores/serverKeystore.jks, removing
To run additional pre_start configurations mount a script to /opt/entrypoint/pre_start_custom.sh
Starting DDF
Post-Start Configuration Script found, running now...
tail: can't open '/opt/ddf/data/log/ddf.log': No such file or directory
tail: no files
Failed to get the session.
retrying (attempt 1) ...
retrying (attempt 2) ...
retrying (attempt 3) ...
retrying (attempt 4) ...