[solved] Apache server won't start

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

[solved] Apache server won't start

Post by hammondo »

Cacti has run fine on this 2008 R2 server for years now. I return from an 11 day vacation and found that since shortly after I left, the Apache server has terminated with error 1067 and attempts to launch - and fails with the same error - every 2-3 minutes. I did a netstat -an and nothing is listening on tcp 80 and no services related to IIS are present such as WWW Publishing. I checked the Apache logs (windows logs are useless, only saying APPCRASH with no details or "termination was unexpected") and only found a constant stream of "httpd.pid overwritten -- unclean shutdown". Per Apache forums I searched on, this is not an error? Attempted manual/CLI start of Apache, this also fails. Cacti.log file is nearly 1 GB so it took awhile to open. In looking at the most recent entries I see lots of "WARNING: Result from SNMP not valid." Went through the troubleshooting guide but couldn't find much windows-related and also searched the archives on the 1067 Apache error. Any ideas? Many MANY thanks in advance!
hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

Re: Apache server won't start - no other web servers present

Post by hammondo »

At this juncture I am ready to try uninstalling/reinstalling things to get the graphing data we need to effectively manage our network, having been without it since 10/31 (latest entries in Apache access.log file show this date which is when I left on vacation). I backed up the htdocs folder and tried a backup of the MySQL database but saw an error indicating the cacti table could not be found. I checked the most recent MYSQL backup, that is dated 9/2013 so that is sufficiently recent for my purposes. Next I uninstalled Apache (v2.2.16) and downloaded v2.4 and unzipped it to C:\Apache24. I tried launching httpd.exe (after modifying the PATH to C:\Apache24 rather than C:\Apache2) and got an error stating MSVCR110.dll is missing. Couldn't find that anywhere on the server's HD so I downloaded a version of it to the C:\Apache24\bin folder. Now when I attempt to launch httpd.exe I get the error "The application was unable to start correctly (0xc000007b)." I also see that error when I attempt the httpd.exe -k install command. The Apache INSTALL.txt file mentions .msi packages for Apache but I can't find one on any of the Apache.org-listed download sites (including the Apache Lounge) - all have the .zip which when extracted, contains no .msi. I tried a general Internet search on such a download and of course found at least one site which hosts a trojan, as an Apache server download.

I really need to get Cacti running again and would certainly appreciate anyone who can help me.
hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

Re: Apache server won't start - no other web servers present

Post by hammondo »

Some success - I was able to get Apache 2.4 running by uninstalling all Visual C++ redistributables and installing the correct one per the Apache Lounge, that should run with the x64 Apache 2.4 download. So.... I have to get the MySql backup restored as I only have the "follow these basic steps to get started... add devices to your network etc." web page on /cacti, after restoring the Cacti folder. Plus modifying the PHP config file to point to C:\Apache2.4???? Again any assistance is appreciated.

Thank you
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Apache server won't start - no other web servers present

Post by BSOD2600 »

Error 1067 looks like the process was crashing.

Anyways, now that you've installed a new web server, you should follow the installation guide's php and web server sections to get Cacti reconfigured. http://docs.cacti.net/
hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

Re: Apache server won't start - no other web servers present

Post by hammondo »

Thanks for the response BSOD2006!

When I tried to input the PHP syntax in the httpd.conf the Apache 2.4 service wouldn't start so I first removed that syntax (Apache would then start) and then I uninstalled PHP and installed PHP 5.3.2.7 per the PHP install instructions in the 0.8.8 Windows Installation docs (selecting LDAP, GD2, MySQL, MySQLi, SNMP, Sockets extensions). Confirmed all modules are present as are the environmental variables. Also I modified the php.ini per those instructions. Presently I get an "Index of /cacti" page with broken links when I go to server ip/cacti.

In selecting the 5.3.2.7 version of PHP I noted the warning not to use 5.4 and I cannot find any .msi for 5.5. I have VC++11 redistributable on this server - I don't know if I need to uninstall this and install VC9? I think that may break the Apache 2.4? I tried to find Apache 2.2 on the Apache Lounge site but was unsuccessful. I noted the PHP install instructions included "Apache 2.2 module" and "Apache CGI". Not knowing what to select I chose "Apache 2.2 module" and pointed the Apache folder location in the install dialog to Apache2.4\conf (Apache Configuration location).
hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

Re: Apache server won't start - no other web servers present

Post by hammondo »

I have no perused all the docs I can find related to configuring the web server, PHP, MySQL, etc. and I still only have the "Index of /cacti" page appear on server IP/cacti full of broken links including all .php links. I am out of things to try at this point so please step forward if you can help me breathe life back into my cacti install?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Apache server won't start - no other web servers present

Post by BSOD2600 »

You can have VC9, VC10, etc all installed at the same time since they install different sets of Microsoft Visual C++ runtimes dlls.

Guess I should try a cacti install with all the latesst mysql, apache, php and see if the previous issues are still present. A todo item for a weekend...

Since you were able to list the files on the cacti server, sounds like just php portion is broken. Manually run httpd.exe at a command prompt to check for errors?

Checked the error logs?
C:\Apache22\logs\error.log
C:\PHP\php_errors.txt
C:\Users\All Users\MySQL\<MySQL version>\data\<servername>.err
Windows Event log (application/system).

Typically once Apache is installed and then you install PHP, it will properly configure Apache automatically.
hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

Re: Apache server won't start - no other web servers present

Post by hammondo »

httpd.exe does start without errors, I double-checked this by stopping the Apache 2.4 service, then starting httpd.exe on the command line, this morning. No Apache errors outside of the stop/start etc. exercise this morning and reboots of the server I performed on Friday. The same entry in the php_errors file keeps occurring over and over again - "it is not safe to rely on the system's timezone settings. You are required to use the date.time setting or the date_default_timezone_set() function.." The last of these occurred on Friday afternoon. The MySQL error log only contains entries related to the reboots of the server ("Shutdown complete" followed by "mysqld.exe: ready for connection"). The only Windows Application and System log entries related to Apache or PHP are also related (mostly) to the reboots of the server I performed on Friday and there were some Apache-related Application events related to my install of PHP with the Apache 2.2 option ("Cannot load C:\\PHP\\php5apache2_2.dll into server: The Apache service named is not a valid Win32 application"). I uninstalled PHP after that (on Friday) and re-installed with the remaining Apache option (Apache-cgi). I checked the httpd.conf after this install and the LoadModule php5_module is commented out and instead there are the entries "ScriptAlias /php/ "C:\PHP\" and "Action application /x-httpd-php "C:\PHP\php-cgi.exe"".

If there is anything else I can do PHP-wise to get my server functional please advise. I still as of this morning only have the file listing and the .php links in that file listing are still broken.

Thanks BSOD2600.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Apache server won't start - no other web servers present

Post by BSOD2600 »

Followed the guide in http://php.net/manual/en/install.windows.apache2.php to validate settings? LoadModule should likely be using php5apache2_4.dll.

set the timezone in php.ini to stop that one warning message.
hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

Re: Apache server won't start - no other web servers present

Post by hammondo »

Thank you again BSOD2600. After reading that page and some of the links on that page I uninstalled the current PHP install which is again, Apache-cgi and am again trying to find how to install PHP 5.5.6 as I believe I need to have that version for apache 2.4 as only the phpapache2_2.dll is present in the PHP 5.3.2.7 install (with Apache 2.2.x selected during the install), not the phpapache2_4.dll. I still cannot however find any .msi or .exe (other than php.exe, php-cgi.exe and php-win.exe) in the .zip download (5.5.6 Win32 VC11) and the manual install instructions on php.net http://www.php.net/manual/en/install.windows.manual.php

reference using a Windows Installer (.msi) file which again, isn't included in the download. I'm a network guy not an apps guy so I'm wholly unfamiliar with compiling something in order to install it?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Apache server won't start - no other web servers present

Post by BSOD2600 »

No need to compile these apps. This giant headache of apache, mysql, and php is precisely why I created http://forums.cacti.net/viewtopic.php?f=3&t=14946 Yes, it needs to be updated, but at least it should provide you with a functional install once it completes... however being that your system is now 'polluted' with previous installs, the various component installers might or might not handle this scenario. Give it a try and find out?

As for PHP, did you get it from http://windows.php.net/download/ ? those should have phpapache2_4.dll
hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

Re: Apache server won't start - no other web servers present

Post by hammondo »

I downloaded PHP 5.5.6 Win32-VC11-X86 (thread safe version), extracted it, and it contains no phpapache2_4.dll. And if I launch php.exe from the command line I get an error stating that MSCVR110.dll is not installed yet it is most definitely in the c:\windows\system32 folder and most definitely that folder is in the PATH statement.
hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

Re: Apache server won't start - no other web servers present

Post by hammondo »

Hello BSOD2006, hope you and yours are well in this New Year. At this juncture I would like to do a fresh install of Cacti on this same server, using IIS rather than Apache. At the point I am in the install, at step 1 Configure your web server, I have IIS 7 and FastCGI installed. I have downloaded the non-thread safe version of PHP (5.5.8 Win32 VC11 x86) and extracted it to C:\PHP\. In following the PHP install steps for windows on php.net I created the php.ini file (copied php.ini-production to php.ini). Of the required directives I don't know what to make of extensions_dir or extension= (I have no knowledge of any PHP extensions required for Cacti) but I confirmed all other required directives are uncommented and present in the php.ini file. And those instructions say "PHP is now setup on your system" after the instructions for the php.ini file.

So there is this question about step 1: is there anything additional to get PHP and IIS "connected"? Also in your step 1 Configure your web server instructions, after IIS and FastGCI links are the instructions regarding IUSR_ and IIS_WPG user permissions for cmd.exe. I don't see these users on my 2008 R2 server. There is a IIS_USRS Group, that has no members. Do I need to create the IUSR_ and IIS_WPG users and add them to the IIS_USRS Group? If so do I input the passwords for these users somewhere in IIS?

Again I'm a network guy not an apps guy nor a web server admin guy. Any help is certainly appreciated. We've now been without graphing data on our network, since November. I would really like to start getting this data again, soon.

Thank you,

Steve
hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

Re: Apache server won't start - no other web servers present

Post by hammondo »

BSOD2006,

Please scratch the earlier questions about PHP. I removed all of VC11 5.8 from the C:\PHP folder and downloaded/installed the VC9 x86 Non Thread Safe using its msi installer - looks like that version was the last one on php.net that has an msi installer. I checked the appropriate extensions, selected IIS server with FastCGI as the web server, and the VC9/5.3 version of PHP completed. My shift is about over for today, I will reboot the server in the morning. I still have those questions about the IUSR_ and IIS_WPG users however.

Thank you,

Steve
hammondo
Cacti User
Posts: 55
Joined: Wed Jul 25, 2012 10:17 am

Re: Apache server won't start - no other web servers present

Post by hammondo »

I ran PHP install using the VC 9/5.3 msi installer WITH Extras>PHP Manual selected per the Windows Install instructions (all features selected within the PHP Manual selection). No Extras folder is created so I have these modules not present, and I uninstalled PHP and ran the msi installer a second time to be sure I had selected the Extras, same result:

Cannot find module (IP-MIB): at line 0 in (none)
Cannot find module (IP-MIB): at line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMP2-TM): At line 0 in (none)

MIBDIRS variable is NOT present - am looking into how to set that up as I am not recalling how it was set up previously for cacti/apache. Still doesn't explain why no PHP\Extras folder is created during the PHP install?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests