1

Trying to identify the cause of restart of the wildfly application in a openshift POD:

  • POD Describe shows no restart for the POD.
  • oc logs xxx --previous does not find any entry.
  • Wildfly log directory holds entry for the current server.log.

I remember something about using Kibana to see old logs.

What are the options to quickly see the old logs for wildfly running under openshift?

Daein Park
  • 4,393
  • 2
  • 12
  • 21
jay-raaspi
  • 13
  • 1
  • 4

1 Answers1

0

oc logs --previous depends on container logs which is managed by container runtime(such as docker). If the pod(container) was restarted due to unnormal states, container logs are remained. At that case, oc logs --previous shows you old logs. As I see, the previous logs are not remained at the moment.

How about looking for the previous logs using Pod name, Project and Timestamp ?

Daein Park
  • 4,393
  • 2
  • 12
  • 21
  • I used oc logs with --since-time option but did not see any extra log content for wildfly. It seems the oc logs scope is current POD only and the wildfly crashed during the previous POD. I need to look into the wildfly server.log at the crash time. – jay-raaspi Jan 30 '20 at 04:31
  • Logs are limited to pods. To preserve the logs, you need to attach PVC and change the log location to that. – sharmag Jan 31 '20 at 07:02