Can you do a netstat -lepunt and show the output? If Cassandra is running you aren't trying to connect to the ip/port it's bound to.
Patrick On Monday, May 23, 2016, joseph gao <gaojf.bok...@gmail.com> wrote: > I used to think it's firewall/network issues too. So I make ufw to be > inactive. I really don't what's the reason. > > 2016-05-09 19:01 GMT+08:00 kurt Greaves <k...@instaclustr.com > <javascript:_e(%7B%7D,'cvml','k...@instaclustr.com');>>: > >> Don't be fooled, despite saying tcp6 and :::*, it still listens on IPv4. >> As far as I'm aware this happens on all 2.1 Cassandra nodes, and may just >> be an oddity of netstat. It would be unrelated to your connection timeout >> issues, that's most likely related to firewall/network issues. >> >> On 9 May 2016 at 09:59, joseph gao <gaojf.bok...@gmail.com >> <javascript:_e(%7B%7D,'cvml','gaojf.bok...@gmail.com');>> wrote: >> >>> It doesn't work ,still using ipv6 [image: 内嵌图片 1] >>> >>> And I already set [image: 内嵌图片 2] >>> >>> Now I'm using 4.1.1 using 9160 port instead of 5.x.x。 >>> >>> Hopefully this could be resolved, Thanks! >>> >>> 2016-03-30 22:13 GMT+08:00 Alain RODRIGUEZ <arodr...@gmail.com >>> <javascript:_e(%7B%7D,'cvml','arodr...@gmail.com');>>: >>> >>>> Hi Joseph, >>>> >>>> why cassandra using tcp6 for 9042 port like : >>>>> tcp6 0 0 0.0.0.0:9042 :::* >>>>> LISTEN >>>>> >>>> >>>> if I remember correctly, in 2.1 and higher, cqlsh uses native >>>> transport, port 9042 (instead of thrift port 9160) and your clients (if >>>> any) are also probably using native transport (port 9042). So yes, this >>>> could be an issue indeed. >>>> >>>> You should have something like: >>>> >>>> tcp 0 0 1.2.3.4:9042 :::* LISTEN >>>> >>>> You are using IPv6 and no rpc address. Try setting it to the listen >>>> address and using IPv4. >>>> >>>> C*heers, >>>> >>>> ----------------------- >>>> >>>> Alain Rodriguez - al...@thelastpickle.com >>>> <javascript:_e(%7B%7D,'cvml','al...@thelastpickle.com');> >>>> >>>> France >>>> >>>> The Last Pickle - Apache Cassandra Consulting >>>> >>>> http://www.thelastpickle.com >>>> >>>> 2016-03-30 6:09 GMT+02:00 joseph gao <gaojf.bok...@gmail.com >>>> <javascript:_e(%7B%7D,'cvml','gaojf.bok...@gmail.com');>>: >>>> >>>>> why cassandra using tcp6 for 9042 port like : >>>>> tcp6 0 0 0.0.0.0:9042 :::* >>>>> LISTEN >>>>> would this be the problem >>>>> >>>>> 2016-03-30 11:34 GMT+08:00 joseph gao <gaojf.bok...@gmail.com >>>>> <javascript:_e(%7B%7D,'cvml','gaojf.bok...@gmail.com');>>: >>>>> >>>>>> still have not fixed it . cqlsh: error: no such option: >>>>>> --connect-timeout >>>>>> cqlsh version 5.0.1 >>>>>> >>>>>> >>>>>> >>>>>> 2016-03-25 16:46 GMT+08:00 Alain RODRIGUEZ <arodr...@gmail.com >>>>>> <javascript:_e(%7B%7D,'cvml','arodr...@gmail.com');>>: >>>>>> >>>>>>> Hi Joseph. >>>>>>> >>>>>>> As I can't reproduce here, I believe you are having network issue of >>>>>>> some kind. >>>>>>> >>>>>>> MacBook-Pro:~ alain$ cqlsh --version >>>>>>> cqlsh 5.0.1 >>>>>>> MacBook-Pro:~ alain$ echo 'DESCRIBE KEYSPACES;' | cqlsh >>>>>>> --connect-timeout=5 --request-timeout=10 >>>>>>> system_traces system >>>>>>> MacBook-Pro:~ alain$ >>>>>>> >>>>>>> It's been a few days, did you manage to fix it ? >>>>>>> >>>>>>> C*heers, >>>>>>> ----------------------- >>>>>>> Alain Rodriguez - al...@thelastpickle.com >>>>>>> <javascript:_e(%7B%7D,'cvml','al...@thelastpickle.com');> >>>>>>> France >>>>>>> >>>>>>> The Last Pickle - Apache Cassandra Consulting >>>>>>> http://www.thelastpickle.com >>>>>>> >>>>>>> 2016-03-21 9:59 GMT+01:00 joseph gao <gaojf.bok...@gmail.com >>>>>>> <javascript:_e(%7B%7D,'cvml','gaojf.bok...@gmail.com');>>: >>>>>>> >>>>>>>> cqlsh version 5.0.1. nodetool tpstats looks good, log looks good. >>>>>>>> And I used specified port 9042. And it immediately returns fail (less >>>>>>>> than >>>>>>>> 3 seconds). By the way where should I use '--connect-timeout', cqlsh >>>>>>>> seems >>>>>>>> don't have such parameters. >>>>>>>> >>>>>>>> 2016-03-18 17:29 GMT+08:00 Alain RODRIGUEZ <arodr...@gmail.com >>>>>>>> <javascript:_e(%7B%7D,'cvml','arodr...@gmail.com');>>: >>>>>>>> >>>>>>>>> Is the node fully healthy or rejecting some requests ? >>>>>>>>> >>>>>>>>> What are the outputs for "grep -i "ERROR" >>>>>>>>> /var/log/cassandra/system.log" and "nodetool tpstats"? >>>>>>>>> >>>>>>>>> Any error? Any pending / blocked or dropped messages? >>>>>>>>> >>>>>>>>> Also did you try using distinct ports (9160 for thrift, 9042 for >>>>>>>>> native) - out of curiosity, not sure this will help. >>>>>>>>> >>>>>>>>> What is your version of cqlsh "cqlsh --version" ? >>>>>>>>> >>>>>>>>> doesn't work most times. But some time it just work fine >>>>>>>>>> >>>>>>>>> >>>>>>>>> Do you fill like this is due to a timeout (query being too big, >>>>>>>>> cluster being to busy)? Try setting this higher: >>>>>>>>> >>>>>>>>> --connect-timeout=CONNECT_TIMEOUT >>>>>>>>> >>>>>>>>> Specify the connection timeout in seconds >>>>>>>>> (default: 5 seconds). >>>>>>>>> >>>>>>>>> --request-timeout=REQUEST_TIMEOUT >>>>>>>>> >>>>>>>>> Specify the default request timeout in >>>>>>>>> seconds (default: 10 seconds). >>>>>>>>> >>>>>>>>> C*heers, >>>>>>>>> ----------------------- >>>>>>>>> Alain Rodriguez - al...@thelastpickle.com >>>>>>>>> <javascript:_e(%7B%7D,'cvml','al...@thelastpickle.com');> >>>>>>>>> France >>>>>>>>> >>>>>>>>> The Last Pickle - Apache Cassandra Consulting >>>>>>>>> http://www.thelastpickle.com >>>>>>>>> >>>>>>>>> 2016-03-18 4:49 GMT+01:00 joseph gao <gaojf.bok...@gmail.com >>>>>>>>> <javascript:_e(%7B%7D,'cvml','gaojf.bok...@gmail.com');>>: >>>>>>>>> >>>>>>>>>> Of course yes. >>>>>>>>>> >>>>>>>>>> 2016-03-17 22:35 GMT+08:00 Vishwas Gupta < >>>>>>>>>> vishwas.gu...@snapdeal.com >>>>>>>>>> <javascript:_e(%7B%7D,'cvml','vishwas.gu...@snapdeal.com');>>: >>>>>>>>>> >>>>>>>>>>> Have you started the Cassandra service? >>>>>>>>>>> >>>>>>>>>>> sh cassandra >>>>>>>>>>> On 17-Mar-2016 7:59 pm, "Alain RODRIGUEZ" <arodr...@gmail.com >>>>>>>>>>> <javascript:_e(%7B%7D,'cvml','arodr...@gmail.com');>> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi, did you try with the address of the node rather than >>>>>>>>>>>> 127.0.0.1 >>>>>>>>>>>> >>>>>>>>>>>> Is the transport protocol used by cqlsh (not sure if it is >>>>>>>>>>>> thrift or binary - native in 2.1) active ? What is the "nodetool >>>>>>>>>>>> info" >>>>>>>>>>>> output ? >>>>>>>>>>>> >>>>>>>>>>>> C*heers, >>>>>>>>>>>> ----------------------- >>>>>>>>>>>> Alain Rodriguez - al...@thelastpickle.com >>>>>>>>>>>> <javascript:_e(%7B%7D,'cvml','al...@thelastpickle.com');> >>>>>>>>>>>> France >>>>>>>>>>>> >>>>>>>>>>>> The Last Pickle - Apache Cassandra Consulting >>>>>>>>>>>> http://www.thelastpickle.com >>>>>>>>>>>> >>>>>>>>>>>> 2016-03-17 14:26 GMT+01:00 joseph gao <gaojf.bok...@gmail.com >>>>>>>>>>>> <javascript:_e(%7B%7D,'cvml','gaojf.bok...@gmail.com');>>: >>>>>>>>>>>> >>>>>>>>>>>>> hi, all >>>>>>>>>>>>> cassandra version 2.1.7 >>>>>>>>>>>>> When I use cqlsh to connect cassandra, something is wrong >>>>>>>>>>>>> >>>>>>>>>>>>> Connection error: ( Unable to connect to any servers', >>>>>>>>>>>>> {'127.0.0.1': OperationTimedOut('errors=None, last_host=None,)}) >>>>>>>>>>>>> >>>>>>>>>>>>> This happens lots of times, but sometime it works just fine. >>>>>>>>>>>>> Anybody knows why? >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> ------ >>>>>>>>>>>>> Joseph Gao >>>>>>>>>>>>> PhoneNum:15210513582 >>>>>>>>>>>>> QQ: 409343351 >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> ------ >>>>>>>>>> Joseph Gao >>>>>>>>>> PhoneNum:15210513582 >>>>>>>>>> QQ: 409343351 >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> ------ >>>>>>>> Joseph Gao >>>>>>>> PhoneNum:15210513582 >>>>>>>> QQ: 409343351 >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ------ >>>>>> Joseph Gao >>>>>> PhoneNum:15210513582 >>>>>> QQ: 409343351 >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------ >>>>> Joseph Gao >>>>> PhoneNum:15210513582 >>>>> QQ: 409343351 >>>>> >>>> >>>> >>> >>> >>> -- >>> ------ >>> Joseph Gao >>> PhoneNum:15210513582 >>> QQ: 409343351 >>> >> >> >> >> -- >> Kurt Greaves >> k...@instaclustr.com >> <javascript:_e(%7B%7D,'cvml','k...@instaclustr.com');> >> www.instaclustr.com >> > > > > -- > ------ > Joseph Gao > PhoneNum:15210513582 > QQ: 409343351 >