You are not logged in.

#1 2017-04-21 13:02:54

b9ny4m1n
Member
From: /root
Registered: 2017-03-05
Posts: 21

[SOLVED] cassandra.service fail to start

hey everyone
i currently installed Apache Cassandra
first time i tried this:

sudo systemctl start cassandra.service

and it worked well!
and i logged into CQL shell by typing cqlsh in the terminal.


but now i cant start it anymore!
when i try to start it and then try to see it's status, i get this:

$ sudo systemctl start cassandra.service 
$ sudo systemctl status cassandra.service 
● cassandra.service - Cassandra NoSQL database
   Loaded: loaded (/usr/lib/systemd/system/cassandra.service; disabled; vendor preset
   Active: failed (Result: exit-code) since Fri 2017-04-21 17:21:02 +0430; 10min ago
     Docs: https://cassandra.apache.org/
  Process: 5720 ExecStart=/usr/bin/cassandra -p /run/cassandra/cassandra.pid (code=ex
 Main PID: 5800 (code=exited, status=1/FAILURE)
Apr 21 17:20:57 [My Hostname] systemd[1]: Starting Cassandra NoSQL database...
Apr 21 17:20:58 [My Hostname] systemd[1]: Started Cassandra NoSQL database.
Apr 21 17:21:02 [My Hostname] systemd[1]: cassandra.service: Main process exited, code=exite
Apr 21 17:21:02 [My Hostname] systemd[1]: cassandra.service: Unit entered failed state.
Apr 21 17:21:02 [My Hostname] systemd[1]: cassandra.service: Failed with result 'exit-code'.
lines 1-12/12 (END)

what is the problem?!

Last edited by b9ny4m1n (2017-04-25 08:01:01)

Offline

#2 2017-04-21 17:55:45

b9ny4m1n
Member
From: /root
Registered: 2017-03-05
Posts: 21

Re: [SOLVED] cassandra.service fail to start

guys help me please

Offline

#3 2017-04-21 17:58:20

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] cassandra.service fail to start

Do not bump: https://wiki.archlinux.org/index.php/Co … ct#Bumping

Have you tried launching the binary directly? Perhaps with a verbose or debug switch, if available.

Offline

#4 2017-04-22 14:18:00

ea7ababe
Member
Registered: 2017-04-22
Posts: 1

Re: [SOLVED] cassandra.service fail to start

So I have just installed Cassandra for the first time and ran into similar issue.
When I opened /var/log/cassandra/system.log the last line there was

ERROR [main] 2017-04-22 16:01:24,710 CassandraDaemon.java:752 - Local host name unknown: java.net.UnknownHostException: hostname: hostname: Name or se
rvice not known

The simplest solution for me was to do:

printf "%s %s %s\n" ::1       $(hostname) $(hostname) >> /etc/hosts
printf "%s %s %s\n" 127.0.0.1 $(hostname) $(hostname) >> /etc/hosts

Hope this helps.

Offline

#5 2017-04-22 14:25:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: [SOLVED] cassandra.service fail to start


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#6 2017-04-24 07:02:50

b9ny4m1n
Member
From: /root
Registered: 2017-03-05
Posts: 21

Re: [SOLVED] cassandra.service fail to start

ea7ababe wrote:

So I have just installed Cassandra for the first time and ran into similar issue.
When I opened /var/log/cassandra/system.log the last line there was

ERROR [main] 2017-04-22 16:01:24,710 CassandraDaemon.java:752 - Local host name unknown: java.net.UnknownHostException: hostname: hostname: Name or se
rvice not known

The simplest solution for me was to do:

printf "%s %s %s\n" ::1       $(hostname) $(hostname) >> /etc/hosts
printf "%s %s %s\n" 127.0.0.1 $(hostname) $(hostname) >> /etc/hosts

Hope this helps.


your answer fixed my problem. thanks a lot!
but!
i got another weird thing!
when i start cassandra.. and then trying to access CQL shell.. i get this

[~]$ cqlsh
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

BUT when i try this again! it works fine neutral

blackout [~]$ cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.10 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> 

***** UPDATED *****
after couple of reboots.. it fixed. and i can access CQL shell at the first try big_smile
thanks my friend

Last edited by b9ny4m1n (2017-04-25 08:04:33)

Offline

Board footer

Powered by FluxBB