OpenNTF / openliberty-domino

Open Liberty server embedded in Domino
Apache License 2.0
7 stars 3 forks source link

Improve handling of truncated log files #47

Open jesse-gallagher opened 4 years ago

jesse-gallagher commented 4 years ago

If, for example, a server is stopped and started externally to Domino, it can lead to an exception like this:

java.io.IOException: mark/reset not supported
 at java.io.InputStream.reset(InputStream.java:348)
 at org.openntf.openliberty.domino.runtime.OpenLibertyRuntime.lambda$watchLog$0(OpenLibertyRuntime.java:444)
 at org.openntf.openliberty.domino.runtime.OpenLibertyRuntime$$Lambda$18/0000000000000000.run(Unknown Source)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at lotus.domino.NotesThread.run(Unknown Source)

It would probably make more sense in this case to instead close and re-open the input stream explicitly.