Bug 3069 - systemd - httpd, sshd and mysqld are not started on boot
Summary: systemd - httpd, sshd and mysqld are not started on boot
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
: 3523 4018 (view as bug list)
Depends on:
Blocks: 2120
  Show dependency treegraph
 
Reported: 2011-10-16 12:54 CEST by Barry Jackson
Modified: 2012-02-22 17:23 CET (History)
6 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Barry Jackson 2011-10-16 12:54:32 CEST
Description of problem:
When booting with systemd some services are not started on boot when they should be.


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


How reproducible:
Always

Steps to Reproduce:
1. Boot with systemd
2. Check for running httpd and mysqld
3. Not running.
Comment 1 Jani Välimaa 2011-10-17 16:38:46 CEST
Same for sshd.

CC: (none) => jani.valimaa

Comment 2 Jani Välimaa 2011-10-17 16:42:01 CEST
(In reply to comment #1)
> Same for sshd.

For some reason sshd service was disabled by default, had to enable it by hand.
Manuel Hiebel 2011-10-17 17:55:12 CEST

Blocks: (none) => 2120

Comment 3 D Morgan 2011-10-22 23:31:42 CEST
can you test with systemd + initscripts from testing to tell if this is still valid ?

CC: (none) => dmorganec

Comment 4 Barry Jackson 2011-10-23 23:58:10 CEST
(In reply to comment #3)
> can you test with systemd + initscripts from testing to tell if this is still
> valid ?

I made several failed attempts to install systemd-sysvinit from testing if this is what you intended. I did query this on IRC but got no reply.
http://pastebin.com/raw.php?i=cJYmSXfR

I finally managed to update with testing enabled and then install it.

Since then Cauldron won't boot with the nvidia driver, and with nouveau it boots to a graphical desktop but there is no network. (network service is running and all settings are correct)

On the first re-boot I am fairly sure that httpd and zoneminder did start as I was watching the text boot screens, however I never got chance to check properly as X failed to start. Since then they do not start, but this may be down to lack of network)

I never had systemd-sysvinit installed previously and systemd was working well other than the service startup issue and one other rpm-helper bug.

I can chroot into it if anyone has any ideas on how to get it back to a working system.

In the meantime Cauldron RIP.

It now crosses my mind that what you may have meant was to update systemd and initscripts.

I have removed systemd-sysvinit using rpm -e --nodeps but sadly no change.
How can I get out of this mess?
Comment 5 Sander Lepik 2011-10-24 10:02:26 CEST
(In reply to comment #4)
> 
> It now crosses my mind that what you may have meant was to update systemd and
> initscripts.
> 
> I have removed systemd-sysvinit using rpm -e --nodeps but sadly no change.
> How can I get out of this mess?

If you remove systemd-sysvinit then you have to install sysvinit.. else i don't think it would boot up..

CC: (none) => sander.lepik

Manuel Hiebel 2011-10-27 21:55:00 CEST

Summary: systemd - httpd and mysqld are not started on boot => systemd - httpd, sshd and mysqld are not started on boot

Comment 6 Olav Vitters 2011-10-27 23:37:18 CEST
I think this is because openssh-server also provides a (systemd) sshd.service file. This overrides the sysvinit stuff (AFAIC). So we should have a macro or something which ensures the systemd service does the same thing as the sysvinit /etc/init.d/sshd.

CC: (none) => olav

Angelo Naselli 2011-10-29 16:09:13 CEST

CC: (none) => anaselli

Comment 7 Barry Jackson 2011-10-29 16:59:18 CEST
(In reply to comment #3)
> can you test with systemd + initscripts from testing to tell if this is still
> valid ?

OK seems to be fixed
I have finally got Cauldron bootable again, and...
after running:
systemctl enable httpd.service
and
sytemctl enable mysqld.service
from within the the working system, both now start on boot.
Comment 8 Manuel Hiebel 2011-11-28 19:25:58 CET
*** Bug 3523 has been marked as a duplicate of this bug. ***

CC: (none) => wilcal.int

Jani Välimaa 2011-11-28 19:33:40 CET

CC: jani.valimaa => (none)

Comment 9 William Kenney 2011-12-16 06:47:04 CET
httpd not starting at boot looks to still
be a problem in Mageia 2 Alpha 2.
Comment 10 D Morgan 2011-12-16 07:41:25 CET
(In reply to comment #9)
> httpd not starting at boot looks to still
> be a problem in Mageia 2 Alpha 2.

but it starts when you do it manually after ?
Comment 11 William Kenney 2011-12-16 14:45:42 CET
(In reply to comment #10)

> but it starts when you do it manually after ?

When you first install httpd from the MCC it is
automatically started then and can be immediately
used. And that without restarting the OS. But,
once you reboot the system you must go into
the MCC -> System -> Manage System Services
and manually turn on httpd. It is shown as
stopped. Manually starting it works every time
and httpd continues to work until next reboot.

This is the case in Mageia 2 Alpha 2 today.

Mageia 1 always starts httpd at boot.
Comment 12 D Morgan 2011-12-16 15:01:37 CET
but the "MCC -> System -> Manage System Services" is not yet compatible with systemd so it may show OFF whereas it is started. What would help is the output of 


systemctl status httpd.service
Comment 13 William Kenney 2011-12-16 15:32:41 CET
DMorgan run: systemctl status httpd.service

reboot system

MCC -> System -> Manage System Services -> Services and daemons httpd shows stop

Apache server not running

[root@localhost wilcal]# systemctl status httpd.service
httpd.service - The Apache HTTP Server (prefork MPM)
	  Loaded: loaded (/lib/systemd/system/httpd.service; disabled)
	  Active: inactive (dead)
	  CGroup: name=systemd:/system/httpd.service

MCC -> System -> Manage System Services -> Services and daemons -> Start httpd
Restarting httpd ( via systemctl): [ OK ] message shown
Services and daemons still shows httpd as stopped
Does not change even if I get out of Services and daemons and back in

httpd server now running

[root@localhost wilcal]# systemctl status httpd.service
httpd.service - The Apache HTTP Server (prefork MPM)
	  Loaded: loaded (/lib/systemd/system/httpd.service; disabled)
	  Active: active (running) since Fri, 16 Dec 2011 06:25:36 -0800; 3min 12s ago
	 Process: 3452 ExecStart=/usr/sbin/httpd $OPTIONS -k start (code=exited, status=0/SUCCESS)
	Main PID: 3454 (httpd)
	  CGroup: name=systemd:/system/httpd.service
		  â 3454 /usr/sbin/httpd -k start
		  â 3460 /usr/sbin/httpd -k start
		  â 3461 /usr/sbin/httpd -k start
		  â 3462 /usr/sbin/httpd -k start
		  â 3463 /usr/sbin/httpd -k start
		  â 3464 /usr/sbin/httpd -k start
		  â 3465 /usr/sbin/httpd -k start
		  â 3466 /usr/sbin/httpd -k start
		  â 3467 /usr/sbin/httpd -k start
		  â 3558 /usr/sbin/httpd -k start
		  â 3559 /usr/sbin/httpd -k start
		  â 3560 /usr/sbin/httpd -k start
Comment 14 Manuel Hiebel 2012-01-04 20:35:26 CET
bug still valid see bug 4018
Comment 15 Manuel Hiebel 2012-01-04 20:36:16 CET
*** Bug 4018 has been marked as a duplicate of this bug. ***

CC: (none) => jacques.pronchery

Comment 16 D Morgan 2012-01-27 00:07:46 CET
can you test with systemd 39 ?
Comment 17 Jacques Pronchery 2012-01-27 14:01:54 CET
(In reply to comment #16)
> can you test with systemd 39 ?

mysqld start, but httpd do not start.
Comment 18 Barry Jackson 2012-01-30 14:11:34 CET
(In reply to comment #13)
> DMorgan run: systemctl status httpd.service
> 
> reboot system
> 
> MCC -> System -> Manage System Services -> Services and daemons httpd shows
> stop
> 
> Apache server not running
> 
> [root@localhost wilcal]# systemctl status httpd.service
> httpd.service - The Apache HTTP Server (prefork MPM)
>       Loaded: loaded (/lib/systemd/system/httpd.service; disabled) 
>       Active: inactive (dead)
>       CGroup: name=systemd:/system/httpd.service
> 

That shows httpd.service is disabled.                       ^^^^^

Try running :-

systemctl enable httpd.service

then re-boot and check again with:-

systemctl status httpd.service
Comment 19 D Morgan 2012-01-31 22:36:19 CET
the whole bug is about migration from sysvinit to systemd services.

we need to fix this before mga2
Comment 20 William Kenney 2012-01-31 23:29:09 CET
(In reply to comment #19)
> the whole bug is about migration from sysvinit to systemd services.
> 
> we need to fix this before mga2

Can it be fixed before Beta 2 ( Mar 15 )?
Comment 21 D Morgan 2012-02-22 08:24:51 CET
fixed in last rpm-helper

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

Comment 22 William Kenney 2012-02-22 17:23:47 CET
Confirmed fixed but MCC -> System -> Manage system services...

Continues to indicate that httpd is "stopped" when it
is actually running after a reboot. Tapping the "Start"
button for httpd does not change stopped indication
to running.

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