Service Apache and Tomcat cannot start together!!

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

Service Apache and Tomcat cannot start together!!

Postby friendlion » 11. August 2009 11:18

I am using windows XP.
I have installed "XAMPP for Windows 1.7.2" and then installed "XAMPP for Windows Add-Ons(Tomcat 6.0.20)".

I can start Apache. And then I can start tomcat.
But then, after I have started tomcat, I cannot start Apache anymore even I stopped the tomcat... the xampp is crashed and I need reinstall again...

Anyone can help and teach me how can I start Apache and Tomcat together?
(My server need to run some php(in apache) and some war file(tomcat))

Thank you very much.
friendlion
 
Posts: 9
Joined: 11. August 2009 11:10

Re: Service Apache and Tomcat cannot start together!!

Postby Wiedmann » 11. August 2009 11:24

I have installed "XAMPP for Windows 1.7.2"

A new installation, or an update from an older one (same for Tomcat)?

I can start Apache. And then I can start tomcat.

After installation of the AddOn, first start Tomcat, then Apache (see the output from the Tomcat setup script)

the xampp is crashed

What does you mean with "xampp", Apache or the "XAMPP Control Panel, or ...?
What exactly is "crashed"? Can't start, popup error message, or ...?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Service Apache and Tomcat cannot start together!!

Postby friendlion » 11. August 2009 15:59

A new installation, or an update from an older one (same for Tomcat)?


A new installation, as I have tried several time to uninstall and install again

After installation of the AddOn, first start Tomcat, then Apache (see the output from the Tomcat setup script)


I typed wrong in the previous messages. I have first start tomcat, then apache. But after I start tomcat, apache can never start again even I restart the computer...

What does you mean with "xampp", Apache or the "XAMPP Control Panel, or ...?
What exactly is "crashed"? Can't start, popup error message, or ...?


Apache can never start again... And I cannot use it... So I cannot start both tomcat and apache...
friendlion
 
Posts: 9
Joined: 11. August 2009 11:10

Re: Service Apache and Tomcat cannot start together!!

Postby Wiedmann » 11. August 2009 16:06

apache can never start again

- What can you read in the "error.log"?
- Can you access Tomcat?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Service Apache and Tomcat cannot start together!!

Postby friendlion » 11. August 2009 16:54

- What can you read in the "error.log"?
- Can you access Tomcat?


I can access tomcat at http://localhost:8080

In C:\xampp\apache\logs\error.log, it write:
httpd.exe: Syntax error on line 510 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 2 of C:/xampp/apache/conf/extra/mod_jk.conf: Syntax error on line 4 of C:/xampp/tomcat/conf/auto/mod_jk.conf: Cannot load C:/xampp/tomcat/xampp/apache/modules/mod_jk.so into server: \xa7\xe4\xa4\xa3\xa8\xec\xab\xfc\xa9w\xaa\xba\xbc\xd2\xb2\xd5\xa1C
friendlion
 
Posts: 9
Joined: 11. August 2009 11:10

Re: Service Apache and Tomcat cannot start together!!

Postby Wiedmann » 11. August 2009 17:01

Syntax error on line 4 of C:/xampp/tomcat/conf/auto/mod_jk.conf: Cannot load C:/xampp/tomcat/xampp/apache/modules/mod_jk.so into server: \xa7\xe4\xa4\xa3\xa8\xec\xab\xfc\xa9w\xaa\xba\xbc\xd2\xb2\xd5\xa1C

Hm, this file should load "C:/xampp/apache/modules/mod_jk.so" and not "C:/xampp/tomcat/xampp/apache/modules/mod_jk.so".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Service Apache and Tomcat cannot start together!!

Postby friendlion » 11. August 2009 17:34

Hm, this file should load "C:/xampp/apache/modules/mod_jk.so" and not "C:/xampp/tomcat/xampp/apache/modules/mod_jk.so".


Actually I haven't change any config... If it has problem, it should be the installer problem...

In C:\xampp\tomcat\conf\auto\mod_jk.conf,
I change the line from:
LoadModule jk_module "C:/xampp/tomcat/xampp/apache/modules/mod_jk.so"
to:
LoadModule jk_module "C:/xampp/apache/modules/mod_jk.so"

But it change back automatically each time I start tomcat, how to stop it changing back?

If I start tomcat, then modify that file, then start apache, the server seems all started. But I need to modify that file everytime...
friendlion
 
Posts: 9
Joined: 11. August 2009 11:10

Re: Service Apache and Tomcat cannot start together!!

Postby Wiedmann » 11. August 2009 19:37

Can you exactly describe how you have installed XAMPP and the Tomcat-AddOn? (each step please)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Service Apache and Tomcat cannot start together!!

Postby friendlion » 12. August 2009 02:37

Wiedmann wrote:Can you exactly describe how you have installed XAMPP and the Tomcat-AddOn? (each step please)


OK. The steps I did are the simplest, I just follow all default and nothing special things I did on it:

At http://www.apachefriends.org/en/xampp-windows.html, I downloaded:
-- XAMPP for Windows 1.7.2, 2009/08/10 (EXE (RAR-Sfx) 44 MB )
-- XAMPP for Windows Add-Ons, Tomcat 6.0.20 (EXE (7-zip) 30 MB )

Then I run the xampp-win32-1.7.2.exe
-- All setting use the default, all questions answered "y"

Then I run xampp-tomcat-addon-win32-6.0.20.exe
-- All setting use the default, all questions answered "y"

Then I go to C:\xampp and run xampp-control.exe

In the xampp control panel:
-- I start Tomcat, it success
-- Then I start Apache, it fail
friendlion
 
Posts: 9
Joined: 11. August 2009 11:10

Re: Service Apache and Tomcat cannot start together!!

Postby Wiedmann » 12. August 2009 09:52

Then I run the xampp-win32-1.7.2.exe
-- All setting use the default, all questions answered "y"

OK. So you have answered the question "Should I make a portable XAMPP without drive letters?" also with "y" (default for this question is "n").

It seems, Tomcat is not happy if you answer this question with "y". Just let the default ("n") and it should work.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Service Apache and Tomcat cannot start together!!

Postby friendlion » 12. August 2009 10:27

OK. So you have answered the question "Should I make a portable XAMPP without drive letters?" also with "y" (default for this question is "n").
It seems, Tomcat is not happy if you answer this question with "y". Just let the default ("n") and it should work.


Thank you for your answer. But it seem haven't ask me such question in installation... why?

I run the xampp-win32-1.7.2.exe
-- I set the distination folder as default: "C:\" and press install.
-- Then it install for minute, and then prompt and ask:
Should I add shortcuts to the startmenu/desktop? (y/n): y
And I answered "y"
-- Then show:
WARNING: mkdir(): File exists in C:\xampp\setup_xampp.bat on line 309
Stack trace:
#0 [internal function]: exception_error_handler(2, 'mkdir(): File e...', 'C:\xampp\setup_...', 309, Array)
#1 C:\xampp\setup_xampp.bat(309): mkdir('C:\Documents an...', 438, true)
#2 C:\xampp\setup_xampp.bat(424): setup_XAMPP::doShortcuts()
#3 C:\xampp\setup_xampp.bat(480): setup_XAMPP::Run()
#4 {main}

And i press "enter" to exit.


Then I run xampp-tomcat-addon-win32-6.0.20.exe
-- I set the distination folder as default: "C:\xampp" and press install.
-- Then it install for minute, and then prompt and ask:
I have found some updates.

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

Your choice? (y/x=exit setup): y

I answered "y"
-- Then it show
updating Tomcat...
relocate Tomcat
updating Tomcat OK. Please start first Tomcat and then Apache.

All updates OK.

XAMPP is ready to use.

And i press "enter" to exit.



-- Then it prompt and ask again:
Should I add shortcuts to the startmenu/desktop? (y/n): y
And I answered "y"
-- Then show:
WARNING: mkdir(): File exists in C:\xampp\setup_xampp.bat on line 309
Stack trace:
#0 [internal function]: exception_error_handler(2, 'mkdir(): File e...', 'C:\xampp\setup_...', 309, Array)
#1 C:\xampp\setup_xampp.bat(309): mkdir('C:\Documents an...', 438, true)
#2 C:\xampp\setup_xampp.bat(424): setup_XAMPP::doShortcuts()
#3 C:\xampp\setup_xampp.bat(480): setup_XAMPP::Run()
#4 {main}
And i press "enter" to exit.
friendlion
 
Posts: 9
Joined: 11. August 2009 11:10

Re: Service Apache and Tomcat cannot start together!!

Postby Wiedmann » 12. August 2009 10:44

But it seem haven't ask me such question in installation... why?

Because the setupscript terminates with an exception before it reaches this question.
(Well, it makes no sense to install the addon, if the xampp setup doesn't work)

WARNING: mkdir(): File exists in C:\xampp\setup_xampp.bat on line 309

Curious error. Can you first delete the "XAMPP for Windows" folder in your startmenu yourself and try the installation again?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Service Apache and Tomcat cannot start together!!

Postby friendlion » 12. August 2009 10:59

Curious error. Can you first delete the "XAMPP for Windows" folder in your startmenu yourself and try the installation again?


O no... How to delete it? i run the uninstall_xampp.bat everytime, and cant found "XAMPP for Windows" folder in my startmenu. THX
friendlion
 
Posts: 9
Joined: 11. August 2009 11:10

Re: Service Apache and Tomcat cannot start together!!

Postby Wiedmann » 12. August 2009 11:19

and cant found "XAMPP for Windows" folder in my startmenu.

Hm. ok:
#1 C:\xampp\setup_xampp.bat(309): mkdir('C:\Documents an...', 438, true)

Can you tell me the complete filesystem path to your startmenu?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Service Apache and Tomcat cannot start together!!

Postby friendlion » 12. August 2009 15:38

Can you tell me the complete filesystem path to your startmenu?


Thank you, I know the problem now.
As My OS is Chinese, for the question: Should I add shortcuts to the startmenu/desktop? (y/n), I should answer "n".

As the installer cannot find the path correctly. After I choose "n", everything goes fine now.

Thank you
friendlion
 
Posts: 9
Joined: 11. August 2009 11:10

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 80 guests