I have two vm in same network, I type listen_address and rpc_address in cassandra.yaml file for each node.I have edited only these three property rest of all default settings.
Here how my cassandra.yaml files looking:
vm1(ip:192.168.0.35): vm2(ip:192.168.0.36):
listen_address: 192.168.0.35 listen_address: 192.168.0.36
rpm_address: 192.168.0.35 rpc_address: 192.168.0.36
seeds: "192.168.0.36" seeds: "192.168.0.36"
And I start both of them and check bin/nodetool status
but each node running seperately not talking in each other.
I watch a sample in cassandra 2.1 and these are the only things he did and it works but not mine..
Anyone got idea ? or tried this in cassandra 3.x version ?
EDITED: here is a command message from cassandra that he is handshaking with the other node:
but he is not in the list(nodetool status) somehow..
/etc/hosts:
127.0.0.1 localhost
127.0.1.1 ubuntu
192.168.0.35 Node2
192.168.0.36 Node3
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Related
I have installed Oracle XE on linux mint, but it won't start.
when I do:
sudo /etc/init.d/oracle-xe-18c start
I get this back:
Starting Oracle Net Listener.
Starting Oracle Database instance XE.
Oracle Database instance XE started.
Failed to start Oracle Net Listener using
/opt/oracle/product/18c/dbhomeXE/bin/tnslsnr and Oracle Database
/opt/oracle/product/18c/dbhomeXE/bin/sqlplus.
Oracel configured without errors after I added localhost th /etc/hosts.
Now hosts look like this:
127.0.0.1 localhost
127.0.1.1 ksb-Latitude-E6420
# The following lines are desirable for IPv6 capable hosts ::1
ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0
ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
127.0.0.1 localhost.localdomain localhost
How can I trouble shoot this?
I can't find any logfile.
BR Kresten
I am using mac osx. i created 3 virtual box by virtualbox. I've installed centos7 minimal version on each of the virtual box.
Then i installed cassandra on each of the box. After installation it was starting by cqlsh and nodetool status command.
But after then when i was trying to link each other and edit cassandra.yaml file its started showing
('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})
i've edited the cassandra.yaml file as follows:
cluster_name: 'Home Cluster'
num_tokens: 256
partitioner: org.apache.cassandra.dht.Murmur3Partitioner
- seeds: "192.168.56.102,192.168.56.103"
storage_port: 7000
listen_address: 192.168.56.102
rpc_address: 192.168.56.102
rpc_port: 9160
endpoint_snitch: SimpleSnitch
my /etc/hosts file contains:
192.168.56.102 node01
192.168.56.103 node02
192.168.56.104 node03
Please tell me whats wrong i'm doing? My cassandra cluster not working.
solution: I got the solution from AKKI. The problem was enpoint_snitch. I made the endpoint_snitch=GossipingPropertyFileSnitch and it fixed. My now output is as follows:
[root#dbnode2 ~]# nodetool status
Datacenter: dc1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 192.168.56.101 107.38 KB 256 62.5% 0526a2e1-e6ce-4bb4-abeb-b9e33f72510a rack1
UN 192.168.56.102 106.85 KB 256 73.0% 0b7b76c2-27e8-490f-8274-571d00e60c20 rack1
UN 192.168.56.103 83.1 KB 256 64.5% 6c8d80ec-adbb-4be1-b255-f7a0b63e95c2 rack1
I had faced similar problem,
I tried the following solution:
In Cassandra.yaml file check if you have,
start_rpc = true
Changed my endpoint snitch to
endpoint_snitch: GossipingFilePropertySnitch
Opened all ports Cassandra uses on my CentOS
Cassandra inter-node ports
Port number Description
7000 Cassandra inter-node cluster communication.
7001 Cassandra SSL inter-node cluster communication.
7199 Cassandra JMX monitoring port.
Cassandra client port
Port number Description
9042 Cassandra client port.
9160 Cassandra client port (Thrift).
Command to open ports on CentOs 7(Find it according to your OS):
>sudo firewall-cmd --zone=public --add-port=9042/tcp --permanent
>sudo firewall-cmd –reload
Then Restart your systems
Also it seems that you are changing the Cassandra.Yaml file after starting cassandra.
Make sure you edit your Cassandra.yaml file on all nodes before starting Cassandra
Also remember to start the seed node first.
I am unable to connect to any nodes through opscenter. In opscenter it says that agents need to be connected inorder for opscenter to work. I checked in datastax-agent/agent.log file and found below errors.
ERROR [clojure-agent-send-off-pool-0] 2016-01-27 09:30:54,545 Can't connect to Cassandra (All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.TransportException: [/127.0.0.1:9042] Cannot connect))), retrying soon.
I checked port 9042 and 7199 both are listening..
x.x.x.10:9042 :::* LISTEN 497 499005 28550/java
pls advise.. what needs to be checked for this. Thanks
Leave broadcast_rpc_address to rpc_address as it is to point to their respective ip address as below: and changing to 0.0.0.0 is not required.
10.154.3.10 - Cassandra.yaml
broadcast_rpc_address: 10.154.3.10
rpc_address: 10.154.3.10
10.154.3.10 - address.yaml
stomp_interface: 10.154.3.XX --> (Mention the IP of opscenter server)
hosts: ["10.154.3.10"]
Restart the datastax-agent, and in agent.log, no errors will be seen.
There are few basic settings in cassandra.yaml to tune network connection params.
listen_address : localhost
Address or interface to bind to and tell other Cassandra nodes to connect to. Specifying it to localhost will always do the Right Thing. Setting listen_address to 0.0.0.0 is always wrong
rpc_address : 0.0.0.0
That unlike listen_address, you can specify 0.0.0.0, but you must also set broadcast_rpc_address to a value other than 0.0.0.0
broadcast_rpc_address: localhost
This setting will be usefull probably for redirect conversation between nodes from broadcast_rpc_address to rpc_address (i.e. Machine has two network interfaces)
If all settings is correct for you environment try to connect with console client cqlsh and try to use nodetool for monitoring state of your nodes. After try to run OPC center
System & Tools:
OS: Ubuntu 14.04 64bit
vagrant_1.8.1_x86_64
virtualbox-5.0_5.0.12-104815~Ubuntu~trusty_amd64
(VM) https://atlas.hashicorp.com/laravel/boxes/homestead-7/versions/0.2.1/providers/virtualbox.box
Im having problem with laravel & vagrant setup. The same setups used to work with laravel 5.1 but now with 5.2 its stopped working.
When I open the URL http://laravel.app it redirect to my localhost page not laravel app.
But if i do http://laravel.app:8000/ it gives Unable to connect firefox can't establish a connection to the server at laravel.app:8000.
Please guide me what i'm doing wrong. i'm new to laravel and vagrant and did managed to run 5.1 few weeks ago but now 5.2 is stcuk with virtualbox php 7
Instructions followed from laravel site:
https://laravel.com/docs/5.2
https://laravel.com/docs/5.2/homestead
~.homestead/Homestead.yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/www/sites
to: /home/vagrant/Code
sites:
- map: laravel.app
to: /home/vagrant/Code/Laravel/public
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
hosts
127.0.0.1 localhost
127.0.1.1 raven
192.168.10.10 laravel.app
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Forwarding ports...
default: 80 (guest) => 8000 (host) (adapter 1)
default: 443 (guest) => 44300 (host) (adapter 1)
default: 3306 (guest) => 33060 (host) (adapter 1)
default: 5432 (guest) => 54320 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
Your /etc/hosts file should point your domain to 127.0.0.1, this is because homestead forwards 127.0.0.1:8000 to port 80 on your vagrant box. In this case 192.168.10.10:80.
So your /etc/hosts should look like this
127.0.0.1 laravel.app
In your browser you should then access http://laravel.app:8000/
Thanks to #Wader for helping me out. With his help I found the problem.
Coming from Windows user experience the case sensitive names got me this time.
The homestead.yaml file had Laravel as site directory while my directory name was in lower case laravel. I capitalised the directory and it worked. Along with the IP change and appending the port as suggested by #Warden
Try placing
box: laravel/homestead-7
at the top of your homestead.yaml file
Then in terminal enter homestead ssh
then type in serve laravel.app /home/vagrant/Code/laravel/public
I am having trouble with a 3-node Cassandra cluster on AWS.
There is one seed node and two data nodes. The nodes are crashing
when they are launched and when I am trying to start them manually.
The error message appears in all three nodes.
Cassandra's version is 2.0.9
I have tried the following settings:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "<seed.node.public.IP>"
rpc_address: <node.public.IP>
rpc_port: 9160
listen_address: (or with the node's public IP)
storage_port: 7000
endpoint_snitch: SimpleSnitch (and RackInferringSnitch as well).
The error message is
ERROR [main] 2014-09-29 08:59:45,241 CassandraDaemon.java (line 513) Exception encountered during startup
java.lang.RuntimeException: Unable to gossip with any seeds
at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1200)
at org.apache.cassandra.service.StorageService.checkForEndpointCollision (StorageService.java:446)
at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:657)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:611)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:504)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:378)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:496)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:585)
Ports 7000, 7001, 7199, 8080, 9042, 9160, 61620 and 61621 are open within the Cluster's security group.
I have also read and tried the solutions given on the following links:
Cassandra Not Starting Up
Starting cassandra as a service does not work for 2.0.5, sudo cassandra -f works
Apache Cassandra: Unable to gossip with any seeds
Datastax Enterprise is crashing with Unable to gossip with any seeds error
https://github.com/Netflix/Priam/issues/313
Cassandra can not bind to the public IP address in EC2.
Replacing it with the public DNS or the private IP address
in listen_address, rpc_address and seeds.
The public DNS is resolving to the private IP address which is
the eth0 intherface on EC2 instances, where Cassandra is binding.
The working configuration is:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "<seed.node.public.DNS>"
rpc_address: <node.public.DNS>
rpc_port: 9160
listen_address: (or with the node's public DNS)
storage_port: 7000
endpoint_snitch: SimpleSnitch (and RackInferringSnitch as well).