cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasper Siero (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-2380) Cassandra requires hostname is resolvable even when specifying IP's for listen and rpc addresses
Date Wed, 05 Nov 2014 12:00:42 GMT


Jasper Siero commented on CASSANDRA-2380:

I ran into the same issue as above running CentOS 6.6 and Cassandra 2.0.11-1. I temperary
solved it by changing the script /etc/init.d/cassandra and after it running chkconfig cassandra
off; chkconfig cassandra on

@@ -4,7 +4,7 @@
 # Startup script for Cassandra
-# chkconfig: 2345 20 80
+# chkconfig: 2345 85 80
 # description: Starts and stops Cassandra
 . /etc/rc.d/init.d/functions

> Cassandra requires hostname is resolvable even when specifying IP's for listen and rpc
> ------------------------------------------------------------------------------------------------
>                 Key: CASSANDRA-2380
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.7.4
>         Environment: open jdk 1.6.0_20 64-Bit 
>            Reporter: Eric Tamme
>            Priority: Trivial
> A strange looking error is printed out, with no stack trace and no other log, when hostname
is not resolvable regardless of whether or not the hostname is being used to specify a listen
or rpc address.  I am specifically using IPv6 addresses but I have tested it with IPv4 and
gotten the same result.
> Error: Exception thrown by the agent : Local host name
> I have spent several hours trying to track down what is happening and have been unable
to determine if this is down in the java getByName->getAllByName->getAllByName0 set
of methods that is happening when  
> listenAddress = InetAddress.getByName(conf.listen_address);
> is called from
> I am not able to replicate the error in a stand alone java program (see below) so I am
not sure what cassandra is doing to force name resolution.  Perhaps the issue is not in DatabaseDescriptor,
but some where else?  I get no log output, and no stack trace when this happens, only the
single line error.
> import;
> import;
> class Test
> {
>     public static void main(String args[])
>     {
>         try
>         {
>             InetAddress listenAddress = InetAddress.getByName("foo");
>             System.out.println(listenAddress);
>         }
>         catch (UnknownHostException e)
>         {
>             System.out.println("Unable to parse address");
>         }
>     }
> }
> People have just said "oh go put a line in your hosts file" and while that does work,
it is not right.  If I am not using my hostname for any reason cassandra should not have to
resolve it, and carrying around that application specific stuff in your hosts file is not
> Regardless of if this bug gets fixed, I want to better understand what the heck is going
on that makes cassandra crash and print out that exception.

This message was sent by Atlassian JIRA

View raw message