Glassfish no longer logging? It’s probably due to expired certificates!

A few days ago i noticed my webapp running on glassfish wasn’t producing any log anymore  within eclipse. After mingling a bit with the log configuration, i finally decided to go for a fresh glassfish 5 setup, and again i had logging.

However, after a while i again lost my logging. And, although i’m not sure why, it seems that the expiration of SSL certificates turned out to be the cause.

Now, in order to get restore your logging, all you need to do is to remove the expired certificates from your glassfish configuration.

Follow these two steps:

  1. Navigate to your glassfish / domain / config directory.
    cd glassfish5\glassfish\domains\domain1\config
  2. Find out the ‘alias’ for the expired certificates mentioned in the log.
    keytool -v -list -keystore cacerts.jks
    * the above sample will resolve to ‘equifaxsecureca’
  3. Remove the certificate from glassfish
    keytool -delete -keystore cacerts.jks -alias equifaxsecureca -storePass changeit
  4. Restart glassfish, and observe you’re logging is back 🙂

Update 28 july 2019: I currently use the below scripot to remove outdated certificates from glassfish & payara in my docker scripts:

Leave a Reply

Your email address will not be published. Required fields are marked *