tag:blogger.com,1999:blog-4443103563245822857.post946667272631941742..comments2022-07-24T01:15:34.839-07:00Comments on Stuff I do: Thrift / c_glib and CassandraFábián Tamás Lászlóhttp://www.blogger.com/profile/02408802258485717905noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-4443103563245822857.post-89805750051613262482019-04-23T01:38:41.937-07:002019-04-23T01:38:41.937-07:00The correct choice depends on the version of the s...The correct choice depends on the version of the server. See https://wiki.apache.org/cassandra/ThriftExamples for examples.Fábián Tamás Lászlóhttps://www.blogger.com/profile/02408802258485717905noreply@blogger.comtag:blogger.com,1999:blog-4443103563245822857.post-65051292245557073762019-04-23T01:32:56.744-07:002019-04-23T01:32:56.744-07:00Well, that's a pretty general error, it can be...Well, that's a pretty general error, it can be almost anything. Hard to tell from here.Fábián Tamás Lászlóhttps://www.blogger.com/profile/02408802258485717905noreply@blogger.comtag:blogger.com,1999:blog-4443103563245822857.post-60477137475257430992019-04-23T01:04:25.747-07:002019-04-23T01:04:25.747-07:00What is the basic difference between THRIFT_TYPE_B...What is the basic difference between THRIFT_TYPE_BUFFERED_TRANSPORT and THRIFT_TYPE_FRAMED_TRANSPORT in the client?<br /><br />What difference is there, related to the multiple connections? (My basic aim is to have multiple app connections to our server)<br /><br />With the BUFFERED transport, I am getting the following:<br />CRITICAL **: thrift_socket_open: assertion 'tsocket->sd == THRIFT_INVALID_SOCKET' failed<br />Could not connect to server<br /><br />But, with the FRAMED transport, I am able have connections but getting the following message:<br />** (process:2337): WARNING **: error reading start of message: failed to read 4 bytes - Success<br />** Message: thrift_simple_server_serve: failed to read 4 bytes - Success<br /><br />** (process:2337): WARNING **: error reading start of message: failed to read 4 bytes - Bad file descriptor<br />** Message: thrift_simple_server_serve: failed to read 4 bytes - Bad file descriptor<br /><br />** (process:2337): WARNING **: error reading start of message: failed to read 4 bytes - Bad file descriptor<br />** Message: thrift_simple_server_serve: failed to read 4 bytes - Bad file descriptor<br /><br />** (process:2337): WARNING **: error reading start of message: failed to read 4 bytes - Bad file descriptor<br />** Message: thrift_simple_server_serve: failed to read 4 bytes - Bad file descriptor<br /><br />** (process:2337): WARNING **: error reading start of message: failed to read 4 bytes - Bad file descriptor<br />** Message: thrift_simple_server_serve: failed to read 4 bytes - Bad file descriptor<br /><br />** (process:2337): WARNING **: error reading start of message: failed to read 4 bytes - Bad file descriptor<br />** Message: thrift_simple_server_serve: failed to read 4 bytes - Bad file descriptor<br /><br />** (process:2337): WARNING **: received invalid message type -275953940 from client<br /><br />** (process:2337): WARNING **: received invalid message type -275953940 from client<br /><br />** (process:2337): WARNING **: received invalid message type -275953940 from client<br /><br />Please guide, thanks.Anonymoushttps://www.blogger.com/profile/07634531264907724048noreply@blogger.comtag:blogger.com,1999:blog-4443103563245822857.post-15499716987717194782019-04-22T05:53:26.241-07:002019-04-22T05:53:26.241-07:00I am getting "could not connect to the server...I am getting "could not connect to the server", what might be the possible <br />reasons behind it?Anonymoushttps://www.blogger.com/profile/07634531264907724048noreply@blogger.comtag:blogger.com,1999:blog-4443103563245822857.post-78037704067133819502012-07-12T01:39:15.775-07:002012-07-12T01:39:15.775-07:00Do a
sudo ldconfig -v | grep thrift
to see if th...Do a<br /><br />sudo ldconfig -v | grep thrift<br /><br />to see if the libs got installed.<br /><br />Try<br /><br />locate libthrift_c_glib.so<br /><br />to see if the lib file is present. It's possible that libthrift_c_glib.so.0 or libthrift_c_glib.so.0.0.0 is there, but there's no libthrift_c_glib.so. If this is the case, try creating it as a symlink to the existing lib file.Anonymoushttps://www.blogger.com/profile/08895063956331790625noreply@blogger.comtag:blogger.com,1999:blog-4443103563245822857.post-78494367143610141012012-07-10T10:40:16.592-07:002012-07-10T10:40:16.592-07:00Hi!
I'll take a look at thrift to see what mi...Hi!<br /><br />I'll take a look at thrift to see what might have caused this.<br /><br />In the meantime, try to issue ldconfig as root.Fábián Tamás Lászlóhttps://www.blogger.com/profile/02408802258485717905noreply@blogger.comtag:blogger.com,1999:blog-4443103563245822857.post-50376831560023233732012-07-10T09:53:05.421-07:002012-07-10T09:53:05.421-07:00Hi Tamás,
First of all, thanks a lot. I have foun...Hi Tamás,<br /><br />First of all, thanks a lot. I have found the post extremely useful, since I am also trying to generate a c-based client fo cassandra. In this sense, I followed the same steps you mentioned, but I am facing a big trouble when trying the libtool step:<br /><br />[root@localhost gen-c_glib]# libtool --tag=CC --mode=link gcc `pkg-config --libs thrift_c_glib` -o test test.o cassandra.o cassandra_types.o<br />libtool: link: gcc -o test test.o cassandra.o cassandra_types.o -L/usr/local/lib -lthrift_c_glib -lgobject-2.0 -lglib-2.0<br />/usr/bin/ld: cannot find -lthrift_c_glib<br />collect2: ld returned 1 exit status<br /><br />Do u know the reason I am facing this issue? It seems it does not find the thift_c_glib library, but I installed it without errors by doing make install.<br /><br />Any idea?<br /><br />Thanks a lot in advance!<br />AlvaroJonás Jerko Lekohttps://www.blogger.com/profile/16355610435587947098noreply@blogger.com