Reputation: 69
I tried to install Cassandra 2.0 on my Ubuntu 13.04, but I'm getting this error when i try to start it:
java.lang.UnsupportedOperationException: Commitlog segment is too old to open; upgrade to 1.2.5+ first
at org.apache.cassandra.db.commitlog.CommitLogDescriptor.fromFileName(CommitLogDescriptor.java:65)
at org.apache.cassandra.db.commitlog.CommitLogSegment$CommitLogSegmentFileComparator.compare(CommitLogSegment.java:391)
at org.apache.cassandra.db.commitlog.CommitLogSegment$CommitLogSegmentFileComparator.compare(CommitLogSegment.java:386)
at java.util.TimSort.countRunAndMakeAscending(TimSort.java:324)
at java.util.TimSort.sort(TimSort.java:189)
at java.util.TimSort.sort(TimSort.java:173)
at java.util.Arrays.sort(Arrays.java:659)
at org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:124)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:300)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:443)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:486)
Can anybody help me?
Upvotes: 5
Views: 1588
Reputation:
I came across the exact same problem on Ubuntu 14.04 and I was able to solve it by removing /var/lib/cassandra completely, as user2278196 suggested in the comments of his original question.
Mind you: I did this on a reasonably clean system, so I was completely sure I wouldn't loose any information.
I don't think you could do this on a machine that has actual data without losing it. Be careful!
Upvotes: 2
Reputation: 7239
I'll expand a little on what @aurand is saying, here is how to upgrade Cassandra from 0.x or 1.1.x to 2.x.
First upgrade to 1.2.9 apt-get install cassandra=1.2.9
.
Then run nodetool upgradesstables
(you have to otherwise some unexpected things will happen) , follow this process with nodetool compactionstats
(or even better watch -n 2 nodetool compactionstats
) it may take days depending on your data.
Finally upgrade to the latest version apt-get install cassandra
and run nodetool upgradesstables
again.
Then you're done.
Note: instead of nodetool upgradesstables
you may use nodetool scrub
but it seems to be recommended to use upgradesstables
instead.
Upvotes: 4