You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Voytek Jarnot <vo...@gmail.com> on 2020/01/08 20:37:19 UTC
Log output when Cassandra is "up"?
Needing to know when Cassandra is finished initializing and is up & running.
Had some scripts which were looking through system.log for "No gossip
backlog; proceeding", but that turns out not to be 100% reliable.
Is looking for "Starting listening for CQL clients" considered definitive?
I.E., always gets output on success, and not on failure?
Thanks
RE: [EXTERNAL] Re: Log output when Cassandra is "up"?
Posted by "Durity, Sean R" <SE...@homedepot.com>.
I use a script that calls nodetool info. If nodetool info returns an error (instance isn’t up, on the way up, etc.) then I return that same error code (and I know the node is NOT OK). If nodetool info succeeds, I then parse the output for each protocol to be up. A node can be up, but have gossip or cql down/unavailable. That node is also NOT OK.
If all this passes, then the node is OK.
I would love if there was something simpler, like the Informix onstat - | grep “On-line” …
Sean Durity
From: Deepak Vohra <dv...@yahoo.com.INVALID>
Sent: Wednesday, January 8, 2020 4:12 PM
To: user@cassandra.apache.org; Voytek Jarnot <vo...@gmail.com>
Subject: [EXTERNAL] Re: Log output when Cassandra is "up"?
Use the nodetool status command.
nodetool status
Datacenter: us-east-1
=====================
Status=Up/Down|/ State=Normal/Leaving/Joining/Moving-- Address Load Tokens Owns (effective) Host ID Rack
UN 10.0.1.115 205.6 KiB 256 66.9% b64cb32a-b32a-46b4-9eeb-e123fa8fc287 us-east-1b
UN 10.0.3.206 182.67 KiB 256 63.5% 74863177-684b-45f4-99f7-d1006625dc9e us-east-1d
UN 10.0.2.238 240.81 KiB 256 69.6% 4dcdadd2-41f9-4f34-9892-1f20868b27c7 us-east-1c
UN in 1st column implies status is Up and Normal.
On Wednesday, January 8, 2020, 08:37:42 p.m. UTC, Voytek Jarnot <vo...@gmail.com>> wrote:
Needing to know when Cassandra is finished initializing and is up & running.
Had some scripts which were looking through system.log for "No gossip backlog; proceeding", but that turns out not to be 100% reliable.
Is looking for "Starting listening for CQL clients" considered definitive? I.E., always gets output on success, and not on failure?
Thanks
________________________________
The information in this Internet Email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Email are subject to the terms and conditions expressed in any applicable governing The Home Depot terms of business or client engagement letter. The Home Depot disclaims all responsibility and liability for the accuracy and content of this attachment and for any damages or losses arising from any inaccuracies, errors, viruses, e.g., worms, trojan horses, etc., or other items of a destructive nature, which may be contained in this attachment and shall not be liable for direct, indirect, consequential or special damages in connection with this e-mail message or its attachment.
Re: Log output when Cassandra is "up"?
Posted by Deepak Vohra <dv...@yahoo.com.INVALID>.
Use the nodetool status command.
nodetool status
Datacenter: us-east-1
=====================
Status=Up/Down|/ State=Normal/Leaving/Joining/Moving-- Address Load Tokens Owns (effective) Host ID Rack
UN 10.0.1.115 205.6 KiB 256 66.9% b64cb32a-b32a-46b4-9eeb-e123fa8fc287 us-east-1b
UN 10.0.3.206 182.67 KiB 256 63.5% 74863177-684b-45f4-99f7-d1006625dc9e us-east-1d
UN 10.0.2.238 240.81 KiB 256 69.6% 4dcdadd2-41f9-4f34-9892-1f20868b27c7 us-east-1c
UN in 1st column implies status is Up and Normal.
On Wednesday, January 8, 2020, 08:37:42 p.m. UTC, Voytek Jarnot <vo...@gmail.com> wrote:
Needing to know when Cassandra is finished initializing and is up & running.
Had some scripts which were looking through system.log for "No gossip backlog; proceeding", but that turns out not to be 100% reliable.
Is looking for "Starting listening for CQL clients" considered definitive? I.E., always gets output on success, and not on failure?
Thanks
Re: Log output when Cassandra is "up"?
Posted by John Belliveau <be...@gmail.com>.
I have always relied upon the "Starting listening for CQL clients" message
as a solid indicator of service readiness.
John
On Wed, Jan 8, 2020 at 3:37 PM Voytek Jarnot <vo...@gmail.com>
wrote:
> Needing to know when Cassandra is finished initializing and is up &
> running.
>
> Had some scripts which were looking through system.log for "No gossip
> backlog; proceeding", but that turns out not to be 100% reliable.
>
> Is looking for "Starting listening for CQL clients" considered definitive?
> I.E., always gets output on success, and not on failure?
>
> Thanks
>
Re: Log output when Cassandra is "up"?
Posted by Jai Bheemsen Rao Dhanwada <ja...@gmail.com>.
One more better way if you would like to do using cli is
nodetool statusbinary
running: if cql port starts up
Not running: if the machine is not ready to accept reads and writes
On Monday, January 13, 2020, Erick Ramirez <fl...@gmail.com> wrote:
> Yes, a line like this in the system.log indicates that Cassandra has
> started successfully on a node:
>
> INFO [main] 2019-12-17 03:03:37,526 Server.java:156 - Starting listening
>> for CQL clients on /x.x.x.x:9042 (unencrypted)...
>
>
> If you're looking for a simpler way of determining it from the command
> line, you can use netstat or lsof to check if the node is listening on
> port 9042 (default). Here are sample commands:
>
> $ sudo lsof -i :9042
>> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
>> java 18739 ubuntu 83u IPv4 49512 0t0 TCP localhost:9042
>> (LISTEN)
>
>
> $ netstat -ltnp | grep 9042
>> tcp 0 0 127.0.0.1:9042 0.0.0.0:*
>> LISTEN 18739/java
>
>
> Obviously, you'll need to adjust it accordingly if you've set the native
> transport port to another value. Cheers!
>
> On Sat, Jan 11, 2020 at 1:40 AM Jean Carlo <je...@gmail.com>
> wrote:
>
>> Hello
>>
>> Using nodetool status can be slow meanwhile your cluster is bigger. Not
>> sure about nodetoo info but I prefer to rely on the message "Starting
>> listening for CQL clients".
>>
>> In my company we use a script that checks the cqlsh command. if it
>> succeed then that node is ready and UP.
>>
>> Concerning to "Starting listening for CQL clients" message, once you get
>> it, you will be able to do cqlsh, so both of them are the same
>>
>> Cheers
>>
>> Jean Carlo
>>
>> "The best way to predict the future is to invent it" Alan Kay
>>
>>
>> On Thu, Jan 9, 2020 at 9:14 AM <Rh...@swisscom.com> wrote:
>>
>>> I've always used the wait_for task on port 9042 for Ansible
>>>
>>>
>>>
>>> https://docs.ansible.com/ansible/latest/modules/wait_for_module.html
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *From:* Voytek Jarnot <vo...@gmail.com>
>>> *Sent:* 08 January 2020 21:37
>>> *To:* user@cassandra.apache.org
>>> *Subject:* Log output when Cassandra is "up"?
>>>
>>>
>>>
>>> Needing to know when Cassandra is finished initializing and is up &
>>> running.
>>>
>>>
>>>
>>> Had some scripts which were looking through system.log for "No gossip
>>> backlog; proceeding", but that turns out not to be 100% reliable.
>>>
>>>
>>>
>>> Is looking for "Starting listening for CQL clients" considered
>>> definitive? I.E., always gets output on success, and not on failure?
>>>
>>>
>>>
>>> Thanks
>>>
>>
Re: Log output when Cassandra is "up"?
Posted by Erick Ramirez <fl...@gmail.com>.
Yes, a line like this in the system.log indicates that Cassandra has
started successfully on a node:
INFO [main] 2019-12-17 03:03:37,526 Server.java:156 - Starting listening
> for CQL clients on /x.x.x.x:9042 (unencrypted)...
If you're looking for a simpler way of determining it from the command
line, you can use netstat or lsof to check if the node is listening on port
9042 (default). Here are sample commands:
$ sudo lsof -i :9042
> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> java 18739 ubuntu 83u IPv4 49512 0t0 TCP localhost:9042
> (LISTEN)
$ netstat -ltnp | grep 9042
> tcp 0 0 127.0.0.1:9042 0.0.0.0:*
> LISTEN 18739/java
Obviously, you'll need to adjust it accordingly if you've set the native
transport port to another value. Cheers!
On Sat, Jan 11, 2020 at 1:40 AM Jean Carlo <je...@gmail.com>
wrote:
> Hello
>
> Using nodetool status can be slow meanwhile your cluster is bigger. Not
> sure about nodetoo info but I prefer to rely on the message "Starting
> listening for CQL clients".
>
> In my company we use a script that checks the cqlsh command. if it
> succeed then that node is ready and UP.
>
> Concerning to "Starting listening for CQL clients" message, once you get
> it, you will be able to do cqlsh, so both of them are the same
>
> Cheers
>
> Jean Carlo
>
> "The best way to predict the future is to invent it" Alan Kay
>
>
> On Thu, Jan 9, 2020 at 9:14 AM <Rh...@swisscom.com> wrote:
>
>> I've always used the wait_for task on port 9042 for Ansible
>>
>>
>>
>> https://docs.ansible.com/ansible/latest/modules/wait_for_module.html
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *From:* Voytek Jarnot <vo...@gmail.com>
>> *Sent:* 08 January 2020 21:37
>> *To:* user@cassandra.apache.org
>> *Subject:* Log output when Cassandra is "up"?
>>
>>
>>
>> Needing to know when Cassandra is finished initializing and is up &
>> running.
>>
>>
>>
>> Had some scripts which were looking through system.log for "No gossip
>> backlog; proceeding", but that turns out not to be 100% reliable.
>>
>>
>>
>> Is looking for "Starting listening for CQL clients" considered
>> definitive? I.E., always gets output on success, and not on failure?
>>
>>
>>
>> Thanks
>>
>
Re: Log output when Cassandra is "up"?
Posted by Jean Carlo <je...@gmail.com>.
Hello
Using nodetool status can be slow meanwhile your cluster is bigger. Not
sure about nodetoo info but I prefer to rely on the message "Starting
listening for CQL clients".
In my company we use a script that checks the cqlsh command. if it succeed
then that node is ready and UP.
Concerning to "Starting listening for CQL clients" message, once you get
it, you will be able to do cqlsh, so both of them are the same
Cheers
Jean Carlo
"The best way to predict the future is to invent it" Alan Kay
On Thu, Jan 9, 2020 at 9:14 AM <Rh...@swisscom.com> wrote:
> I've always used the wait_for task on port 9042 for Ansible
>
>
>
> https://docs.ansible.com/ansible/latest/modules/wait_for_module.html
>
>
>
>
>
>
>
>
>
> *From:* Voytek Jarnot <vo...@gmail.com>
> *Sent:* 08 January 2020 21:37
> *To:* user@cassandra.apache.org
> *Subject:* Log output when Cassandra is "up"?
>
>
>
> Needing to know when Cassandra is finished initializing and is up &
> running.
>
>
>
> Had some scripts which were looking through system.log for "No gossip
> backlog; proceeding", but that turns out not to be 100% reliable.
>
>
>
> Is looking for "Starting listening for CQL clients" considered definitive?
> I.E., always gets output on success, and not on failure?
>
>
>
> Thanks
>
RE: Log output when Cassandra is "up"?
Posted by Rh...@swisscom.com.
I've always used the wait_for task on port 9042 for Ansible
https://docs.ansible.com/ansible/latest/modules/wait_for_module.html
From: Voytek Jarnot <vo...@gmail.com>
Sent: 08 January 2020 21:37
To: user@cassandra.apache.org
Subject: Log output when Cassandra is "up"?
Needing to know when Cassandra is finished initializing and is up & running.
Had some scripts which were looking through system.log for "No gossip backlog; proceeding", but that turns out not to be 100% reliable.
Is looking for "Starting listening for CQL clients" considered definitive? I.E., always gets output on success, and not on failure?
Thanks