Reputation: 395
I am new to the Cassandra database. I have downloaded Cassandra and set the JAVA_HOME. When I try to run, the following exception is thrown:
Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 7199; nested exception is:
java.net.BindException: Address already in use: JVM_Bind.
Can anyone assist me with this issue?
Upvotes: 11
Views: 25432
Reputation: 5232
Port 7199 is the default Cassandra's JMX port( used for monitoring).
In case you are trying to run multiple instances on one physical machine, modify $CASSANDRA_HOME/conf/cassandra-env.sh
configuration file and set different port, for example 7299
JMX_PORT="7299"
Upvotes: 3
Reputation: 775
I am writing the same but for windows developer command prompt : Let say its showing issue with 9042 port
netstat -ano | findstr : 9042
List all the process using port 9042
taskkill /PID 237979 /F
here 237979 is the processid which is using port 9042
Upvotes: 1
Reputation: 321
ps -ax | grep cassandra
, take note of the process id
kill <pid>
sudo ./cassandra
Upvotes: 2
Reputation: 349
For those who are facing the same problem using Ubuntu OS a solution can be to kill CassandraDaemon :
pkill -f CassandraDaemon
When you launch for the first time the command "cassandra -f" background daemon is running so Ctrl^C doesn't stop the process.
Upvotes: 16
Reputation: 1986
You could check if cassandra is running by checking the port
lsof -i :9160
if you got a result back that means it is running
If you want to kill it , do kill -9 "then the pid you got from the last step"
if you want to see the ongoing log run
cassandra -f when you start cassandra
Upvotes: 5
Reputation: 1
Download the TCPView from http://technet.microsoft.com/en-us/sysinternals/bb897437
Open the TCPView application and sort the output by Port
Click on the record which points to Port - 7199
Right click and "End Process"
Now, run the Cassandra.bat and it should work.
Upvotes: 0
Reputation: 8985
I appears that Cassandra is already running in the background. Try connecting using cassandra-cli
.
Upvotes: 2