Service Apache and Tomcat cannot start together!!

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Re: Service Apache and Tomcat cannot start together!!

Postby Wiedmann » 12. August 2009 15:48

As My OS is Chinese,

O well, that was my fear.... It's really a shame, that PHP doesn't know how to access a filesystem with unicode names :-/

I will try to fix this later (need some time). I guess others have also this problem. Maybe you can test the fix for me, if I'm ready with it?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Service Apache and Tomcat cannot start together!!

Postby friendlion » 13. August 2009 04:24

O well, that was my fear.... It's really a shame, that PHP doesn't know how to access a filesystem with unicode names :-/

I will try to fix this later (need some time). I guess others have also this problem. Maybe you can test the fix for me, if I'm ready with it?


OK, I can test the fix for you ^^
friendlion
 
Posts: 9
Joined: 11. August 2009 11:10

Re: Service Apache and Tomcat cannot start together!!

Postby garlicsalt2 » 14. September 2009 01:30

Hello, I am having an identical problem. I am using (or trying to use) xampp as a portable installation. I have told setup such. As I have XAMPP installed on an external HDD, and take it from PC to PC, the drive letter is subject to change.

I have edited the mod_jk.conf file by hand, but it is restored again every time I start Tomcat. What can be done??

I have an unmodified copy of XAMPP with Tomcat add-on on my desktop, and the modified version on my Ext. HDD I'm going to run WinDirStat, and try to find which files have changed. I'll post the results later.

--Aaron
garlicsalt2
 
Posts: 3
Joined: 14. September 2009 01:15
Location: Whittier, Ca. U.S.A.

Re: Service Apache and Tomcat cannot start together!!

Postby garlicsalt2 » 14. September 2009 07:22

Two things:
1. The program is called WinMerge, not WinDirStat. My Mistake.
2. A temporary workaround is to edit the offending file, to remove the extra part of the pathname, and then MARK THE FILE AS READ-ONLY, by right-clicking, and selecting properties, then putting a check in the box for Read-only, followed by clicking on "Ok".

I hope someone can solve this problem, so that it doesn't happen in the first place.

Regards!

--Aaron.
garlicsalt2
 
Posts: 3
Joined: 14. September 2009 01:15
Location: Whittier, Ca. U.S.A.

Re: Service Apache and Tomcat cannot start together!!

Postby Golgar_2000 » 02. October 2009 07:34

Hi, I Believe I Have A Solution.
I Have Always Manually Gone & Downloaded, Installed & Configured All The Separate Programs, Apache, PHP, etc. Never Had A Problem I Couldn't Fix Or Find A Solution For, Anyway, I Have Just Downloaded & Installed XAMPP 1.7.2 Also The Tomcat Add-on. Now Everything Was Fine First Run All Services Ran Fine.

Apache
MySql
FileZilla
Mercury &
Tomcat.

The Problem Started After I Restarted My Computer. No Apache? It Says It Started But Nothing, Hmmm Strange. All The Configuration Files Where Correct. So I Mucked Around For A While, Researched Everywhere & Even Tried To Install Apache Over The Apache Directory In XAMPP. Still Nothing. So I Started Again. Uninstall, Re-Install. Hey Apache Is Working Again. This Time No Restart. So I Just Clicked The Stop Apache Button, All Good. Ok Start Apache, NOTHING AGAIN. Sound Familiar?

Now Is Not The Time To Scream, It Has Already Told You The Problem. Apache. Very Simple, Go & Check Out The Error Log (Open With Notepad) The Log Files Are Located Here

" \xampp\apache\logs

Go To The Bottom Of The Log File & You Will See The Date, Time & Status. I Found That A File Was Missing Or Could Not Be Located. The Problem Was Related To Tomcat Which Stopped Apache From Starting.

"mod_jk.so" Was Missing From " \xampp\tomcat\Server\xampp\apache\modules\

So I Found A Copy Of "mod_jk.so" Located In " \xampp\apache\modules

So Very Simple. I Copied "mod_jk.so" From “ \xampp\apache\modules To “ \xampp\tomcat\Server\xampp\apache\modules\

Clicked The Start Apache Button & TADA Apache Is Working Again.

Now If A Different File Is Missing Try Searching Your Computer For It & If You Don’t Have It Download The ZIP File From Apache.org & You Should Find It In There.

In Conclusion If Apache Won't Start Or Won't Stay On Check You Log Files It Will Tell You The Problem. I Hope This Has Helped.
Golgar_2000
 
Posts: 10
Joined: 02. October 2009 06:18

Re: Service Apache and Tomcat cannot start together!!

Postby Izzy » 02. October 2009 08:19

Golgar_2000 wrote:"mod_jk.so" Was Missing From " \xampp\tomcat\Server\xampp\apache\modules\
http://community.apachefriends.org/f/viewtopic.php?p=149962#p149962
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Service Apache and Tomcat cannot start together!!

Postby garlicsalt2 » 12. October 2009 09:25

Okay, I've tried installing XAMPP on 3 different machines, in a total of 5 places.
1 Main PC, 2 Test Machines, an external HDD, and a USB flash drive.

The problem I am having ONLY seems to occur when doing a PORTABLE install, ie. without drive letters.

I did some investigating of my own, and came across this documentation page:
xampp\tomcat\webapps\docs\api\org\apache\jk\config\ApacheConfig.html

Note the line that reads:

configHome - default parent directory for the following paths. If not set, this defaults to TOMCAT_HOME. Ignored whenever any of the following paths is absolute.

It is just a hunch, but if the other paths which were referenced are lacking a drive letter, and thus are not "absolute", then perhaps this would explain why the Tomcat home folder is being inserted into mod_jk.conf only when doing a portable install. I'll do some more checking. For now, it is 1:30 AM. Good night all.
garlicsalt2
 
Posts: 3
Joined: 14. September 2009 01:15
Location: Whittier, Ca. U.S.A.

Re: Service Apache and Tomcat cannot start together!!

Postby texasrooster » 15. January 2010 16:39

I encountered a similar problem. At start TomCat, regenerates /xampp/tomcat/conf/auto/mod_jk.conf. Per the error.log, Apache fails to start as httpd.conf references conf/extra/mod_jk.conf which in turn references this newly created/xampp/tomcat/conf/auto/mod_jk.conf. The latter mod_jk.conf then tries to load /xampp/tomcat/xampp/apache/modules/mod_jk.so, but the module is actually located in /xampp/apache/modules. The problem is that the TomCat configuration causes an incorrect path to be placed in /xampp/tomcat/conf/auto/mod_jk.conf.

A simple work-around is to copy mod_jk.so from /xampp/tomcat/xampp/apache/modules to /xampp/apache/modules.
texasrooster
 
Posts: 1
Joined: 15. January 2010 16:15

Re: Service Apache and Tomcat cannot start together!!

Postby cunneen » 05. February 2010 07:58

garlicsalt2 is on the right track.

This worked for me (with xampp installed in the root folder /xampp):

Find this line in xampp/tomcat/conf/server.xml:

Code: Select all
<Listener className="org.apache.jk.config.ApacheConfig"
                   modJk="/xampp/apache/modules/mod_jk.so"/>


change it to this:
Code: Select all
      <Listener className="org.apache.jk.config.ApacheConfig"
                   modJk="/xampp/apache/modules/mod_jk.so"
                   configHome="/"
                   jkLog="/xampp/tomcat/logs/mod_jk.log"
                   workersConfig="/xampp/tomcat/conf/jk/workers.properties" />


If your xampp is not in the root of the drive, try modifying the configHome appropriately.

Cheers,
Mike
cunneen
 
Posts: 2
Joined: 05. February 2010 07:52

Re: Service Apache and Tomcat cannot start together!!

Postby dave.khuon@gmail.com » 29. July 2010 12:15

Hi,

I have the same (above) problem:

1) installed XAMLPP (1.7.3) on C:\
XAMLPP put everything on C:\XAMLPP
I can start and stop the Apache, MySQL, FileZilla, Mercury
No problem.
2) installed XMALPP-Tomcat-addon.. (6.0.20) on C:\XAMLPP
The Tomcat is also put on C:\XAMLPP\Tomcat, however I also noticed that
there is a folder C:\XAMLPP\Tomcat\XAMLPP. Is this part of the problem?
After starting the Tomcat the first time, Apache NO LONGER works!

It seems the 2 packages dont use a consistent way of naming the starting directories, which may lead to a problem in generating the path to the mod_jk.so file.

To "temporarily" get rid of the error, I just copied the file mod_jk.so:
from C:\xampp\apache\modules to C:\xampp\tomcat\xampp\apache\modules.

No more error, I am able to start / stop all the 5 apps either from the GUI or from services. But I have no "way" of knowing what I am missing; having the same file in both place. I might have problem keeping them in sync, if they ever get updated.

I populated a Joomla15 app under xmalpp\htdocs. The Joomla installation page seems to come up alright (!?). This is as far as I get, right now...

Hope this will help someone to figure out a permanent solution that I can use.

Thanks.
dave.khuon@gmail.com
 
Posts: 2
Joined: 29. July 2010 11:32

Re: Service Apache and Tomcat cannot start together!!

Postby dave.khuon@gmail.com » 29. July 2010 12:38

Sorry, I did not see Mike's post ahead of me.

Yes, Mike's solution works for me; but I had to also move the mod_jk.so file.

Move mod_jk.so:
from C:\xampp\apache\modules to C:\xampp\tomcat\xampp\apache\modules.

Thanks.
dave.khuon@gmail.com
 
Posts: 2
Joined: 29. July 2010 11:32

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 96 guests