1

I can't make connection into my nodecluster, my nodetool status is currenty refused, i am using Cassandra 4.1 but not working trying edit in cassandra.yaml for localhost using 127.0.0.1 also edit my cassandra-env.sh for public name rename it with localhost too is also not working, so i decided to downgrade into 4.0.7 and working perfectly nothing to change into parameter of cassandra.yaml also cassandra-env.sh

Tools

  1. Cassandra 4.1
  2. Operating system : Ubuntu 20.04
  3. Java version : openjdk version "11.0.17" 2022-10-18 OpenJDK Runtime Environment (build 11.0.17+8-post-Ubuntu-1ubuntu220.04) OpenJDK 64-Bit Server VM (build 11.0.17+8-post-Ubuntu-1ubuntu220.04, mixed mode)

here the code error in my nodetool status

root@myserver:/etc/cassandra# nodetool status
nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused)'.

also in my cqlsh not working, only show like this

root@myserver:/etc/cassandra# cqlsh 161.97.96.126 9042
Connection error: ('Unable to connect to any servers', {'161.97.96.126:9042': ConnectionRefusedError(111, "Tried connecting to [('161.97.96.126', 9042)]. Last error: Connection refused")})

i was desperate, but try to install another version means downgrade from 4.1 to 4.0.7 (i make purge remove all my cassandra 4.1 file, installing from the beginning for 4.0.7), then viola nothing to change for the parameter in cassandra.yaml also cassandra-env.sh but works perfectly with my current tools above

Is Cassandra 4.1 is still not compatible with Ubuntu 20.04?

update 23-01-2023 22:10 pm

here my code when i try again installing cassandra 4.1 without edit anything, just fresh install again

root@myvps:~# sudo service cassandra status
● cassandra.service - LSB: distributed storage system for structured data
     Loaded: loaded (/etc/init.d/cassandra; generated)
     Active: active (running) since Mon 2023-01-23 14:49:41 CET; 8s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 1644739 ExecStart=/etc/init.d/cassandra start (code=exited, status=0/SUCCESS)
      Tasks: 24 (limit: 9479)
     Memory: 2.2G
     CGroup: /system.slice/cassandra.service
             └─1644848 /usr/bin/java -ea -da:net.openhft... -XX:+UseThreadPriorities -XX:+HeapDumpOnOutOfMemoryError -X>

Jan 23 14:49:41 myvps.contaboserver.net systemd[1]: Starting LSB: distributed storage system for structured data...
Jan 23 14:49:41 myvps.contaboserver.net systemd[1]: Started LSB: distributed storage system for structured data.

root@myvps:~# sudo service cassandra status
● cassandra.service - LSB: distributed storage system for structured data
     Loaded: loaded (/etc/init.d/cassandra; generated)
     Active: active (exited) since Mon 2023-01-23 14:49:41 CET; 31s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 1644739 ExecStart=/etc/init.d/cassandra start (code=exited, status=0/SUCCESS)

Jan 23 14:49:41 myvps.contaboserver.net systemd[1]: Starting LSB: distributed storage system for structured data...
Jan 23 14:49:41 myvps.contaboserver.net systemd[1]: Started LSB: distributed storage system for structured data.
root@myvps:~# nodetool version
nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused)'.
root@myvps:~# cqlsh
Connection error: ('Unable to connect to any servers', {'127.0.0.1:9042': ConnectionRefusedError(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

Update 23-01-2023 22:16 PM i try accessing 2 thing netstat -tnlp and show this

root@myvps:~# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      537/redis-server 12
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      598/nginx: master p
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      447/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      534/sshd: /usr/sbin
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      578/postgres
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      598/nginx: master p
tcp6       0      0 ::1:6379                :::*                    LISTEN      537/redis-server 12
tcp6       0      0 :::80                   :::*                    LISTEN      598/nginx: master p
tcp6       0      0 :::22                   :::*                    LISTEN      534/sshd: /usr/sbin
tcp6       0      0 ::1:5432                :::*                    LISTEN      578/postgres
tcp6       0      0 :::443                  :::*                    LISTEN      598/nginx: master p

and also type sudo lsof -nPi -sTCP:LISTEN will show this

root@myvps:~# sudo lsof -nPi -sTCP:LISTEN
COMMAND   PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
systemd-r 447 systemd-resolve   13u  IPv4  18529      0t0  TCP 127.0.0.53:53 (LISTEN)
sshd      534            root    3u  IPv4  18387      0t0  TCP *:22 (LISTEN)
sshd      534            root    4u  IPv6  18389      0t0  TCP *:22 (LISTEN)
redis-ser 537           redis    6u  IPv4  20184      0t0  TCP 127.0.0.1:6379 (LISTEN)
redis-ser 537           redis    7u  IPv6  20185      0t0  TCP [::1]:6379 (LISTEN)
postgres  578        postgres    5u  IPv6  20704      0t0  TCP [::1]:5432 (LISTEN)
postgres  578        postgres    6u  IPv4  20705      0t0  TCP 127.0.0.1:5432 (LISTEN)
nginx     598            root    6u  IPv6  18878      0t0  TCP *:443 (LISTEN)
nginx     598            root    7u  IPv4  18879      0t0  TCP *:443 (LISTEN)
nginx     598            root    8u  IPv4  18880      0t0  TCP *:80 (LISTEN)
nginx     598            root    9u  IPv6  18881      0t0  TCP *:80 (LISTEN)
nginx     601        www-data    6u  IPv6  18878      0t0  TCP *:443 (LISTEN)
nginx     601        www-data    7u  IPv4  18879      0t0  TCP *:443 (LISTEN)
nginx     601        www-data    8u  IPv4  18880      0t0  TCP *:80 (LISTEN)
nginx     601        www-data    9u  IPv6  18881      0t0  TCP *:80 (LISTEN)
nginx     602        www-data    6u  IPv6  18878      0t0  TCP *:443 (LISTEN)
nginx     602        www-data    7u  IPv4  18879      0t0  TCP *:443 (LISTEN)
nginx     602        www-data    8u  IPv4  18880      0t0  TCP *:80 (LISTEN)
nginx     602        www-data    9u  IPv6  18881      0t0  TCP *:80 (LISTEN)
nginx     603        www-data    6u  IPv6  18878      0t0  TCP *:443 (LISTEN)
nginx     603        www-data    7u  IPv4  18879      0t0  TCP *:443 (LISTEN)
nginx     603        www-data    8u  IPv4  18880      0t0  TCP *:80 (LISTEN)
nginx     603        www-data    9u  IPv6  18881      0t0  TCP *:80 (LISTEN)
nginx     604        www-data    6u  IPv6  18878      0t0  TCP *:443 (LISTEN)
nginx     604        www-data    7u  IPv4  18879      0t0  TCP *:443 (LISTEN)
nginx     604        www-data    8u  IPv4  18880      0t0  TCP *:80 (LISTEN)
nginx     604        www-data    9u  IPv6  18881      0t0  TCP *:80 (LISTEN)
1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Jan 23, 2023 at 19:48

1 Answer 1

0

I can confirm that Cassandra 4.1 works on the latest versions of Ubuntu including 20.04 LTS and 22.04 LTS.

I didn't run into any issues installing/running Cassandra 4.1 out-of-the-box. I followed the Installing Cassandra instructions documented in the official website and it just worked.

For what it's worth, I installed the same version of Java 11 as you:

openjdk version "11.0.17" 2022-10-18

After installing Cassandra 4.1 with NO configuration changes, I am able to run nodetool commands as expected:

$ nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load        Tokens  Owns (effective)  Host ID                               Rack
UN  127.0.0.1  104.37 KiB  16      100.0%            0a7969a9-0d00-42f1-a574-87dfde5e3e7d  rack1
$ nodetool version
ReleaseVersion: 4.1.0

I am also able to connect to the cluster with cqlsh:

Connected to Test Cluster at 127.0.0.1:9042
[cqlsh 6.1.0 | Cassandra 4.1.0 | CQL spec 3.4.6 | Native protocol v5]
Use HELP for help.
cqlsh>

The lsof and netstat outputs you posted show that there is no Java process running which confirms that Cassandra is not running.

You will need to check the Cassandra system.log for clues as to why is it is not running. Look for warnings and errors messages then investigate from there. Cheers!


👉 Please support the Apache Cassandra community by hovering over the tag then click on the Watch tag button. 🙏 Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.