Bug 6805 - Apache configuration file handling during upgrade
Summary: Apache configuration file handling during upgrade
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal critical
Target Milestone: Mageia 3
Assignee: Guillaume Rousse
QA Contact:
URL:
Whiteboard:
Keywords:
: 10504 (view as bug list)
Depends on:
Blocks: 6954
  Show dependency treegraph
 
Reported: 2012-07-17 16:07 CEST by William Kenney
Modified: 2013-06-13 00:05 CEST (History)
5 users (show)

See Also:
Source RPM: apache
CVE:
Status comment:


Attachments
httpd start error (1.01 KB, text/plain)
2012-07-17 23:13 CEST, William Kenney
Details

Description William Kenney 2012-07-17 16:07:00 CEST
Todays update to

apache-2.4.2-1.mga3.i586.rpm

results in Apache not starting. The following
error occurs if you attempt to start it using

MCC -> Manage system services -> httpd-prefork -> Start button

Job failed. See system journal and 'systemctl status' for details

Can someone direct me where I can read out the "system journal"
and the "systemctl status".

The same error is reported if you open an su window and type

system httpd start

Thanks
Comment 1 Frank Griffin 2012-07-17 18:44:43 CEST
Errors will either be in /var/log/syslog, /var/log/messages, or one of the files in /var/log/httpd (do an ls -lt to see the most recently changed).

"systemctl" is a command that you issue as root from a command line prompt.

The command to start httpd is "service httpd start".

CC: (none) => ftg

Comment 2 William Kenney 2012-07-17 23:13:37 CEST
Created attachment 2563 [details]
httpd start error

Here's what gets written to the logs.
Manuel Hiebel 2012-07-18 00:10:52 CEST

CC: (none) => guillomovitch

Remco Rijnders 2012-07-19 07:43:33 CEST

Assignee: bugsquad => guillomovitch

Comment 3 Frédéric "LpSolit" Buclin 2012-07-29 14:30:27 CEST
Same problem here. This is pretty critical as Apache is unable to start at all. Guillaume, did you manage to make Apache work when upgrading it to 2.4.2?

Priority: Normal => High
CC: (none) => LpSolit
Severity: normal => critical

Comment 4 Guillaume Rousse 2012-08-02 16:23:28 CEST
The httpd-prefork systemd unit doesn't exist anymore since the switch to apache 2.4. The value hardcoded in drakxservices ought to be fixed, but that's an issue for drakxtools package, not for apache package.

BTW, using systemctl commands seems safer than using service command, as it one is merely a sysinit-era command, and will probably get dropped in a pure systemd system.

Priority: High => Normal
Assignee: guillomovitch => bugsquad
Source RPM: apache-2.4.2-1.mga3.i586.rpm => drakxtools

Manuel Hiebel 2012-08-03 00:35:26 CEST

Assignee: bugsquad => thierry.vignaud
Target Milestone: --- => Mageia 3

Comment 5 Thierry Vignaud 2012-08-03 07:47:50 CEST
This is obviously not a drakxtools bug

Source RPM: drakxtools => apache

Thierry Vignaud 2012-08-03 07:47:59 CEST

Assignee: thierry.vignaud => bugsquad

Comment 6 Frédéric "LpSolit" Buclin 2012-08-03 11:51:26 CEST
The problem is not about systemctl vs service. The problem is that httpd.conf contains lots of "LoadModule foo.so" and those are not found by Apache, and so it fails. Also, the path to modules.d changed, which is another reason why it fails to start. If you replace the old httpd.conf from Apache 2.2 by httpd.conf.rpmnew from 2.4, then it starts correctly. So it seems that the old httpd.conf from 2.2 is not compatible as-is with 2.4. That's what this bug is about.
Thierry Vignaud 2012-08-03 17:34:43 CEST

CC: (none) => thierry.vignaud
Summary: Apache ( httpd ) no longer runs at startup in Cauldron => Apache ( httpd ) no longer runs at startup in Cauldron (httpd: Syntax error)

Manuel Hiebel 2012-08-05 01:12:34 CEST

Blocks: (none) => 6954

Comment 7 Manuel Hiebel 2012-08-05 01:13:18 CEST
opening a tracker so someone do something before mga3
Comment 8 Guillaume Rousse 2012-08-23 17:35:28 CEST
A more

Summary: Apache ( httpd ) no longer runs at startup in Cauldron (httpd: Syntax error) => Apache configuration file handling during upgrade

Comment 9 Guillaume Rousse 2012-08-23 17:44:59 CEST
This issue deserves a more explicit title.

The new setup is quite different, and the list of available modules also. I fear than any attempt to fix the configuration magically during post-installation will just rather make the situation even worse. They are not just LoadModule directives to change/remove, they are also all the other directives now splitted in additional files. For me, it's safer to let the end user handle it himself when we don't have a simple and failproof solution.
Comment 10 William Kenney 2012-10-15 17:38:52 CEST
This bug is still valid for me in M3A2 on
10/15/12 using boot.iso 10/02/12 32-bit
Comment 11 William Kenney 2012-10-22 17:28:51 CEST
I have installed "apache" from MCC -> Install & Remove Software -> "apache"
and that works ok. As root I can create and modify /var/www/html/index.html
and that works just fine. Is there a simple way to activate the ability
to get /home/username/public_html/index.html working again? That would
get me/us going again.

I agree looking at M2 Apache 2.2.x vs M3 Apache 2.4.x is a major change.
Maybe there's a simple set of instructions to get it working in
a minimum format.

Thanks
Comment 12 William Kenney 2012-10-25 18:39:01 CEST
A little tinkering around here with Apache ( httpd ) 2.4.x on Cauldron I find
that the apache-mod_userdir is not installed.
Using the MCC -> Software Management -> Install and Remove Software -> apache-mod_userdir
that installs the necessary Apache module to allow the public_html directory to
contain a users website. So using the MCC in M3 install

apache
apache-mod_userdir

I get all the functionality I need without needing to install and use drakwizard. At least so far as I have seen. I'm not quite ready to call this discussion
resolved but for me it seems to work.

I just don't want to become an Apache installation expert.
Comment 13 Guillaume Rousse 2012-10-25 18:47:55 CEST
Well, the split in a distinct module was made on purpose, so it can hardly get considered as a bug. If you're running a server, you're expected to know what you need better than the packager. Anyway, it doesn't have much relationship with the original issue...
Comment 14 William Kenney 2012-10-25 19:06:30 CEST
Guillaume Rousse said in Comment 13:

> If you're running a server, you're expected to know what
> you need better than the packager.

While I agree with that the problem is that
Mandrake/Mandriva/Mageia has a long history
of making this install extremely simple and
and the admin need not be an Apache expert
to get this working. A few keystrokes in
drakwizard and you've a working httpd server.
Are we now backing off that feature function?
Comment 15 Frédéric "LpSolit" Buclin 2012-10-25 19:22:55 CEST
William, you are out of topic. Please file a separate bug for your request. No need to spam everybody about apache-mod_userdir.
Comment 16 Manuel Hiebel 2012-11-24 18:59:34 CET
ping for the beta1
Comment 17 Guillaume Rousse 2012-11-24 19:28:46 CET
As already said, it's a WONTFIX for me, unless someone has something robust and reasonnably complete to suggest for handling the setup change.
Comment 18 Frédéric "LpSolit" Buclin 2012-11-24 20:41:33 CET
What you say is that you are going to intentionally break old Apache 2.2 configuration servers when upgrading from Mageia 2 to 3. I know at least one application which will be directly affected by these incompatibilities: Bugzilla. If you keep the old Apache config file, Apache won't start. If you choose the new config file, relevant config data for Bugzilla will be gone and Bugzilla won't work anymore.

You will at least have to find a way to notify admins very clearly about the incompatibilities. Release notes are one place. Not sure if that's enough. rpmdrake would have to alert the user too when upgrading this package.
Comment 19 Guillaume Rousse 2013-03-17 23:10:11 CET
"intentionally break old Apache 2.2" is a bit excessive, it's just an unfortunate side-effect of packaging setup changes. And even without those changes, upstream changes would probably have the same effect anyway...

So far, here are the most proeminent changes I'm aware of, and ought to be documented:
- modules files are now located under /usr/lib(64)/httpd/modules, but the relative path from apache base directory (/etc/httpd/modules) didn't change
- all modules loading directives are now located in files located under /etc/httpd/conf/modules.d, and are likely to duplicate legacy directives from /etc/httpd/conf/httpd.conf
- httpd.conf now contains only core directives, many other are now located in various files under /etc/httpd/conf/conf.d
- additional upstream changes documented here: http://httpd.apache.org/docs/2.4/upgrading.html

Anything else ?

Also, Fedora 18, which introduced apache 2.4, doesn't have anything specific in its release notes. Changes may have been less drastic, tough.
Guillaume Rousse 2013-03-29 15:02:21 CET

Assignee: bugsquad => guillomovitch

Comment 20 Guillaume Rousse 2013-04-03 23:38:08 CEST
I just added a README.update.urpmi file advertising those changes in incoming 2.4.4-5mga3 release.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 21 Guillaume Rousse 2013-06-13 00:05:09 CEST
*** Bug 10504 has been marked as a duplicate of this bug. ***

CC: (none) => flink


Note You need to log in before you can comment on or make changes to this bug.