cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jackson Chung (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7363) PropertyFileSnitch should allow name address that does not yet exist
Date Mon, 09 Jun 2014 22:49:02 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-7363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14025878#comment-14025878
] 

Jackson Chung commented on CASSANDRA-7363:
------------------------------------------

bq. This isn't possible, it needs to know the IP. Being able to specify a hostname is a convenience.
maybe this makes more sense if there is completely no known host at all ? iow , only throw
the ConfigurationException if the "reloadedMap" is empty in the end?

In aws, since we are not reserving IP, it is not possible to know the ips ahead of time. We
could use a workaround as starting the instances with those hostname first without starting
C*, but, preferably not.

Another flaw about the logic of needs to know the IP is the current check relies on 
{code}
host = InetAddress.getByName(hostString); 
{code}
This implies "If a literal IP address is supplied, only the validity of the address format
is checked.", ie: not necessary the existence of that IP. So it doesn't seem to make sense
that a non-existing IP will succeed; but a non-existing hostname will fail

> PropertyFileSnitch should allow name address that does not yet exist
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-7363
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7363
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jackson Chung
>
> when starting a new node with PropertyFileSnitch with cassandra-topology.properties contains
an unknown host, it fails with:
> {noformat}
> ERROR [main] 2014-06-06 17:48:38,233 DatabaseDescriptor.java (line 116) Fatal configuration
error
> org.apache.cassandra.exceptions.ConfigurationException: Error instantiating snitch class
'org.apache.cassandra.locator.PropertyFileSnitch'.
>         at org.apache.cassandra.utils.FBUtilities.construct(FBUtilities.java:503)
>         at org.apache.cassandra.config.DatabaseDescriptor.createEndpointSnitch(DatabaseDescriptor.java:506)
>         at org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:341)
>         at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:111)
>         at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:155)
>         at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:480)
>         at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:569)
> Caused by: org.apache.cassandra.exceptions.ConfigurationException: Unknown host cassandra11-staging.amz.relateiq.com
>         at org.apache.cassandra.locator.PropertyFileSnitch.reloadConfiguration(PropertyFileSnitch.java:174)
>         at org.apache.cassandra.locator.PropertyFileSnitch.<init>(PropertyFileSnitch.java:60)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
>         at java.lang.Class.newInstance(Class.java:433)
>         at org.apache.cassandra.utils.FBUtilities.construct(FBUtilities.java:488)
>         ... 6 more
> Caused by: java.net.UnknownHostException: cassandra11-staging.amz.relateiq.com: unknown
error
>         at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
>         at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:907)
>         at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302)
>         at java.net.InetAddress.getAllByName0(InetAddress.java:1255)
>         at java.net.InetAddress.getAllByName(InetAddress.java:1171)
>         at java.net.InetAddress.getAllByName(InetAddress.java:1105)
>         at java.net.InetAddress.getByName(InetAddress.java:1055)
>         at org.apache.cassandra.locator.PropertyFileSnitch.reloadConfiguration(PropertyFileSnitch.java:170)
>         ... 13 more
> {noformat}
> The real impact here is we are trying to launch a number of new nodes (via chef) with
pre-configured hostname (and among other variables). The additional hostname (but not yet
alive) made no impact to the existing nodes, which is good (looks like we only catch the ConfigurationException
in the watcher thread, but not on the initial start); but it causes new node fail to start.
(Pretty sure if we restart an existing one, it will fail too).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message