skip to Main Content
JVMStabilityInspector.java:196 - Exiting due to error while processing commit log during initialization.
org.apache.cassandra.db.commitlog.CommitLogReadHandler$CommitLogReadException: 
  Could not read commit log descriptor in file /opt/cassandra/data/commitlog/CommitLog-7-1676434400779.log

I ran the Cassandra container in Docker, and the above error appears and stops.

It worked well before, but it doesn’t seem to work well after deleting and recreating the Cassandra container.

I think we need to clear the /opt/cassandra/data/commitlog/CommitLog-7-1676434400779.log file.

However, I am not used to using dockers.
How do I erase this file?
I’m not sure if erasing the file will fix the error.

I also asked about this problem in chatgpt. However, after asking a lot of questions for an hour, they told me to try again next time, so I haven’t solved it yet. So I’m going to post on Stack Overflow.

2

Answers


  1. So this error likely means that the commitlog file specified is corrupted. I would definitely try deleting it.

    If it’s on a running docker container, you could try something like this:

    1. Run a docker ps to get the container ID.

    2. Remove the file using docker exec. If my container ID is f6b29860bbe5:

    docker exec f6b29860bbe5 rm -rf /opt/cassandra/data/commitlog/CommitLog-7-1676434400779.log

    Login or Signup to reply.
  2. Your question is missing a lot crucial information such as which Docker image you’re running, the full Docker command you ran to start the container, and other relevant settings you’ve configured so I’m going to make several assumptions.

    The official Cassandra Docker image (see the Quickstart Guide on the Cassandra website) that we (the Cassandra project) publish stores the commit logs in /var/lib/cassandra/commitlog/ but your deployment stores it somewhere else:

      Could not read commit log descriptor in file /opt/cassandra/data/commitlog/CommitLog-7-1676434400779.log
    

    Assuming that you’re using the official image, it indicates to me that you have possibly mounted the container directories on a persistent volume on the host. If so, you will need to do a manual cleanup of all the Cassandra directories when you delete the container and recreate it.

    The list of directories you need to empty include:

    • data/
    • commitlog/
    • saved_caches/

    In your case, it might be just as easy to delete the contents of /opt/cassandra/.

    If those directories are not persisted on the Docker host then you can open an interactive bash session into the Cassandra container. For example if you’ve named your container cassandra:

    $ bash exec -it cassandra bash
    

    For details, see the docker exec manual on the Docker Docs website. Cheers!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search