Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Crowd cannot be started: JAVA_HOME is not configured correctly

Daniel Jilg
Contributor
August 25, 2011

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
MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2011

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.

MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2011

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

MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2011

What version of crowd?

Daniel Jilg
Contributor
August 25, 2011

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.

Daniel Jilg
Contributor
August 25, 2011

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.

Daniel Jilg
Contributor
August 25, 2011

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

MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2011

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

1 vote
Ryan Ward September 3, 2011

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
AUG Leaders

Atlassian Community Events