Forum Stats

  • 3,768,743 Users
  • 2,252,843 Discussions
  • 7,874,705 Comments

Discussions

Log file missing, log is likely invalid or Checksum is invalid. Environment is invalid and must be c

3478419
3478419 Member Posts: 6
edited Jun 1, 2017 8:38PM in Berkeley DB Java Edition

We are using BDB je-android-5.0.73.jar and getting the below issue sometimes,  and dont know the scenario when we are getting:

com.sleepycat.je.EnvironmentFailureException: (JE 5.0.73) Environment must be closed, caused by: com.sleepycat.je.EnvironmentFailureException: Environment invalid because of previous exception: (JE 5.0.73) /storage/emulated/0/.GSSDB/2268/OkekeC05 fetchTarget of 0xc1/0xa57d parent IN=6 IN class="com".sleepycat.je.tree.IN lastFullVersion=0xc5/0x11f7 lastLoggedVersion=0xc5/0x11f7 parent.getDirty()=false state=0 LOG_FILE_NOT_FOUND: Log file missing, log is likely invalid. Environment is invalid and must be closed.

at com.sleepycat.je.dbi.EnvironmentImpl.checkIfInvalid(EnvironmentImpl.java:1512)

at com.sleepycat.je.log.FileManager.writeLogBuffer(FileManager.java:1591)

at com.sleepycat.je.log.LogBufferPool.writeBufferToFile(LogBufferPool.java:260)

at com.sleepycat.je.log.SyncedLogManager.flushInternal(SyncedLogManager.java:51)

at com.sleepycat.je.log.LogManager.flush(LogManager.java:1173)

at com.sleepycat.je.dbi.EnvironmentImpl.finishInit(EnvironmentImpl.java:620)

at com.sleepycat.je.dbi.DbEnvPool.getEnvironment(DbEnvPool.java:208)

at com.sleepycat.je.Environment.makeEnvironmentImpl(Environment.java:246)

at com.sleepycat.je.Environment.<init>(Environment.java:227)

at com.sleepycat.je.Environment.<init>(Environment.java:170)

at com.celstra.gss.bdb.DBEnv.setup(DBEnv.java:23)

at com.celstra.gss.GssPlugin.checkFirtTimeLogin(GssPlugin.java:24084)

at com.celstra.gss.GssPlugin$13.run(GssPlugin.java:1659)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

at java.lang.Thread.run(Thread.java:818)

Caused by: com.sleepycat.je.EnvironmentFailureException: Environment invalid because of previous exception: (JE 5.0.73) /storage/emulated/0/.GSSDB/2268/OkekeC05 fetchTarget of 0xc1/0xa57d parent IN=6 IN class="com".sleepycat.je.tree.IN lastFullVersion=0xc5/0x11f7 lastLoggedVersion=0xc5/0x11f7 parent.getDirty()=false state=0 LOG_FILE_NOT_FOUND: Log file missing, log is likely invalid. Environment is invalid and must be closed.

at com.sleepycat.je.tree.IN.fetchTarget(IN.java:1429)

at com.sleepycat.je.tree.Tree.searchSubTreeInternal(Tree.java:1544)

at com.sleepycat.je.tree.Tree.searchSubTree(Tree.java:1381)

at com.sleepycat.je.tree.Tree.search(Tree.java:1240)

at com.sleepycat.je.tree.Tree.getFirstNode(Tree.java:642)

at com.sleepycat.je.dbi.CursorImpl.positionFirstOrLast(CursorImpl.java:1968)

at com.sleepycat.je.cleaner.UtilizationProfile.populateCache(UtilizationProfile.java:722)

at com.sleepycat.je.recovery.RecoveryManager.recover(RecoveryManager.java:251)

at com.sleepycat.je.dbi.EnvironmentImpl.finishInit(EnvironmentImpl.java:611)

... 10 more

Caused by: java.io.FileNotFoundException: /storage/emulated/0/.GSSDB/2268/OkekeC05/000000c1.jdb: open failed: ENOENT (No such file or directory)

and here attaching the log file :

170530 06:21:55:033 INFO [/storage/emulated/0/.GSSDB/2268/OkekeC05] Chose lowest utilized file for cleaning. fileChosen: 0xc1 totalUtilization: 49 bestFileUtilization: 34 lnSizeCorrectionFactor: NaN isProbe: false

170530 06:21:55:211 INFO [/storage/emulated/0/.GSSDB/2268/OkekeC05] CleanerRun 1 ends on file 0xc1 probe=false invokedFromDaemon=true finished=true fileDeleted=false nEntriesRead=654 nINsObsolete=115 nINsCleaned=8 nINsDead=0 nINsMigrated=8 nBINDeltasObsolete=53 nBINDeltasCleaned=3 nBINDeltasDead=0 nBINDeltasMigrated=3 nLNsObsolete=180 nLNsCleaned=269 nLNsDead=0 nLNsMigrated=269 nLNsMarked=0 nLNQueueHits=167 nLNsLocked=0 logSummary=<CleanerLogSummary endFileNumAtLastAdjustment="0xc5" initialAdjustments="5" recentLNSizesAndCounts="Cor:8533/58-Est:41317/324 Cor:6932/49-Est:37556/352 Cor:7664/52-Est:32323/213 Cor:3476/34-Est:42779/410 Cor:4167/22-Est:23473/159 Cor:7494/47-Est:37873/315 Cor:6539/47-Est:26081/188 Cor:8939/66-Est:42498/370 Cor:6600/50-Est:26426/193 Cor:7949/55-Est:38256/324 "> inSummary=<INSummary totalINCount="123" totalINSize="20024" totalBINDeltaCount="56" totalBINDeltaSize="11468" obsoleteINCount="115" obsoleteINSize="12988" obsoleteBINDeltaCount="53" obsoleteBINDeltaSize="11235"/> estFileSummary=<summary totalCount="753" totalSize="99730" totalINCount="179" totalINSize="31492" totalLNCount="449" totalLNSize="52373" maxLNSize="638" obsoleteINCount="168" obsoleteLNCount="180" obsoleteLNSize="14117" obsoleteLNSizeCounted="125" getObsoleteSize="66032" getObsoleteINSize="29556" getObsoleteLNSize="20611" getMaxObsoleteSize="93490" getMaxObsoleteLNSize="48069" getAvgObsoleteLNSizeNotCounted="118.07407"/> recalcFileSummary=<summary totalCount="753" totalSize="99730" totalINCount="179" totalINSize="31492" totalLNCount="449" totalLNSize="52373" maxLNSize="0" obsoleteINCount="168" obsoleteLNCount="180" obsoleteLNSize="22066" obsoleteLNSizeCounted="180" getObsoleteSize="67487" getObsoleteINSize="29556" getObsoleteLNSize="22066" getMaxObsoleteSize="67487" getMaxObsoleteLNSize="22066" getAvgObsoleteLNSizeNotCounted="NaN"/> lnSizeCorrection=NaN newLnSizeCorrection=NaN estimatedUtilization=34 correctedUtilization=34 recalcUtilization=32

Please HELP!

Answers

  • Greybird-Oracle
    Greybird-Oracle Member Posts: 2,690
    edited May 31, 2017 12:44PM

    This is a corruption that can normally only be repaired by reverting to a backup (or when using JE HA, doing a network restore from another node). I realize you're not using JE HA.

    It could be caused by deleting a .jdb file outside of JE, or by a JE bug. You're using a very old release and there have been several such bugs fixed in JE.

    I suggest you look at the change logs to see whether any of the past fixes correspond to your usage scenario. Search for "corruption" and "LOG_FILE_NOT_FOUND".

    The latest 5.0.x change log:

    The Berkeley DB Java Edition Package: BDB JE Library Version 11.2.5.0 (Release 5.0.104) Change Log

    The current change log (include 6.0.x and 7.x):

    The Berkeley DB Java Edition Package: BDB JE Library Version 12.2.7.4 (Release 7.4.5) Change Log

    --mark

  • 3478419
    3478419 Member Posts: 6
    edited Jun 1, 2017 1:15AM

    Thanks and I found some issues fixed for corruption like one of them is:

    Fixed a bug where in very rare cases, a log corruption could be caused if an IO error occurs concurrently with the final flush performed by a checkpoint, or by a call to Environment.sync or Environment.flushLog

    Please suggest what to do now?

  • 3478419
    3478419 Member Posts: 6
    edited Jun 1, 2017 7:24AM

    Hi All,

    I have a build issues with the latest Berkeley DB java edition ( jar file) when i am using in our mobile application (android).

    Previously we were using Berkeley DB java edition : 5.0.73 with the jar file je-android-5.0.73.jar.

    When i am trying to use the 6.x or 7.x versions I could not find the jar file specific for android.

    When i am trying to use the je-7.4.5.jar or je-6.1.5.jar ,my application is showing build errors.

    is there any support issues for Berkeley DB for android in 6.x or 7.x versions?

    Can anyone help me get out of this issue?

    Thanks

  • Greybird-Oracle
    Greybird-Oracle Member Posts: 2,690
    edited Jun 1, 2017 8:38PM

    I'm sorry to say that Android support was removed starting with JE version 6.0 and there are no plans to support Android going forward. The only thing I can suggest is that you could try to adapt the JE source code so it builds and runs on Android.

    --mark

This discussion has been closed.