cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vineet Mishra <clearmido...@gmail.com>
Subject Re: Installing Cassandra Multinode on CentOs coming up with exception
Date Wed, 27 Aug 2014 13:47:55 GMT
Hey Patricia,

Thanks for your kind response. I will surely take care of that provided the
use of virtual nodes.

Thanks again!


On Tue, Aug 26, 2014 at 10:42 PM, Patricia Gorla <patricia@thelastpickle.com
> wrote:

> Vineet,
>
> One more thing -- you have initial_token and num_tokens both set. If you
> are trying to use virtual nodes, you should comment out initial_token as
> this setting overrides num_tokens.
>
> Cheers,
>
>
> On Tue, Aug 26, 2014 at 5:39 AM, Vineet Mishra <clearmidoubt@gmail.com>
> wrote:
>
>> Thanks Vivek!
>>
>> It was indeed a formatting issue in yaml, got it work!
>>
>>
>> On Tue, Aug 26, 2014 at 6:06 PM, Vivek Mishra <mishra.vivs@gmail.com>
>> wrote:
>>
>>> Please read about http://www.yaml.org/start.html.
>>> Looks like formatting issue. You might be missing/adding incorrect spaces
>>>
>>> Validate your YAML file. This should help you out
>>> http://yamllint.com/
>>>
>>> -Vivek
>>>
>>>
>>> On Tue, Aug 26, 2014 at 4:20 PM, Vineet Mishra <clearmidoubt@gmail.com>
>>> wrote:
>>>
>>>> Hi Mark,
>>>>
>>>> Yes I was generating my own cassandra.yaml with the configuration
>>>> mentioned below,
>>>>
>>>> cluster_name: 'node'
>>>> initial_token: 0
>>>> num_tokens: 256
>>>> seed_provider:
>>>>     - class_name: org.apache.cassandra.locator.SimpleSeedProvider
>>>> parameters:
>>>>     - seeds: "192.168.1.32"
>>>> listen_address: 192.168.1.32
>>>> rpc_address: 0.0.0.0
>>>> endpoint_snitch: RackInferringSnitch
>>>>
>>>> Similarly for second node
>>>>
>>>> cluster_name: 'node'
>>>> initial_token: 2305843009213693952
>>>> num_tokens: 256
>>>> seed_provider:
>>>>     - class_name: org.apache.cassandra.locator.SimpleSeedProvider
>>>> parameters:
>>>>     - seeds: "192.168.1.32"
>>>> listen_address: 192.168.1.36
>>>> rpc_address: 0.0.0.0
>>>> endpoint_snitch: RackInferringSnitch
>>>>
>>>> and so on. . .
>>>>
>>>>
>>>>
>>>> But even if I use default xml with the necessary configurational
>>>> changes I am getting following error.
>>>>
>>>>  INFO 16:13:38,225 Loading settings from
>>>> file:/home/cluster/cassandra/conf/cassandra.yaml
>>>> ERROR 16:13:38,301 Fatal configuration error
>>>> org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml
>>>>  at
>>>> org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:100)
>>>> at
>>>> org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:135)
>>>>  at
>>>> org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:111)
>>>> at
>>>> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:156)
>>>>  at
>>>> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:496)
>>>> at
>>>> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:585)
>>>> Caused by: while parsing a block mapping
>>>>  in 'reader', line 10, column 2:
>>>>      cluster_name: 'node'
>>>>      ^
>>>> expected <block end>, but found BlockMappingStart
>>>>  in 'reader', line 30, column 3:
>>>>       initial_token: 0
>>>>       ^
>>>>
>>>> at
>>>> org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:570)
>>>>  at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
>>>> at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143)
>>>>  at
>>>> org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
>>>> at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:159)
>>>>  at
>>>> org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
>>>> at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
>>>>  at
>>>> org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120)
>>>> at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481)
>>>>  at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:475)
>>>> at
>>>> org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:93)
>>>>  ... 5 more
>>>> Invalid yaml
>>>>
>>>> Could you figure out whats making the yaml invalid.
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> On Tue, Aug 26, 2014 at 4:06 PM, Mark Reddy <mark.l.reddy@gmail.com>
>>>> wrote:
>>>>
>>>>> You are missing commitlog_sync in your cassandra.yaml.
>>>>>
>>>>> Are you generating your own cassandra.yaml or editing the package
>>>>> default? If you are generating your own there are several configuration
>>>>> options that are required and if not present, Cassandra will fail to
>>>>> start.
>>>>>
>>>>>
>>>>> Regards,
>>>>> Mark
>>>>>
>>>>>
>>>>> On 26 August 2014 11:14, Vineet Mishra <clearmidoubt@gmail.com>
wrote:
>>>>>
>>>>>> Thanks Mark,
>>>>>> That was indeed yaml formatting issue.
>>>>>> Moreover I am getting the underlying error now,
>>>>>>
>>>>>> INFO 15:33:43,770 Loading settings from
>>>>>> file:/home/cluster/cassandra/conf/cassandra.yaml
>>>>>>  INFO 15:33:44,100 Data files directories: [/var/lib/cassandra/data]
>>>>>>  INFO 15:33:44,101 Commit log directory: /var/lib/cassandra/commitlog
>>>>>> ERROR 15:33:44,103 Fatal configuration error
>>>>>> org.apache.cassandra.exceptions.ConfigurationException: Missing
>>>>>> required directive CommitLogSync
>>>>>>  at
>>>>>> org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:147)
>>>>>> at
>>>>>> org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:111)
>>>>>>  at
>>>>>> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:156)
>>>>>> at
>>>>>> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:496)
>>>>>>  at
>>>>>> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:585)
>>>>>> Missing required directive CommitLogSync
>>>>>> Fatal configuration error; unable to start. See log for stacktrace.
>>>>>>
>>>>>> Do you have any idea about this.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>>
>>>>>> On Tue, Aug 26, 2014 at 3:07 PM, Mark Reddy <mark.l.reddy@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> It is telling you that your yaml is invalid, from looking at
the
>>>>>>> snippet you have provided it looks like the seed_provider.parameters
is not
>>>>>>> correctly indented, it should look something like:
>>>>>>>
>>>>>>> seed_provider:
>>>>>>>   - class_name: org.apache.cassandra.locator.SimpleSeedProvider
>>>>>>>     parameters:
>>>>>>>          - seeds: "192.168.1.32"
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>> Mark
>>>>>>>
>>>>>>>
>>>>>>> On 26 August 2014 08:12, Vineet Mishra <clearmidoubt@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Hi All,
>>>>>>>>
>>>>>>>> I am installing Cassandra Multinode Setup on a 4 node CentOs
>>>>>>>> Cluster, my cassandra.yaml looks like so
>>>>>>>>
>>>>>>>> cluster_name: 'node'
>>>>>>>> initial_token: 0
>>>>>>>> num_tokens: 256
>>>>>>>> seed_provider:
>>>>>>>>     - class_name: org.apache.cassandra.locator.SimpleSeedProvider
>>>>>>>> parameters:
>>>>>>>>     - seeds: "192.168.1.32"
>>>>>>>> listen_address: 192.168.1.32
>>>>>>>> rpc_address: 0.0.0.0
>>>>>>>> endpoint_snitch: RackInferringSnitch
>>>>>>>>
>>>>>>>> Similarly cassandra.yaml for second node
>>>>>>>>
>>>>>>>> cluster_name: 'node'
>>>>>>>> initial_token: 2305843009213693952
>>>>>>>> num_tokens: 256
>>>>>>>> seed_provider:
>>>>>>>>     - class_name: org.apache.cassandra.locator.SimpleSeedProvider
>>>>>>>> parameters:
>>>>>>>>     - seeds: "192.168.1.32"
>>>>>>>> listen_address: 192.168.1.36
>>>>>>>> rpc_address: 0.0.0.0
>>>>>>>> endpoint_snitch: RackInferringSnitch
>>>>>>>>
>>>>>>>> and so on. . .
>>>>>>>>
>>>>>>>> While trying to start the Server running on the Seed
>>>>>>>> node(192.168.1.32) it throws this nasty exception and didn't
start,
>>>>>>>>
>>>>>>>>
>>>>>>>> -bash-4.1$ sudo bin/cassandra
>>>>>>>>
>>>>>>>> -bash-4.1$  INFO 12:19:46,653 Logging initialized
>>>>>>>>  INFO 12:19:46,688 Loading settings from
>>>>>>>> file:/home/cluster/cassandra/conf/cassandra.yaml
>>>>>>>> ERROR 12:19:46,985 Fatal configuration error
>>>>>>>> org.apache.cassandra.exceptions.ConfigurationException: Invalid
yaml
>>>>>>>>  at
>>>>>>>> org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:100)
>>>>>>>> at
>>>>>>>> org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:135)
>>>>>>>>  at
>>>>>>>> org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:111)
>>>>>>>> at
>>>>>>>> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:156)
>>>>>>>>  at
>>>>>>>> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:496)
>>>>>>>> at
>>>>>>>> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:585)
>>>>>>>> Caused by: Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config;
>>>>>>>> exception=Cannot create property=seed_provider for
>>>>>>>> JavaBean=org.apache.cassandra.config.Config@676c6370;
>>>>>>>> java.lang.reflect.InvocationTargetException
>>>>>>>>  in 'reader', line 1, column 1:
>>>>>>>>     cluster_name: 'pcross'
>>>>>>>>     ^
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:333)
>>>>>>>>  at
>>>>>>>> org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:182)
>>>>>>>> at
>>>>>>>> org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:141)
>>>>>>>>  at
>>>>>>>> org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:127)
>>>>>>>> at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481)
>>>>>>>>  at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:475)
>>>>>>>> at
>>>>>>>> org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:93)
>>>>>>>>  ... 5 more
>>>>>>>> Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot
create
>>>>>>>> property=seed_provider for
>>>>>>>> JavaBean=org.apache.cassandra.config.Config@676c6370;
>>>>>>>> java.lang.reflect.InvocationTargetException
>>>>>>>>  at
>>>>>>>> org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:299)
>>>>>>>> at
>>>>>>>> org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:189)
>>>>>>>>  at
>>>>>>>> org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:331)
>>>>>>>> ... 11 more
>>>>>>>> Caused by: org.yaml.snakeyaml.error.YAMLException:
>>>>>>>> java.lang.reflect.InvocationTargetException
>>>>>>>> at
>>>>>>>> org.yaml.snakeyaml.constructor.Constructor$ConstructSequence.construct(Constructor.java:542)
>>>>>>>>  at
>>>>>>>> org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:182)
>>>>>>>> at
>>>>>>>> org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:296)
>>>>>>>>  ... 13 more
>>>>>>>> Caused by: java.lang.reflect.InvocationTargetException
>>>>>>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>>>>>>> Method)
>>>>>>>>  at
>>>>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>>>>>>>> at
>>>>>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>>>>>>>  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>>>>>>>> at
>>>>>>>> org.yaml.snakeyaml.constructor.Constructor$ConstructSequence.construct(Constructor.java:540)
>>>>>>>>  ... 15 more
>>>>>>>> Caused by: java.lang.NullPointerException
>>>>>>>> at
>>>>>>>> org.apache.cassandra.config.SeedProviderDef.<init>(SeedProviderDef.java:33)
>>>>>>>>  ... 20 more
>>>>>>>> Invalid yaml
>>>>>>>>
>>>>>>>>
>>>>>>>> I am not sure exactly whats making it to throw NullPointer
and halt
>>>>>>>> the process.
>>>>>>>>
>>>>>>>> Expert Advice would be appreciated!
>>>>>>>> URGENT!
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
> --
> Patricia Gorla
> @patriciagorla
>
> Consultant
> Apache Cassandra Consulting
> http://www.thelastpickle.com <http://thelastpickle.com>
>

Mime
View raw message