2

I installed Cassandra on an Ubuntu server with Open JDK, fixed the stack size as this suggested and no problems are reported when starting up. However, when I try to start the service with /etc/init.d/cassandra start and then run /etc/init.d/cassandra status, I get the following error: * could not access pidfile for Cassandra. I ran all commands with sudo and I see the process on ps ux, or at least what I think it is:

root 6824 0.0 0.0 17048 336 ? Ss 15:56 0:00 jsvc.exec -user cassandra -home /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/../ -pidfile /var/run/cassandra.pid -errfile &1 -outfile /var/log/cassandra/output.log -cp /usr/share/cassandra/lib/antlr-3.2.jar:/usr/share/cassandra/lib/avro-1.4.0-fixes.jar:/usr/share/cassandra/lib/avro-1.4.0-sources-fixes.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.2.jar:/usr/share/cassandra/lib/commons-lang-2.4.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.3.jar:/usr/share/cassandra/lib/guava-r08.jar:/usr/share/cassandra/lib/high-scale-lib-1.1.2.jar:/usr/share/cassandra/lib/jackson-core-asl-1.9.2.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.9.2.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar:/usr/share/cassandra/lib/jline-0.9.94.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/share/cassandra/lib/libthrift-0.7.0.jar:/usr/share/cassandra/lib/log4j-1.2.16.jar:/usr/share/cassandra/lib/metrics-core-2.0.3.jar:/usr/share/cassandra/lib/servlet-api-2.5-20081211.jar:/usr/share/cassandra/lib/slf4j-api-1.6.1.jar:/usr/share/cassandra/lib/slf4j-log4j12-1.6.1.jar:/usr/share/cassandra/lib/snakeyaml-1.6.jar:/usr/share/cassandra/lib/snappy-java-1.0.4.1.jar:/usr/share/cassandra/lib/snaptree-0.1.jar:/usr/share/cassandra/apache-cassandra-1.1.12.jar:/usr/share/cassandra/apache-cassandra-thrift-1.1.12.jar:/usr/share/cassandra/apache-cassandra.jar:/usr/share/cassandra/stress.jar:/usr/share/java/jna.jar:/etc/cassandra:/usr/share/java/commons-daemon.jar -Dlog4j.configuration=log4j-server.properties -Dlog4j.defaultInitOverride=true -XX:HeapDumpPath=/var/lib/cassandra/java_1375459014.hprof -XX:ErrorFile=/var/lib/cassandra/hs_err_1375459014.log -ea -javaagent:/usr/share/cassandra/lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms245M -Xmx245M -Xmn61M -XX:+HeapDumpOnOutOfMemoryError -Xss500k -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseTLAB -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false org.apache.cassandra.thrift.CassandraDaemon

Any ideas on why this is not working?

Changing pid file ownership:

    $ sudo chown cassandra:cassandra cassandra.pid
    $ ls -la
    total 52
    ...
    -rw-------  1 cassandra  cassandra     5 Aug  4 17:40 cassandra.pid`
    ...
    $ sudo service cassandra status
    xss =  -ea -javaagent:/usr/share/cassandra/lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms245M -Xmx245M -Xmn61M -XX:+HeapDumpOnOutOfMemoryError -Xss280k
     * could not access pidfile for Cassandra
Community
  • 1
  • 1
Henrique P.
  • 131
  • 7
  • Is your pidfile `/var/run/cassandra.pid` writable by user cassandra? – Richard Aug 04 '13 at 10:48
  • @Richard I changed the pid's ownership and still, nothing. See my edited question above. – Henrique P. Aug 04 '13 at 17:48
  • if you find out what the problem was it will be good to post it as an answer here ,because i had the same problem now – Mostafa Jamareh Nov 09 '13 at 11:18
  • Haven't been able to figure it completely, but I took another [approach](https://www.digitalocean.com/community/articles/how-to-install-cassandra-and-run-a-single-node-cluster-on-a-ubuntu-vps) and it worked. – Henrique P. Nov 09 '13 at 15:55
  • Also check out : http://askubuntu.com/questions/435749/cant-start-an-application-as-service-but-running-as-standalone-process-simply – Rajat Gupta Mar 18 '14 at 08:10

0 Answers0