0

Cassandra 无法启动,错误打开了太多文件。(apache-cassandra-1.2.4)

错误文件包含:

ERROR 11:53:11,893 Exception encountered during startup
java.lang.RuntimeException: java.io.FileNotFoundException: /home/analysis.engine/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-ib-289887-Data.db (Too many open files)
at org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:46)
at org.apache.cassandra.io.util.CompressedSegmentedFile.createReader(CompressedSegmentedFile.java:57)
at org.apache.cassandra.io.util.PoolingSegmentedFile.getSegment(PoolingSegmentedFile.java:41)
at org.apache.cassandra.io.sstable.SSTableReader.getFileDataInput(SSTableReader.java:976)
at org.apache.cassandra.db.columniterator.SimpleSliceReader.<init>(SimpleSliceReader.java:61)
at org.apache.cassandra.db.columniterator.SSTableSliceIterator.createReader(SSTableSliceIterator.java:68)
at org.apache.cassandra.db.columniterator.SSTableSliceIterator.<init>(SSTableSliceIterator.java:44)
at org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:101)
at org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:68)
at org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:274)
at org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:65)
at org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1357)
at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1214)
at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1126)
at org.apache.cassandra.db.DefsTable.serializedColumnFamilies(DefsTable.java:274)
at org.apache.cassandra.db.DefsTable.loadFromTable(DefsTable.java:155)
at org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:563)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:229)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:411)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:454)
Caused by: java.io.FileNotFoundException: /home/analysis.engine/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-ib-289887-Data.db (Too many open files)
    at java.io.RandomAccessFile.open(Native Method)
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
    at org.apache.cassandra.io.util.RandomAccessReader.<init>(RandomAccessReader.java:67)
    at org.apache.cassandra.io.compress.CompressedRandomAccessReader.<init>(CompressedRandomAccessReader.java:75)
    at org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:42)
    ... 19 more

请帮助我找出问题及其解决方案。

4

2 回答 2

0

@ND 托卡雷

您是否使用 datastax 中的新 Java 驱动程序连接到 Cassandra ?

我最近遇到了同样的问题,原因是我同时引导了许多 Session。

于 2013-09-12T10:53:25.083 回答
0

请使用root权限并设置:ulimit -n 1000000

于 2013-09-13T07:56:19.880 回答