Error: Apache does not start

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

Error: Apache does not start

Postby TDinDC » 09. September 2009 19:27

I had no problems with apache for several weeks. But suddenly it won't start. Here is the xampp/apache/logs/error.log entry (I have parsed it for easier reading)

Terminating on signal SIGTERM(15)
httpd.exe: Syntax error on line 510 of K:/xampp/apache/conf/httpd.conf:
Syntax error on line 2 of K:/xampp/apache/conf/extra/mod_jk.conf:
Syntax error on line 4 of K:/xampp/tomcat/conf/auto/mod_jk.conf:
Cannot load K:/xampp/tomcat/xampp/apache/modules/mod_jk.so into server: The specified module could not be found.

I followed through the successive folders in the log message and found that mod_jk.so does not exist in that folder. Yet line 4 of K:/xampp/tomcat/conf/auto/mod_jk.conf is looking for it there. Here is that file:

########## Auto generated on Sun Sep 06 11:19:01 EDT 2009##########

<IfModule !mod_jk.c>
LoadModule jk_module "K:/xampp/tomcat/xampp/apache/modules/mod_jk.so"
</IfModule>

JkWorkersFile "K:/xampp/tomcat/conf/jk/workers.properties"
JkLogFile "K:/xampp/tomcat/logs/mod_jk.log"

JkLogLevel emerg



<VirtualHost localhost>
ServerName localhost

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /host-manager ajp13
JkMount /host-manager/* ajp13

JkMount /docs ajp13
JkMount /docs/* ajp13

JkMount /manager ajp13
JkMount /manager/* ajp13
</VirtualHost>

I see that it was autogenerated on Sept 6th. I noted also that there is no mod_jk.log file within xampp (I assume it would be autogenerated as required.)

Finally, I searched all of xampp for mod_jk.so and found that one exists in the path \xampp\apache\modules\

So, my questions are (1) should I modify line 4 of xampp/tomcat/conf/auto/mod_jk.conf to read:

LoadModule jk_module "K:/xampp/apache/modules/mod_jk.so" ?

(2) will the missing mod_jk.log break startup of the apache service ?

Thanks,

TDinDC
TDinDC
 
Posts: 13
Joined: 24. August 2009 11:24

Re: Error: Apache does not start

Postby Wiedmann » 09. September 2009 21:53

Can you tell me exactly the steps you have used to install both packages?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Error: Apache does not start

Postby TDinDC » 09. September 2009 23:32

Can you tell me exactly the steps you have used to install both packages?


I used the XAMPP installer - everything came packaged in it to my recollection.
TDinDC
 
Posts: 13
Joined: 24. August 2009 11:24

Re: Error: Apache does not start

Postby TDinDC » 11. September 2009 16:12

Hello,

So, should I simply edit the script to point to mod_jk.so that I found in the path \xampp\apache\modules\?

Waiting for a reply.

TDinDC
TDinDC
 
Posts: 13
Joined: 24. August 2009 11:24

Re: Error: Apache does not start

Postby Lord Arlo » 11. September 2009 16:24

Try running the application with admin privileges, right click-run as administrator. It works 4 me. I hope it helps.
Lord Arlo
 
Posts: 1
Joined: 11. September 2009 16:21

Re: Error: Apache does not start

Postby TDinDC » 12. September 2009 14:02

Hrllo Lord Arlo,

Thanks for your suggestion, but I'm always in admin mode when I'm working on my web development. That's not the problem. The real issue is that one of the config files is broken by pointing to a file - mod_jk.so - that doesn't exist at the location being pointed to (see my earlier posts in this thread), so that apache startup throws an exception and dies.

Not being able to get a response on what to do, I actually have taken things into my own hands and edited the faulty config file to point to the location where the mod_jk.so file actually exists. That seems to work, but I cannot be sure it was the correct thing to do (as opposed moving or copying the referenced file, mod_jk.so, to the location being referenced.) I also can't be sure, but I have assumed there wouldn't be two files of the same name in xampp, that the mod_jk.so that is being referenced is the one required, because, while Tomcat exists in the xampp distribution, I do not start it when I start apache and MySQL - it simply isn't needed at this point.

So, until I hear differently from the moderator of this forum or someone else in the know, I'll assume I have done the right thing. Perhaps they just aren't sure of what the correct location for mod_jk.so?

TDinDC
TDinDC
 
Posts: 13
Joined: 24. August 2009 11:24

Re: Error: Apache does not start

Postby Izzy » 13. September 2009 00:44

TDinDC wrote:The real issue is that one of the config files is broken by pointing to a file - mod_jk.so - that doesn't exist at the location being pointed to (see my earlier posts in this thread), so that apache startup throws an exception and dies...

Not being able to get a response on what to do...
The developer/moderator understood your plight and because he wrote the installation script wanted to know
Wiedmann wrote:Can you tell me exactly the steps you have used to install both packages?
Which was not answered EXACTLY and is more than likely the reason for no more responses from him.

Did you use the installation script to install XAMPP and if so what choices did you select in the installation script and what version of XAMPP did you install?
What OS?

How many times did you try and install either XAMPP and/or Tomcat over any previous attempts?


After downloading and double clicking on the Tomcat self extracting archive and selecting to install it to K:\xampp all the files should have been extracted to their correct locations.

Next you would have been presented with an installation script "setup_xampp.bat" file in a command console window with the following questions that needed the default response:-
Code: Select all
 I have found some updates.

 Should I install them now?
 (Please stop XAMPP before you proceed.)

 Your choice? (y/x=exit setup): y
y is pre-selected and you would then have hit Return and get this respons:-
Code: Select all
 updating Tomcat...
 relocate Tomcat
 updating Tomcat OK. Please start first Tomcat and then Apache.

 All updates OK.

 XAMPP is ready to use.

 Press <Return> to continue:


Next you would have been given further choices:-
Code: Select all
 1. start XAMPP Control Panel
 2. relocate XAMPP
    (current path: C:\xampp)
 3. disable HTTPS (SSL)
 4. disable Server Side Includes (SSI)
 5. enable IPv4 only (current: IPv4/6 (auto))
 6. disable mod_perl
 7. disable Apache::ASP
 8. disable mod_jk

 x  Exit

 Please choose (1-8/x):
Normally you would type either 1 or x here, either way after typing your choice you would hit Return which will close the command console window.

The setup script now goes to work and does it's job of editing the conf and ini files to add the correct paths to the various files in your XAMPP installation and if after installing XAMPP these paths were incorrect then the script can not know this and simply adds the path it knows which in your case was K:\xampp\tomcat.


Weidmann wanted to know if you followed this procedure in case there may have been a doubtful bug in his script - I have just installed Tomcat in a vanilla 1.7.2 XAMPP by following the above procedure without any problems at all as would have thousands of other XAMPP users.


So you have 3 choices to allow you to move forward of which you have followed one of them already - but are there any more little path issues that may come to light further down the track.

The best choice would be to remove/delete the current tomcat folder completely (this will do no harm as a fresh install simply creates it again) and install again by following the above procedure.

Check the path in the conf file again and report back if you find it to be incorrect so the developer can once again take a look at it.

A third alternative is to right click on the tomcat addon exe file and select to open with winrar or 7zip and after reading the readme-addon-tomcat.txt, extract all the files manually and then run the C:\xampp\setup_xampp.bat file, selecting the options previously mentioned.

The location for the .so file is correct K:\xampp\apache\modules\ in an XAMPP installation.

Remember to start Tomcat before you try and start Apache.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Error: Apache does not start

Postby TDinDC » 13. September 2009 03:45

Thanks Izzy,

From your statement
The location for the .so file is correct K:\xampp\apache\modules\ in an XAMPP installation.
, it appears I have made the correct choice in editing the .conf file to point to that location.

I installed the same version 1.7.2 that you did, with no features disabled. I don't remember the exact sequence of steps as that was several weeks ago. I made no config changes other than what the install script asked for. I had installed it previously but completely removed it, including manually removing the registry keys that Mercury Mail places there, before reinstalling it.

I had previous conversations (about the earlier install) with Wiedmann, and he followed up with further questions which I subsequently answered. This time I heard nothing back from him. Hence my 'experiment' and last post. I'm new to running apache server s/w, and using it only in order to test new features for a dinosaur (ca. 1992) website I am updating to include some features that require server-side scripting and a web database. I find that forums like these are indispensible for people like me who don't do these things for a living - and I suspect there are many of us in the same boat.

Question to you: You mentioned that I should start Tomcat before apache. For my personal knowledge, can you explain the interdependencies and why this order of startups must be followed?

Thanks,

TDinDC
TDinDC
 
Posts: 13
Joined: 24. August 2009 11:24

Re: Error: Apache does not start

Postby TDinDC » 13. September 2009 04:30

Izzy,

Tomcat is the culprit!

Just finished trying out what you suggested. When I started Tomcat first, apache would not start. So, I examined the error log and found that, again, mod_jk.conf was pointing to the path "K:/xampp/tomcat/xampp/apache/modules/mod_jk.so" Again, I editied and changed the path back to "K:/xampp/apache/modules/mod_jk.so".

Here are some interesting results.

(1) THIS mod_jk.conf FILE IS THE ONE I HAVE JUST EDITED TO POINT BACK TO THE /apache/ PATH: NOTICE THE COMMENT LINE "Auto Generated" AND DATE STAMP AT THE BEGINNING.

########## Auto generated on Sat Sep 12 23:03:40 EDT 2009##########

<IfModule !mod_jk.c>
LoadModule jk_module "K:/xampp/apache/modules/mod_jk.so"
</IfModule>

JkWorkersFile "K:/xampp/tomcat/conf/jk/workers.properties"
JkLogFile "K:/xampp/tomcat/logs/mod_jk.log"

JkLogLevel emerg



<VirtualHost localhost>
ServerName localhost

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /host-manager ajp13
JkMount /host-manager/* ajp13

JkMount /docs ajp13
JkMount /docs/* ajp13

JkMount /manager ajp13
JkMount /manager/* ajp13
</VirtualHost>

(2) AFTER I MADE THESE CHANGES, I STARTED APACHE SUCCESSFULLY. AND EXAMINED THE mod_jk.conf FILE - NO CHANGES.

(3) NEXT, I STOPPED APACHE AND STARTED TOMCAT. THEN I REEXAMINED THE mod_jk.conf FILE. HERE IT IS. NOTICE THAT THE STARTUP HAS MADE SOME CHANGES IN THE PATH. SEE AGAIN THE COMMENT LINE AND DATE STAMP.

########## Auto generated on Sat Sep 12 23:09:16 EDT 2009##########

<IfModule !mod_jk.c>
LoadModule jk_module "K:/xampp/tomcat/xampp/apache/modules/mod_jk.so"
</IfModule>

JkWorkersFile "K:/xampp/tomcat/conf/jk/workers.properties"
JkLogFile "K:/xampp/tomcat/logs/mod_jk.log"

JkLogLevel emerg



<VirtualHost localhost>
ServerName localhost

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /host-manager ajp13
JkMount /host-manager/* ajp13

JkMount /docs ajp13
JkMount /docs/* ajp13

JkMount /manager ajp13
JkMount /manager/* ajp13
</VirtualHost>

(4) SO, I WENT HUNTING IN THE TOMCAT LOGS TO SEE IF I COULD FIND OUT WHAT WAS RESPONSIBLE FOR THE CHANGE, BUT FOUND NONE WITH A DATESTAMP THAT CORRESPONDS TO THE TIME I STARTED TOMCAT.

(5) NEXT, I CLEANED OUT APACHES err.log FILE SO AS TO SEE ONLY NEW CHANGES AND TRIED TO RESTART APACHE. THE xampp CONTROL PANEL SAYS THE SERVICE HAS STARTED BUT THE 'Running' ICON DOES NOT APPEAR. HERE IS THE ERROR LOG AFTER I TRIED TO START APACHE:

httpd.exe: Syntax error on line 510 of K:/xampp/apache/conf/httpd.conf: Syntax error on line 2 of K:/xampp/apache/conf/extra/mod_jk.conf: Syntax error on line 4 of K:/xampp/tomcat/conf/auto/mod_jk.conf: Cannot load K:/xampp/tomcat/xampp/apache/modules/mod_jk.so into server: The specified module could not be found.

(6) SO, NOW I UNDERSTAND WHERE THE ERROR ARISES - I PROBABLY WAS SUCCESSFUL RUNNING APACHE UP TO THE TIME I FIRST DECIDED TO SEE IF TOMCAT WORKED, SEVERAL WEEKS AFTER I FIRST STARTED RUNNING APACHE.

My conclusion is that somewhere in the Tomcat startup, someting is changing a path. I just don't know at this point what component is causing this, and there are quite a few text-only files to examine to determine what is doing it, if in fact its not being done by an executable.

The workaround, for now, is simply not to start Tomcat.

TDinDC
TDinDC
 
Posts: 13
Joined: 24. August 2009 11:24

Re: Error: Apache does not start

Postby Izzy » 14. September 2009 01:59

This topic may help in future when installing XAMPP and the correct answers to the questions asked in the installation script which for most installations may be left as the defaults:
viewtopic.php?f=16&t=36626

This post in particular which stands a good chance of also being at the root of your issues and not Tomcat explains what may have occurred in your case:
viewtopic.php?p=147071#p147071

A complete uninstall and then deleting the xampp installation folder followed by a reboot then a complete fresh install of XAMPP, then answering n to that crucial question may help you move forward.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Error: Apache does not start

Postby TDinDC » 14. September 2009 05:56

Thanks Izzy,

I think I finally understand what is happening. I have several questions.

(1) Before I uninstall xampp, are there any files or folders (plus content) other than the ones I already know about that I need to protect so I don't lose two MySQL databases I've developed? I know about two subfolders of the path K:\xampp\mysql\data\ that are named for each of the two databases. These subfolders have files named for the tables within the database with extensions .frm, .MYI and .MYD. There is also a db.opt file there. Do I need to preserve anything else in xampp file structure?

(2) There appears to be a lot of changes needed so that I can use ActiveState Komodo IDE to debug PHP scripts. It complains about quite a few "missing" dlls (I assume that there are directives in the php.ini.) From the alerts presented by Komodo IDE, there appears to to be several dozen such missing references - I'll have to write down each of these alerts as I encounter them. So, my question is (admittedly, I make the assumption that you are familiar with Komodo IDE), are there any other config files I would need to change to enable Komodo IDE to debug PHP? - in httpd.conf, for example?

By the way, just wanted to mention that it is NOT my ambition to become a guru in all of this. I'm simply a comm engineer who took an early retirement to be a full-time musician again, and I have a website advertising my services and with online products to sell. I'm simply trying to implement new capabilities in the redesign of an old website. I'm sure there are probably thousands of xampp users who understand the ins and outs of servers and server-side apps, but I'm not one of them. The past two months I've spent developing the content and apps for my website have been intense on-the-job training in javascript, php and MySQL and their supporting tools.

TDinDC
TDinDC
 
Posts: 13
Joined: 24. August 2009 11:24


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 114 guests