Hmm. Interesting ! So you suspect that cassandra-stress tries to use the thrift protocol before actually using the native protocol, right ? I might check where is the difference between cassandra-stress 3.1 and cassandra-stress 2.1 when I have some time.
Thanks. > On Mar 23, 2018, at 10:43 AM, Michael Shuler <mich...@pbandjelly.org> wrote: > > I downloaded the 3.0.16 tar to /tmp on the same host as my 2.1 node was > running (without thrift), and this worked for me: > > ./tools/bin/cassandra-stress write n=10000 -mode native cql3 > protocolVersion=3 > > Michael > > On 03/23/2018 09:30 AM, Michael Shuler wrote: >> Well, now I'm a little stumped. I tried native mode with thrift enabled, >> wrote one row, so schema is created, then set start_rpc: false, >> restarted C*, and native mode fails in the same way. So it's not just >> the schema creation phase. I also tried including -port native=9042 and >> -schema keyspace="keyspace1", along with some other options, but still >> fails for me. >> >> Perhaps some other dev might help us track this down, but I don't see >> this as a critical issue with 2.1, so may not get fixed in this branch. >> The workaround appears to be to leave port 9160 when using >> cassandra-stress on 2.1, even though not using it. >> >> It may be worthwhile to try using stress from a 2.2 or 3.0 tar on a >> client machine against the 2.1 cluster and see if that behaves any better. >> >> Michael >> >> On 03/23/2018 08:10 AM, Cyril Scetbon wrote: >>> Here is the command I use : >>> >>> cassandra-stress user profile=cass_insert_bac.yaml ops\(insert=1\) -mode >>> native cql3 user=cassandra password=cassandra -rate threads=1 >>> >>> Thrift is disabled (start_rpc: False) as I’m not supposed to use thrift >>> at all. But I was surprised >>> by org.apache.thrift.transport.TTransportException too. Does it mean >>> that it doesn’t try to use the native protocol ? >>> >>> I also tried with a command from the documentation and I get exactly the >>> same error : >>> >>> $ cassandra-stress write n=100k cl=ONE no-warmup -mode native cql3 >>> user=cassandra password=cassandra >>> Exception in thread "main" java.lang.RuntimeException: >>> org.apache.thrift.transport.TTransportException: >>> java.net.ConnectException: Connection refused >>> at >>> org.apache.cassandra.stress.settings.StressSettings.getRawThriftClient(StressSettings.java:144) >>> at >>> org.apache.cassandra.stress.settings.StressSettings.getRawThriftClient(StressSettings.java:110) >>> at >>> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpacesThrift(SettingsSchema.java:111) >>> at >>> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpaces(SettingsSchema.java:59) >>> at >>> org.apache.cassandra.stress.settings.StressSettings.maybeCreateKeyspaces(StressSettings.java:205) >>> at org.apache.cassandra.stress.StressAction.run(StressAction.java:55) >>> at org.apache.cassandra.stress.Stress.main(Stress.java:109) >>> Caused by: org.apache.thrift.transport.TTransportException: >>> java.net.ConnectException: Connection refused >>> at org.apache.thrift.transport.TSocket.open(TSocket.java:187) >>> at >>> org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81) >>> at >>> org.apache.cassandra.thrift.TFramedTransportFactory.openTransport(TFramedTransportFactory.java:41) >>> at >>> org.apache.cassandra.stress.settings.StressSettings.getRawThriftClient(StressSettings.java:124) >>> ... 6 more >>> Caused by: java.net.ConnectException: Connection refused >>> at java.net.PlainSocketImpl.socketConnect(Native Method) >>> at >>> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) >>> at >>> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) >>> at >>> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) >>> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) >>> at java.net.Socket.connect(Socket.java:589) >>> at org.apache.thrift.transport.TSocket.open(TSocket.java:182) >>> >>>> On Mar 23, 2018, at 1:00 AM, Michael Shuler <mich...@pbandjelly.org >>>> <mailto:mich...@pbandjelly.org>> wrote: >>>> >>>> Looked at your error again. The cassandra-stress example appears as if >>>> thrift is disabled, which is the default stress profile. Try >>>> `cassandra-stress write -mode native cql3 ...` for native cql stress runs. >>>> >>>> Michael >>>> >>>> On 03/22/2018 11:36 PM, Michael Shuler wrote: >>>>> dh_python is a build dependency. The runtime dependency is python. >>>>> >>>>> https://github.com/apache/cassandra/blob/cassandra-2.1/debian/control#L6 >>>>> https://github.com/apache/cassandra/blob/cassandra-2.1/debian/control#L14 >>>>> >>>>> Just upgrading to the latest 2.1.x should fix all these issues your >>>>> having. :) >>>>> >>>>> Michael >>>>> >>>>> On 03/22/2018 09:59 PM, Cyril Scetbon wrote: >>>>>> Yeah, I also had to grab a new version of the cassandra-driver which was >>>>>> fixed in 2.1.16 https://issues.apache.org/jira/browse/CASSANDRA-11850 >>>>>> otherwise cqlsh would not work with python 2.7.12. >>>>>> >>>>>> I’m surprised dh-python is not a requirement on the Cassandra package in >>>>>> your debian/control 😮 >>>>>> >>>>>> I also noticed that I get issues with cassandra-stress on >>>>>> Xenial https://pastebin.com/raw/r2umZXSV, Any idea ? >>>>>> >>>>>> Bests >>>>>> — >>>>>> Cyril Scetbon >>>>>> >>>>>>> On Mar 19, 2018, at 12:16 PM, Michael Shuler <mich...@pbandjelly.org >>>>>>> <mailto:mich...@pbandjelly.org>> wrote: >>>>>>> >>>>>>> Yep. This was fixed for 2.1.15, 2.2.7, 3.0.6, 3.6 in >>>>>>> https://issues.apache.org/jira/browse/CASSANDRA-10853 >>>>>>> >>>>>>> -- >>>>>>> Kind regards, >>>>>>> Michael >>>>>>> >>>>>>> On 03/18/2018 10:55 PM, Cyril Scetbon wrote: >>>>>>>> Okay I found that when building the package, the new helper dh_python2 >>>>>>>> must be used to fix that issue. >>>>>>>> >>>>>>>> — >>>>>>>> Cyril Scetbon >>>>>>>> >>>>>>>>> On Mar 18, 2018, at 11:08 AM, Cyril Scetbon <cyril.scet...@free.fr >>>>>>>>> <mailto:cyril.scet...@free.fr> >>>>>>>>> <mailto:cyril.scet...@free.fr>> wrote: >>>>>>>>> >>>>>>>>> Hey guys, >>>>>>>>> >>>>>>>>> Having to still use Cassandra 2.1, I have installed it on Ubuntu >>>>>>>>> Xenial and I have an issue with cqlsh. I was able to fix it by >>>>>>>>> installing python-support and a fix from 2.1.16. However I’d like to >>>>>>>>> know if there is a way to do it without installing an old package >>>>>>>>> (python-support) on Xenial. dh-python is supposed to have replaced >>>>>>>>> python-support, however cqlsh complains when it’s not installed : >>>>>>>>> >>>>>>>>> Traceback (most recent call last): >>>>>>>>> File "/usr/bin/cqlsh", line 121, in <module> >>>>>>>>> from cqlshlib import cql3handling, cqlhandling, pylexotron, >>>>>>>>> sslhandling >>>>>>>>> ImportError: No module named cqlshlib >>>>>>>>> >>>>>>>>> Is there a better way than installing that old package ? >>>>>>>>> >>>>>>>>> Thanks >>>>>>>>> — >>>>>>>>> Cyril Scetbon >>>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org >>>>>>> <mailto:user-unsubscr...@cassandra.apache.org> >>>>>>> For additional commands, e-mail: user-h...@cassandra.apache.org >>>>>>> <mailto:user-h...@cassandra.apache.org> >>>>>> >>>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org >>>> <mailto:user-unsubscr...@cassandra.apache.org> >>>> For additional commands, e-mail: user-h...@cassandra.apache.org >>>> <mailto:user-h...@cassandra.apache.org> >>>> >>> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org > For additional commands, e-mail: user-h...@cassandra.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org For additional commands, e-mail: user-h...@cassandra.apache.org