incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dunphy <bluethu...@gmail.com>
Subject cassandra site wsod's /mysql site functions
Date Wed, 28 Dec 2011 02:11:54 GMT
hello,

I am new to the world of non-relational databases. Cassandra is
refreshingly easy to setup and has a great command line environment. I
genuinely like the command line tools and look forward to learning
more.

 However I have been asked to setup a php/cassandra site that also has
some mysql components. I had the site up and running pretty quickly on
the mysql end of things. But I have been struggling to get the
cassandra portion working for several days at this point without luck.

 I am a little unfamiliar with cassandra's files but I can perform
enough configuration to get a few nodes gossiping. Although at the
moment I have to get only one website running. I've implemented sl4j.
I can start cassandra without any problems and connect to port 9160 on
telnet and use the command line tools.

 When I hit the cassandra portions of the site this is what appears
in the apache error logs:

[root@beta ~]# tail -f /var/log/httpd/jf-error.log
[Tue Dec 27 20:27:01 2011] [error] [client 173.63.16.196] PHP Fatal
error:  Uncaught exception 'TTransportException' with message 'TSocket
read 0 bytes' in
/usr/local/src/thrift/lib/php/src/transport/TSocket.php:263\nStack
trace:\n#0 /usr/local/src/thrift/lib/php/src/transport/TBufferedTransport.php(126):
TSocket->read(1024)\n#1 [internal function]:
TBufferedTransport->read(8192)\n#2
/usr/local/src/thrift/lib/php/src/packages/cassandra/Cassandra.php(519):
thrift_protocol_read_binary(Object(TBinaryProtocolAccelerated),
'cassandra_Cassa...', false)\n#3
/usr/local/src/thrift/lib/php/src/packages/cassandra/Cassandra.php(491):
CassandraClient->recv_get_range_slices()\n#4
/var/www/jf-current/includes/classes/class.Joke.php(294):
CassandraClient->get_range_slices('joke_fire1',
Object(cassandra_ColumnParent), Object(cassandra_SlicePredicate),
Object(cassandra_KeyRange), 1)\n#5
/var/www/jf-current/admin/manageJokes.php(31): Joke->GetAllJokes()\n#6
{main}\n  thrown in
/usr/local/src/thrift/lib/php/src/transport/TSocket.php on line 263,
referer: http://beta/admin/main.php

 What you see in the web browser is looks like the PHP 'white screen
of death' although no errors turn up on the screen. Although E_ALL is
configured in php.ini

 error_reporting = E_ALL & ~E_DEPRECATED



Thrift is installed and has the cassandra bindings:

[root@beta ~]# ls -l /usr/local/src/thrift/lib/php/src/packages/cassandra/
total 252
-rw-r--r-- 1 apache apache 192089 Dec 27 10:08 Cassandra.php
-rw-r--r-- 1 apache apache    308 Dec 27 10:08 cassandra_constants.php
-rw-r--r-- 1 apache apache  50965 Dec 27 10:08 cassandra_types.php


And this is what you see in the cassandra logs when I start the cassandra db.

[root@beta ~]# tail -f /etc/alternatives/cassandrahome/log/cassandra.log
SLF4J: Class path contains multiple SLF4J bindings.        [  OK  ]
SLF4J: Found binding in
[jar:file:/usr/local/apache-cassandra-1.0.6/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/usr/local/apache-cassandra-1.0.6/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
 INFO 20:27:51,817 Logging initialized
 INFO 20:27:51,824 JVM vendor/version: Java HotSpot(TM) Server VM/1.7.0_01
 INFO 20:27:51,824 Heap size: 1993342976/1994391552
 INFO 20:27:51,824 Classpath:
/etc/alternatives/cassandrahome/bin/../conf:/etc/alternatives/cassandrahome/bin/../build/classes/main:/etc/alternatives/cassandrahome/bin/../build/classes/thrift:/etc/alternatives/cassandrahome/bin/../lib/antlr-3.2.jar:/etc/alternatives/cassandrahome/bin/../lib/apache-cassandra-1.0.5.jar:/etc/alternatives/cassandrahome/bin/../lib/apache-cassandra-1.0.6.jar:/etc/alternatives/cassandrahome/bin/../lib/apache-cassandra-clientutil-1.0.5.jar:/etc/alternatives/cassandrahome/bin/../lib/apache-cassandra-clientutil-1.0.6.jar:/etc/alternatives/cassandrahome/bin/../lib/apache-cassandra-thrift-1.0.5.jar:/etc/alternatives/cassandrahome/bin/../lib/apache-cassandra-thrift-1.0.6.jar:/etc/alternatives/cassandrahome/bin/../lib/avro-1.4.0-fixes.jar:/etc/alternatives/cassandrahome/bin/../lib/avro-1.4.0-sources-fixes.jar:/etc/alternatives/cassandrahome/bin/../lib/cglib-nodep-2.2.jar:/etc/alternatives/cassandrahome/bin/../lib/commons-cli-1.1.jar:/etc/alternatives/cassandrahome/bin/../lib/commons-cli-1.2-javadoc.jar:/etc/alternatives/cassandrahome/bin/../lib/commons-codec-1.2.jar:/etc/alternatives/cassandrahome/bin/../lib/commons-collections-3.2.1.jar:/etc/alternatives/cassandrahome/bin/../lib/commons-lang-2.4.jar:/etc/alternatives/cassandrahome/bin/../lib/commons-lang3-3.1.jar:/etc/alternatives/cassandrahome/bin/../lib/compress-lzf-0.8.4.jar:/etc/alternatives/cassandrahome/bin/../lib/concurrentlinkedhashmap-lru-1.2.jar:/etc/alternatives/cassandrahome/bin/../lib/easymock-2.4.jar:/etc/alternatives/cassandrahome/bin/../lib/easymockclassextension-2.4.jar:/etc/alternatives/cassandrahome/bin/../lib/guava-r08.jar:/etc/alternatives/cassandrahome/bin/../lib/gwt-servlet.jar:/etc/alternatives/cassandrahome/bin/../lib/high-scale-lib-1.1.2.jar:/etc/alternatives/cassandrahome/bin/../lib/jackson-core-asl-1.4.0.jar:/etc/alternatives/cassandrahome/bin/../lib/jackson-mapper-asl-1.4.0.jar:/etc/alternatives/cassandrahome/bin/../lib/jamm-0.2.5.jar:/etc/alternatives/cassandrahome/bin/../lib/jline-0.9.94.jar:/etc/alternatives/cassandrahome/bin/../lib/jline-1.0.jar:/etc/alternatives/cassandrahome/bin/../lib/json-simple-1.1.jar:/etc/alternatives/cassandrahome/bin/../lib/jsr305.jar:/etc/alternatives/cassandrahome/bin/../lib/junit.jar:/etc/alternatives/cassandrahome/bin/../lib/libthrift-0.6.jar:/etc/alternatives/cassandrahome/bin/../lib/log4j-1.2.16.jar:/etc/alternatives/cassandrahome/bin/../lib/servlet-api-2.5-20081211.jar:/etc/alternatives/cassandrahome/bin/../lib/slf4j-api-1.6.1.jar:/etc/alternatives/cassandrahome/bin/../lib/slf4j-api-1.6.4.jar:/etc/alternatives/cassandrahome/bin/../lib/slf4j-log4j12-1.6.1.jar:/etc/alternatives/cassandrahome/bin/../lib/slf4j-log4j12-1.6.4.jar:/etc/alternatives/cassandrahome/bin/../lib/snakeyaml-1.6.jar:/etc/alternatives/cassandrahome/bin/../lib/snappy-java-1.0.4.1.jar:/etc/alternatives/cassandrahome/bin/../lib/tl4j-1.1.0.jar:/etc/alternatives/cassandrahome/bin/../lib/jamm-0.2.5.jar
 INFO 20:27:51,826 JNA not found. Native methods will be disabled.
 INFO 20:27:51,838 Loading settings from
file:/usr/local/apache-cassandra-1.0.6/conf/cassandra.yaml
 INFO 20:27:52,073 DiskAccessMode 'auto' determined to be standard,
indexAccessMode is standard
 INFO 20:27:52,164 Global memtable threshold is enabled at 634MB
 INFO 20:27:52,569 Opening
/var/lib/cassandra/data/system/Versions-hb-10 (247 bytes)
 INFO 20:27:52,600 Opening
/var/lib/cassandra/data/system/LocationInfo-hc-34 (412 bytes)
 INFO 20:27:52,603 Opening
/var/lib/cassandra/data/system/LocationInfo-hc-36 (163 bytes)
 INFO 20:27:52,714 Couldn't detect any schema definitions in local storage.
 INFO 20:27:52,715 Found table data in data directories. Consider
using the CLI to define your schema.
 INFO 20:27:52,738 Creating new commitlog segment
/var/lib/cassandra/commitlog/CommitLog-1325035672738.log
 INFO 20:27:52,749 Replaying
/var/lib/cassandra/commitlog/CommitLog-1325035216334.log
 INFO 20:27:52,782 Finished reading
/var/lib/cassandra/commitlog/CommitLog-1325035216334.log
 INFO 20:27:52,791 Enqueuing flush of
Memtable-Versions@22236556(83/103 serialized/live bytes, 3 ops)
 INFO 20:27:52,795 Writing Memtable-Versions@22236556(83/103
serialized/live bytes, 3 ops)
 INFO 20:27:52,854 Completed flushing
/var/lib/cassandra/data/system/Versions-hb-11-Data.db (247 bytes)
 INFO 20:27:52,864 Log replay complete, 3 replayed mutations
 INFO 20:27:52,873 Cassandra version: 1.0.5
 INFO 20:27:52,873 Thrift API version: 19.19.0
 INFO 20:27:52,873 Loading persisted ring state
 INFO 20:27:52,878 Starting up server gossip
 INFO 20:27:52,892 Enqueuing flush of
Memtable-LocationInfo@10684447(29/36 serialized/live bytes, 1 ops)
 INFO 20:27:52,893 Writing Memtable-LocationInfo@10684447(29/36
serialized/live bytes, 1 ops)
 INFO 20:27:52,919 Completed flushing
/var/lib/cassandra/data/system/LocationInfo-hb-37-Data.db (80 bytes)
 INFO 20:27:52,931 Starting Messaging Service on port 7000
 INFO 20:27:52,943 Using saved token 46294025754471793489254659380161280856
 INFO 20:27:52,945 Enqueuing flush of
Memtable-LocationInfo@26017982(53/66 serialized/live bytes, 2 ops)
 INFO 20:27:52,945 Writing Memtable-LocationInfo@26017982(53/66
serialized/live bytes, 2 ops)
 INFO 20:27:52,965 Completed flushing
/var/lib/cassandra/data/system/LocationInfo-hb-38-Data.db (163 bytes)
 INFO 20:27:52,968 Node localhost/127.0.0.1 state jump to normal
 INFO 20:27:52,969 Bootstrap/Replace/Move completed! Now serving reads.
 INFO 20:27:52,970 Will not load MX4J, mx4j-tools.jar is not in the classpath

 The original website used cassandra 0.6.8 but I have also been asked
to use the latest version so at this point I am using 1.0.6. I have
done my best to duplicate the libraries used in the old version of the
site.

 Here are the libraries from the old (0.6.8) that the site was
originally running with:

 [root@beta ~]# ls -l /var/www/jf-current/apache-cassandra-0.6.8/lib
total 9700
-rw-r--r-- 1 apache apache 1906965 Dec 27 10:10 antlr-3.1.3.jar
-rw-r--r-- 1 apache apache 1293367 Dec 27 10:10 apache-cassandra-0.6.8.jar
-rw-r--r-- 1 apache apache   24360 Dec 27 10:10 clhm-production.jar
-rw-r--r-- 1 apache apache   36174 Dec 27 10:10 commons-cli-1.1.jar
-rw-r--r-- 1 apache apache   30085 Dec 27 10:10 commons-codec-1.2.jar
-rw-r--r-- 1 apache apache  575389 Dec 27 10:10 commons-collections-3.2.1.jar
-rw-r--r-- 1 apache apache  261809 Dec 27 10:10 commons-lang-2.4.jar
-rw-r--r-- 1 apache apache  639592 Dec 27 10:10 google-collections-1.0.jar
-rw-r--r-- 1 apache apache 2682112 Dec 27 10:10 hadoop-core-0.20.1.jar
-rw-r--r-- 1 apache apache  255915 Dec 27 10:10 high-scale-lib.jar
-rw-r--r-- 1 apache apache  910990 Dec 27 10:10 ivy-2.1.0.jar
-rw-r--r-- 1 apache apache  150249 Dec 27 10:10 jackson-core-asl-1.4.0.jar
-rw-r--r-- 1 apache apache  386237 Dec 27 10:10 jackson-mapper-asl-1.4.0.jar
-rw-r--r-- 1 apache apache   87325 Dec 27 10:10 jline-0.9.94.jar
-rw-r--r-- 1 apache apache   16046 Dec 27 10:10 json-simple-1.1.jar
-rw-r--r-- 1 apache apache  188158 Dec 27 10:10 libthrift-r917130.jar
drwxr-xr-x 2 apache apache    4096 Dec 27 10:10 licenses
-rw-r--r-- 1 apache apache  367444 Dec 27 10:10 log4j-1.2.14.jar
-rw-r--r-- 1 apache apache   23445 Dec 27 10:10 slf4j-api-1.5.8.jar
-rw-r--r-- 1 apache apache    9679 Dec 27 10:10 slf4j-log4j12-1.5.8.jar

And these are the libraries I have installed on the new (1.06.) version:

[root@beta ~]# ls -l /etc/alternatives/cassandrahome/lib/
total 15248
-rw-r--r-- 1 root root 1928009 Dec 27 10:06 antlr-3.2.jar
-rw-r--r-- 1 root root 1796527 Dec 27 10:06 apache-cassandra-1.0.5.jar
-rw-r--r-- 1 root root 1798770 Dec 27 10:06 apache-cassandra-1.0.6.jar
-rw-r--r-- 1 root root   31856 Dec 27 10:06
apache-cassandra-clientutil-1.0.5.jar
-rw-r--r-- 1 root root   31856 Dec 27 10:06
apache-cassandra-clientutil-1.0.6.jar
-rw-r--r-- 1 root root  861683 Dec 27 10:06 apache-cassandra-thrift-1.0.5.jar
-rw-r--r-- 1 root root  861683 Dec 27 10:06 apache-cassandra-thrift-1.0.6.jar
-rw-r--r-- 1 root root  596381 Dec 27 10:06 avro-1.4.0-fixes.jar
-rw-r--r-- 1 root root  276425 Dec 27 10:06 avro-1.4.0-sources-fixes.jar
-rw-r--r-- 1 root root  322362 Dec 27 10:06 cglib-nodep-2.2.jar
-rw-r--r-- 1 root root   36174 Dec 27 10:06 commons-cli-1.1.jar
-rw-r--r-- 1 root root  214274 Dec 27 10:06 commons-cli-1.2-javadoc.jar
-rw-r--r-- 1 root root   30085 Dec 27 10:06 commons-codec-1.2.jar
-rw-r--r-- 1 root root  575389 Dec 27 10:06 commons-collections-3.2.1.jar
-rw-r--r-- 1 root root  261809 Dec 27 10:06 commons-lang-2.4.jar
-rw-r--r-- 1 root root  315805 Dec 27 10:06 commons-lang3-3.1.jar
-rw-r--r-- 1 root root   25490 Dec 27 10:06 compress-lzf-0.8.4.jar
-rw-r--r-- 1 root root   53011 Dec 27 10:06 concurrentlinkedhashmap-lru-1.2.jar
-rw-r--r-- 1 root root   78815 Dec 27 10:06 easymock-2.4.jar
-rw-r--r-- 1 root root   56010 Dec 27 10:06 easymockclassextension-2.4.jar
-rw-r--r-- 1 root root 1112253 Dec 27 10:06 guava-r08.jar
-rw-r--r-- 1 root root  938019 Dec 27 10:06 gwt-servlet.jar
-rw-r--r-- 1 root root   96046 Dec 27 10:06 high-scale-lib-1.1.2.jar
-rw-r--r-- 1 root root  150249 Dec 27 10:06 jackson-core-asl-1.4.0.jar
-rw-r--r-- 1 root root  386237 Dec 27 10:06 jackson-mapper-asl-1.4.0.jar
-rw-r--r-- 1 root root    5792 Dec 27 10:06 jamm-0.2.5.jar
-rw-r--r-- 1 root root   87325 Dec 27 10:06 jline-0.9.94.jar
-rw-r--r-- 1 root root   91183 Dec 27 10:06 jline-1.0.jar
-rw-r--r-- 1 root root   16046 Dec 27 10:06 json-simple-1.1.jar
-rw-r--r-- 1 root root   33017 Dec 27 10:06 jsr305.jar
-rw-r--r-- 1 root root  121070 Dec 27 10:06 junit.jar
-rw-r--r-- 1 root root  295890 Dec 27 10:06 libthrift-0.6.jar
drwxr-xr-x 2 root root    4096 Dec 27 10:06 licenses
-rw-r--r-- 1 root root  481534 Dec 27 10:06 log4j-1.2.16.jar
-rw-r--r-- 1 root root  134133 Dec 27 10:06 servlet-api-2.5-20081211.jar
-rw-r--r-- 1 root root   25496 Dec 27 10:06 slf4j-api-1.6.1.jar
-rw-r--r-- 1 root root   25962 Dec 27 10:06 slf4j-api-1.6.4.jar
-rw-r--r-- 1 root root    9753 Dec 27 10:06 slf4j-log4j12-1.6.1.jar
-rw-r--r-- 1 root root    9748 Dec 27 10:06 slf4j-log4j12-1.6.4.jar
-rw-r--r-- 1 root root  232121 Dec 27 10:06 snakeyaml-1.6.jar
-rw-r--r-- 1 root root  995967 Dec 27 10:06 snappy-java-1.0.4.1.jar
-rw-r--r-- 1 root root    5578 Dec 27 10:06 tl4j-1.1.0.jar



I'd be happy to provide some additional info in regards to configs if
I can get some pointers on where and what to look for.

I hope to resolve this in the coming days and I would greatly
appreciate any input you might have. Thanks in advance!

Regards,
tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Mime
View raw message