I've run into this as well. Having confirmed that there are no handles on the file (it's only ever created and used by Cassandra), and having stepped through the code, I've concluded that something in the io (not sure if it's the jvm or the os) stack is lazy about releasing the file handle for 'RandomAccessFile's. I was able to get past these issues by setting a breakpoint after the call to close (on the file-to-be-renamed), waiting 30 seconds, then resuming the thread. Basically, Cassandra won't start on windows 7 in its current state.
AD -----Original Message----- From: Viktor Jevdokimov [mailto:viktor.jevdoki...@adform.com] Sent: Monday, November 29, 2010 10:13 AM To: user@cassandra.apache.org Subject: RE: Booting Cassandra v0.7.0 on Windows: rename failed This isn't a first time Cassandra has I/O issues on Windows. I think it's not easy to review source code and eliminate such issues, but would like developers to keep in mind such issues in the future. We're also running a Cassandra cluster on Windows, but 0.7 beta1 (with similar issue, but for Commit Log) and waiting for 0.7 release to use it fully on production. Viktor -----Original Message----- From: Jonathan Ellis [mailto:jbel...@gmail.com] Sent: Monday, November 29, 2010 5:09 PM To: user Subject: Re: Booting Cassandra v0.7.0 on Windows: rename failed Please report a bug at https://issues.apache.org/jira/browse/CASSANDRA On Mon, Nov 29, 2010 at 2:49 AM, Ramon Rockx <r.ro...@asknow.nl> wrote: > Hi, > > Recently I downloaded Cassandra v0.7.0 rc1. When I try to run cassandra > it ends with the following logging: > > INFO 09:17:30,044 Enqueuing flush of > memtable-locationi...@839514767(643 bytes, 12 operations) > INFO 09:17:30,045 Writing memtable-locationi...@839514767(643 bytes, 12 > operations) > ERROR 09:17:30,233 Fatal exception in thread > Thread[FlushWriter:1,5,main] > java.io.IOError: java.io.IOException: rename failed of > d:\cassandra\data\system\LocationInfo-e-1-Data.db > at > org.apache.cassandra.io.sstable.SSTableWriter.rename(SSTableWriter.java: > 214) > at > org.apache.cassandra.io.sstable.SSTableWriter.closeAndOpenReader(SSTable > Writer.java:184) > at > org.apache.cassandra.io.sstable.SSTableWriter.closeAndOpenReader(SSTable > Writer.java:167) > at > org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:161) > at org.apache.cassandra.db.Memtable.access$000(Memtable.java:49) > at org.apache.cassandra.db.Memtable$1.runMayThrow(Memtable.java:174) > at > org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto > r.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja > va:908) > at java.lang.Thread.run(Thread.java:619) > Caused by: java.io.IOException: rename failed of > d:\cassandra\data\system\LocationInfo-e-1-Data.db > at > org.apache.cassandra.utils.FBUtilities.renameWithConfirm(FBUtilities.jav > a:359) > at > org.apache.cassandra.io.sstable.SSTableWriter.rename(SSTableWriter.java: > 210) > ... 12 more > > Operating system is Windows 7. Tried it also on Windows 2003 server. > I only modified a few (necessary) path settings in cassandra.yaml: > > commitlog_directory: d:/cassandra/commitlog > data_file_directories: > - d:/cassandra/data > saved_caches_directory: d:/cassandra/saved_caches > > Does anybody know what I'm doing wrong? > > Regards, > Ramon > -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com