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 <flightc...@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 <jean.jeancar...@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 <rhys.campb...@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 <voytek.jar...@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
>>>
>>

Reply via email to