Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,125
Community Members
 
Community Events
165
Community Groups

Crowd cannot be started: JAVA_HOME is not configured correctly

While trying to install Crowd on Windows according to this howto, I stumbled over the above error. Here's some console output:

C:\Atlassian\Crowd>set jav
JAVA_HOME=C:\Java\jdk6

C:\Atlassian\Crowd>start_crowd.bat
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
C:\Atlassian\Crowd>

As you can see, my JAVA_HOME environment variable is actually pointed to a JDK directory. Also, this very server is already running multiple Atlassian apps (Jira, Confluence, Fisheye,...) which all work. So Java *should* be configured correctly.

Any ideas what could cause this? Where can I look? What can I do?

2 answers

1 accepted

2 votes
Answer accepted

Have you tried putting some debug into the batch files to see what is happening? start_crowd.bat just calls the catalina startup script so....

In start_crowd.bat put in

echo Using JAVA_HOME: "%JAVA_HOME%"

Then do the same in

C:\Atlassian\Crowd\apache-tomcat\bin\catalina.bat

It might give you an idea what's going on.

Just reading your error message it looks like it's finding Java somewhere (maybe system default JRE), do you get the same if you run it as an absolute path?

C:\Atlassian\Crowd\start_crowd.bat

and have you tried installing it as a service to see if it runs that way?

http://confluence.atlassian.com/display/CROWD/Installing+Crowd+as+a+Windows+Service

What version of crowd?

Neat idea. Both report the correct path.

C:\Atlassian\Crowd>start_crowd.bat
Using JAVA_HOME: "C:\Java\jdk6"
Using JAVA_HOME: "C:\Java\jdk6"
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

Hmmmm I might try reinstalling Java.

The current one, 2.3.2.

When running service.bat install Crowd, I get this error:
C:\Atlassian\Crowd\apache-tomcat\bin>service.bat install Crowd
The tomcat.exe was not found...
The CATALINA_HOME environment variable is not defined correctly.
This environment variable is needed to run this program

The Catalina_Home env-variable is indeed set to something fishy, a nonexisting directory. However, I didn't set that variable myself.

C:\Atlassian\Crowd\apache-tomcat\bin>set cat
CATALINA_HOME=C:\Atlassian\Crowd\apache-tomcat\bin\apache-tomcat

The fix is actually to set the CATALINE_HOME env-variable to the correct value myself, in my case C:\Atlassian\Crowd\apache-tomcat.

Thanks for helping me figure that out.

Apparently, CATALINA_HOME is set in start_crowd.bat, and it's set incorrectly in my opinion. I'll check, thanks very much.

Cool, glad I could help. One more thing, if something had set CATALINA_HOME then it might be something needs it, worth checking the other servers stop/start correctly at some point

I had this problem as well. Turned out I had both a JRE and a JDK installed. Even though my environment variable was set correctly and other Atlassian Apps worked fine, before the JDK, it still somehow picked up my JRE, probably from a bath.

I uninstalled the JRE and everything worked out just fine. At least got me one step closer to my install completing. Still trying to work out my other issue trying to connect crowd to MS SQL 2008R2.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

151 views 1 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you