Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BasicExample - org.iq80.leveldb.DBException - Could not create random access file #344

Closed
MrYukonC opened this issue Feb 19, 2016 · 9 comments

Comments

@MrYukonC
Copy link

I'm getting the following database error when running the BasicExample with 1.1.0-RELEASE:

.
.
.
18:11:53.795 INFO [basicExample]  Blockchain sync in progress. Last imported block: #67954 (bbad6f <~ a113fd) Txs:0, Unc: 0
18:12:03.795 INFO [basicExample]  Blockchain sync in progress. Last imported block: #68476 (e9b6f4 <~ c744dd) Txs:9, Unc: 1
18:12:13.797 INFO [basicExample]  Blockchain sync in progress. Last imported block: #68611 (ab221d <~ fa95af) Txs:0, Unc: 0

18:12:18.354 ERROR [db]  Exception. Retrying again...

org.iq80.leveldb.DBException: IO error: C:\Projects\basicExample\database\details-storage\793ae8c1b1a160bfc07bfb0d04f85eab1a71f4f2\000011.sst: Could not create random access file.
    at org.fusesource.leveldbjni.internal.JniDB.get(JniDB.java:90)
    at org.fusesource.leveldbjni.internal.JniDB.get(JniDB.java:77)
    at org.ethereum.datasource.LevelDbDataSource.get(LevelDbDataSource.java:134)
    at org.ethereum.trie.Cache.get(Cache.java:59)
    at org.ethereum.trie.TrieImpl.getNode(TrieImpl.java:365)
    at org.ethereum.trie.TrieImpl.get(TrieImpl.java:181)
    at org.ethereum.trie.TrieImpl.get(TrieImpl.java:195)
    at org.ethereum.trie.TrieImpl.get(TrieImpl.java:195)
    at org.ethereum.trie.TrieImpl.get(TrieImpl.java:115)
    at org.ethereum.trie.SecureTrie.get(SecureTrie.java:20)
    at org.ethereum.db.ContractDetailsImpl.get(ContractDetailsImpl.java:83)
    at org.ethereum.db.ContractDetailsCacheImpl.get(ContractDetailsCacheImpl.java:51)
    at org.ethereum.db.ContractDetailsCacheImpl.get(ContractDetailsCacheImpl.java:51)
    at org.ethereum.db.RepositoryTrack.getStorageValue(RepositoryTrack.java:248)
    at org.ethereum.vm.program.Storage.getStorageValue(Storage.java:92)
    at org.ethereum.vm.program.Program.storageLoad(Program.java:657)
    at org.ethereum.vm.VM.step(VM.java:917)
    at org.ethereum.vm.VM.play(VM.java:1177)
    at org.ethereum.core.TransactionExecutor.go(TransactionExecutor.java:259)
    at org.ethereum.core.BlockchainImpl.applyBlock(BlockchainImpl.java:720)
    at org.ethereum.core.BlockchainImpl.processBlock(BlockchainImpl.java:695)
    at org.ethereum.core.BlockchainImpl.add(BlockchainImpl.java:438)
    at org.ethereum.core.BlockchainImpl.tryToConnect(BlockchainImpl.java:326)
    at org.ethereum.sync.SyncQueue.produceQueue(SyncQueue.java:123)
    at org.ethereum.sync.SyncQueue.access$000(SyncQueue.java:31)
    at org.ethereum.sync.SyncQueue$1.run(SyncQueue.java:104)
    at java.lang.Thread.run(Thread.java:745)

Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: C:\Projects\basicExample\database\details-storage\793ae8c1b1a160bfc07bfb0d04f85eab1a71f4f2\000011.sst: Could not create random access file.
    at org.fusesource.leveldbjni.internal.NativeDB.get(NativeDB.java:316)
    at org.fusesource.leveldbjni.internal.NativeDB.get(NativeDB.java:300)
    at org.fusesource.leveldbjni.internal.NativeDB.get(NativeDB.java:293)
    at org.fusesource.leveldbjni.internal.JniDB.get(JniDB.java:85)
    ... 26 more
@Nashatyrev
Copy link
Member

Yep, this is the problem of LevelDBJni 1.8 on Windows. I've build the lib using LevelDB 1.18 which has no such problems but we didn't include this to release yet (since has to be tested more). You may include it yourself by fixing ethereum-core/build.gradle:

repositories {
    maven {
        url "http://dl.bintray.com/ethereum/maven"
    }
}
dependencies {
-    compile "org.ethereum:leveldbjni-all:1.8"
+    compile "org.ethereum:leveldbjni-all:1.18"
}

We will most likely replace it in the next upcoming release, so I will close this issue.

@Nashatyrev
Copy link
Member

Also you will need to delete the database dir after the change
Thanks for reporting!

@MrYukonC
Copy link
Author

Hi Anton,

Sorry for the submission, I was afraid it might be something on my end.
Thank you for the help directing me how to get past it.

On Thu, Feb 18, 2016 at 6:24 PM, Anton Nashatyrev notifications@github.com
wrote:

Also you will need to delete the database dir after the change


Reply to this email directly or view it on GitHub
#344 (comment).

@mtbitcoin
Copy link

@Nashatyrev does the other dependencies like the below need to be removed also ?

remove compile "org.fusesource.leveldbjni:leveldbjni:1.8"
remove compile "org.fusesource.leveldbjni:leveldbjni-all:1.8"

add compile "org.ethereum:leveldbjni-all:1.18"`

@eitansela
Copy link

@Nashatyrev , do you have a planned date for your next upcoming release?
We need an official jars...
Thanks!

@Nashatyrev
Copy link
Member

@eitansela
Copy link

Thanks @Nashatyrev

@gitexperience
Copy link
Contributor

@Nashatyrev
I'm also getting the same error . Here is my gradle file :-
/*

  • This build file was auto generated by running the Gradle 'init' task
  • by 'mbhooshan' at '8/1/16 11:18 PM' with Gradle 2.13
    *
  • This generated file contains a sample Java project to get you started.
  • For more details take a look at the Java Quickstart chapter in the Gradle
  • user guide available at https://docs.gradle.org/2.13/userguide/tutorial_java_projects.html
    */

// Apply the java plugin to add support for Java
apply plugin: 'java'

// In this section you declare where to find the dependencies of your project
repositories {
// Use 'jcenter' for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}

// In this section you declare the dependencies for your production and test code
dependencies {
// The production code uses the SLF4J logging API at compile time
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'org.ethereum:ethereumj-core:1.1.0-RELEASE'
// Declare the dependency for your favourite test framework you want to use in your tests.
// TestNG is also supported by the Gradle Test task. Just change the
// testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
// 'test.useTestNG()' to your build script.
testCompile 'junit:junit:4.12'

}
Please help me on that. After syncing for about 2 days , it is now showing this error again and again ..

@Nashatyrev
Copy link
Member

@gitexperience Please upgrade to the latest release version:
compile 'org.ethereum:ethereumj-core:1.3.0-RELEASE'

cryptokat added a commit to cryptokat/semux that referenced this issue Feb 21, 2018
ethereumj appears to have resolved the issue of 'Could not create random access file' by upgrading leveldb to 1.18
see ethereum/ethereumj#344
cryptokat added a commit to cryptokat/semux that referenced this issue Feb 21, 2018
ethereumj appears to have resolved the issue of 'Could not create random access file' by upgrading leveldb to 1.18
see ethereum/ethereumj#344 (comment)
semuxgo pushed a commit to semuxproject/semux-core that referenced this issue Jun 11, 2018
ethereumj appears to have resolved the issue of 'Could not create random access file' by upgrading leveldb to 1.18
see ethereum/ethereumj#344 (comment)
semuxgo pushed a commit to semuxproject/semux-core that referenced this issue Jun 11, 2018
ethereumj appears to have resolved the issue of 'Could not create random access file' by upgrading leveldb to 1.18
see ethereum/ethereumj#344 (comment)
semuxgo pushed a commit to semuxproject/semux-core that referenced this issue Jun 11, 2018
ethereumj appears to have resolved the issue of 'Could not create random access file' by upgrading leveldb to 1.18
see ethereum/ethereumj#344 (comment)
semuxgo pushed a commit to semuxproject/semux-core that referenced this issue Jun 11, 2018
ethereumj appears to have resolved the issue of 'Could not create random access file' by upgrading leveldb to 1.18
see ethereum/ethereumj#344 (comment)
semuxgo pushed a commit to semuxproject/semux-core that referenced this issue Jun 11, 2018
ethereumj appears to have resolved the issue of 'Could not create random access file' by upgrading leveldb to 1.18
see ethereum/ethereumj#344 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants