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

Jeremiah Jordan commented on CASSANDRA-7363:
--------------------------------------------

[~cywjackson] the issue is those IP's won't be known later.  We only lookup the 
hostnames at startup or when we detect the file changed.  So if you add those 
DNS entries later, without updating the file, the server will not magically 
start knowing about them.  And since you have to update the file anyway to get 
it to reload, you might as well update it after you create the DNS entries.

> 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)

Reply via email to