Bug 3800 - Problem with start apache from systemd. Additional modules aren't start
Summary: Problem with start apache from systemd. Additional modules aren't start
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High major
Target Milestone: ---
Assignee: D Morgan
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 2120
  Show dependency treegraph
 
Reported: 2011-12-17 22:41 CET by Fryderyk Mazurek
Modified: 2012-02-15 20:02 CET (History)
4 users (show)

See Also:
Source RPM: apache-2.2.21-5.mga2.src.rpm, systemd
CVE:
Status comment:


Attachments

Description Fryderyk Mazurek 2011-12-17 22:41:26 CET
Description of problem:

When apache starts from systemd then additional modules aren't start.

[root@localhost ~]# /etc/rc.d/init.d/httpd start
Starting httpd (via systemctl):                                                                        [    OK    ]
[root@localhost ~]# ps -A -f | grep http
root      6866     1  0 22:28 ?        00:00:00 /usr/sbin/httpd -k start
apache    6872  6866  0 22:28 ?        00:00:00 /usr/sbin/httpd -k start
apache    6873  6866  0 22:28 ?        00:00:00 /usr/sbin/httpd -k start
apache    6874  6866  0 22:28 ?        00:00:00 /usr/sbin/httpd -k start
apache    6875  6866  0 22:28 ?        00:00:00 /usr/sbin/httpd -k start
apache    6876  6866  0 22:28 ?        00:00:00 /usr/sbin/httpd -k start
apache    6877  6866  0 22:28 ?        00:00:00 /usr/sbin/httpd -k start
apache    6878  6866  0 22:28 ?        00:00:00 /usr/sbin/httpd -k start
apache    6879  6866  0 22:28 ?        00:00:00 /usr/sbin/httpd -k start
root      7573 14627  0 22:28 pts/1    00:00:00 grep --color http

The result of that operation is for example svn repository doesn't work.

But then I start from apachectl command then everything works well.

[root@localhost ~]# apachectl start
[root@localhost ~]# ps -A -f | grep http
root     15997     1  3 22:32 ?        00:00:00 /usr/sbin/httpd -k start -DAPACHE2 -DHAVE_AUTHZ_SVN -DHAVE_DAV_SVN -DHAVE_PHP5 -DHAVE_PYTHON -DHAVE_ACTIONS -DHAVE_ALIAS -DHAVE_ASIS -DHAVE_AUTH_BASIC -DHAVE_AUTH_DIGEST -DHAVE_AUTHN_ALIAS -DHAVE_AUTHN_ANON -DHAVE_AUTHN_DBM -DHAVE_AUTHN_DEFAULT -DHAVE_AUTHN_FILE -DHAVE_AUTHZ_DBM -DHAVE_AUTHZ_DEFAULT -DHAVE_AUTHZ_GROUPFILE -DHAVE_AUTHZ_HOST -DHAVE_AUTHZ_OWNER -DHAVE_AUTHZ_USER -DHAVE_AUTOINDEX -DHAVE_BUCKETEER -DHAVE_CASE_FILTER -DHAVE_CASE_FILTER_IN -DHAVE_CERN_META -DHAVE_CGI -DHAVE_CGID -DHAVE_CHARSET_LITE -DHAVE_DAV -DHAVE_DAV_FS -DHAVE_DAV_LOCK -DHAVE_DIR -DHAVE_DUMPIO -DHAVE_ECHO -DHAVE_ENV -DHAVE_EXAMPLE -DHAVE_EXPIRES -DHAVE_EXT_FILTER -DHAVE_FILTER -DHAVE_HEADERS -DHAVE_IDENT -DHAVE_IMAGEMAP -DHAVE_INCLUDE -DHAVE_INFO -DHAVE_LOG_CONFIG -DHAVE_LOG_FORENSIC -DHAVE_LOGIO -DHAVE_MIME -DHAVE_MIME_MAGIC -DHAVE_NEGOTIATION -DHAVE_OPTIONAL_FN_EXPORT -DHAVE_OPTIONAL_FN_IMPORT -DHAVE_OPTIONAL_HOOK_EXPORT -DHAVE_OPTIONAL_HOOK_IMPORT -DHAVE_PROXY -DHAVE_PROXY_BALANCER -DHAVE_PROXY_CONNECT -DHAVE_PROXY_FTP -DHAVE_PROXY_HTTP -DHAVE_REWRITE -DHAVE_SETENVIF -DHAVE_SPELING -DHAVE_SSL -DHAVE_STATUS -DHAVE_SUBSTITUTE -DHAVE_UNIQUE_ID -DHAVE_USERTRACK -DHAVE_VERSION -DHAVE_VHOST_ALIAS

Additional modules loaded with apache.

I did a small investigation and I thing the problem is with file /lib/systemd/system/httpd.service . I thing that the problem is with line:

ExecStart=/usr/sbin/httpd $OPTIONS -k start . 

Variables $OPTIONS is without the value.

Version-Release number of selected component (if applicable):

systemd-37-15.mga2
apache-mpm-prefork-2.2.21-5.mga2

How reproducible:

Start httpd from the systemd and check is additional modules are loaded with apache.
Comment 1 Marja Van Waes 2012-01-18 14:36:56 CET
@ dmorgan 

Barjac suffers from (probably) the same bug - you can read it in #mageia-dev, today in between 11.15h and 13h UTC and what he asked me to test only confirmed the issue.

first cc'ing barjac, then assigning, if doing both in one step doesn't work

Priority: Normal => High
CC: (none) => dmorganec, marja11, zen25000
Assignee: bugsquad => dmorganec
Source RPM: apache-2.2.21-5.mga2.src.rpm => apache-2.2.21-5.mga2.src.rpm, systemd

Comment 2 Colin Guthrie 2012-01-18 16:15:25 CET
It's not just httpd but lots of other services too... new systemd is causing issues in this regard, I suspect related to us not integrating the journal properly.

CC: (none) => mageia

Manuel Hiebel 2012-01-18 16:17:33 CET

Blocks: (none) => 2120

Comment 3 D Morgan 2012-01-18 18:10:31 CET
can you update to new systemd ? the journal integration should be OK now
Comment 4 Fryderyk Mazurek 2012-01-18 21:06:53 CET
I did a full clear network installation on virtualbox and now httpd does not start. After run command:

/etc/rc.d/init.d/httpd start

and wait about 1-2 minutes I always get an error:

Job failed. See system logs and 'systemctl status' for details.
---
# systemctl status http.service
http.service
          Loaded: error (Reason: No such file or directory)
          Active: inactive (dead)

But during these 2 minutes I see that httpd exists and listening on port 80.

Exactly the same problem I have on my real system for a few days. But I thing it can't be another problem that this bug.

---

Retuning to the problem with additional modules doesn't start I can say that it can be update problem. I noticed that in directory /etc/httpd/modules.d I had a few rpmnew files. After compare my config file with rpmnew file I noticed that different:

Old file:

<IfDefine HAVE_PHP5>
    <IfModule !mod_php5.c>
        LoadModule php5_module    extramodules/mod_php5.so
    </IfModule>
</IfDefine>

Rpm new file:

IfModule !mod_php5.c>
    LoadModule php5_module    extramodules/mod_php5.so
</IfModule>

apachectl add defines to httpd command line so modules are loaded. Systemd doesn't and therefore additional modules doesn't start.
Comment 5 D Morgan 2012-02-11 03:33:19 CET
what about this bug with systemd 40 ?
Comment 6 Fryderyk Mazurek 2012-02-15 20:02:47 CET
The problem is resolved now.

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


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