iipc/openwayback

Open Wayback fails to restart due to com.sleepycat.je.EnvironmentFailureException

schmika opened this issue · 2 comments

After reboot Open Wayback crashes with the following error

org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter [RequestFilter]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'localbdbresourceindex' defined in URL [file:/local/apache-tomcat-9.0.30/webapps/ROOT/WEB-INF/BDBCollection.xml]: Cannot create inner bean 'org.archive.wayback.resourceindex.bdb.BDBIndex#1b49a173' of type [org.archive.wayback.resourceindex.bdb.BDBIndex] while setting bean property 'source'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.archive.wayback.resourceindex.bdb.BDBIndex#1b49a173' defined in URL [file:/local/apache-tomcat-9.0.30/webapps/ROOT/WEB-INF/BDBCollection.xml]: Invocation of init method failed; nested exception is com.sleepycat.je.EnvironmentFailureException: (JE 4.1.6) Environment must be closed, caused by: com.sleepycat.je.EnvironmentFailureException: Environment invalid because of previous exception: (JE 4.1.6) /xxxx/xxxx/index fetchTarget of 0x11e8/0x12424aa parent IN=22387642 IN class=com.sleepycat.je.tree.IN lastFullVersion=0x1221/0x1f4263f parent.getDirty()=false state=0 LOG_FILE_NOT_FOUND: Log file missing, log is likely invalid. Environment is invalid and must be closed.

After deleting the index, Open Wayback restarts without any problems.

Open Wayback version 2.4.0
Apache Tomcat 9.0.3
Java 11.0.6
Ubuntu

Could this be due to a bug in Berkeley DB JE 4.1.6? I've come across a similar error in the changelogs. Are there any plans of upgrading to a newer version of Berkeley DB JE?

Thank you in advance for any help you can provide.

ldko commented

Hi @schmika, unfortunately I can't provide much assistance with your issue, as I was unable to reproduce your error using the default OpenWayback configuration (except a different wayback.basedir that would persist after a reboot) with this environment:

OpenWayback 2.4.0
Apache Tomcat 9.0.33
Java 11.0.6
Ubuntu 18.04.4

Regarding upgrading Berkeley DB JE: at this point we are only providing minimal maintenance to OpenWayback (due to its age, its not keeping pace with website trends, and lack of developer resources) and encouraging people to use pywb. However we are still happy to consider pull requests submitted to upgrade/improve OpenWayback.

Hi @ldko, thank you for looking into it and getting back to me. I'll see whether I can figure out the issue and take a look at pywb.