Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Karaf root instance already running

Tags:

apache-karaf

I am new to apache karaf.
When I start the apache karaf by executing bat file on my windows machine. It keeps giving me below error

C:\karaf\apache-karaf-4.0.5\bin>karaf.bat
There is a Root instance already running with name root and pid 1320

I checked for this pid, but there is no process with that pid.

I also checked the process in the task manager, but no process with name kafar / root is running.

like image 543
Pranav Maniar Avatar asked Jun 07 '16 06:06

Pranav Maniar


1 Answers

I figured it out.
It seems that If we close the command window (without hitting ^D) then the pid stored does not gets cleared
Next time when it starts up, karaft reads the old pid from the properties file. Ofcourse the old process does not exist anymore, but since pid was not cleared from property file, apache karaf does not know it.

Solution :

  • Open KARAF_HOME\instances\instance.properties file
  • Set item.0.pid=0

Alternatively in development deleting KARAF_HOME\instances\instance.properties file would also work. On next startup it will create the instance.properties file

like image 140
Pranav Maniar Avatar answered Sep 24 '22 07:09

Pranav Maniar