systemd only starts services manually

Hi there,

anyone seen this behaviour?

Suse 12.1 fresh install in a virtual machine - all works OK.
Then activating samba - services smbd and nmbd start both at boot - nice.
Next activating apache and mysql - with the activation both get started - also nice.

But after reboot none of these three are running: no samba, no apache and no mysql - not so nice anymore.

But when just logging in and using systemctl deamon-reexec all get started.
This tells me that basically the configurations are correct and systemd can start all the services - just not when the system is booting.

Not to say that with SysV-init all start correctly at boot. As I only need this machine for the DB and http services I kept the SysV-init so that I don’t need to login to have things running.

But anyway I would like to understand where that hick-up is coming from and eventually to be able to switch back to systemd. Maybe somone has an idea …

On 2011-11-25 02:36, andy kim wrote:
> But anyway I would like to understand where that hick-up is coming from
> and eventually to be able to switch back to systemd. Maybe somone has an
> idea …

Of systemd? Barely :frowning:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

But when just logging in and using systemctl deamon-reexec all get started.
This tells me that basically the configurations are correct and systemd can start all the services - just not when the system is booting.

That is a worry. I can’t really add to this discussion, but I’ll follow this thread with interest.

On Fri, 25 Nov 2011 01:36:02 +0000, andy kim wrote:

> Suse 12.1 fresh install in a virtual machine - all works OK.
> Then activating samba - services smbd and nmbd start both at boot -
> nice.

Can you describe how you’re activating the services - specific steps that
you’re following?

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Sure. All done with yast:

at first Samba: yast -> Network Services -> Samba Server:

created a separate share for my data disk and disabled all printing stuff and set Start-up to “During Boot”

then Apache: yast -> Network Services -> HTTP Server:

modified Main-Host entry to have the Document Root pointing to the correct directory on the data disk and in the tab “Listen Ports and Addresses” select “HTTP Service Enable”

As I need the http and mysql service only in combination I didn’t tried a reboot at that point.

at last mysql: copied my config file “my.cnf” to /etc (basically it just has different pathnames than the default one - as you can guess, data files are also on the separate data disk - and a few buffers set differently)
then yast -> System -> System Services (Runlevel) in the “Simple Mode” just selected mysql and clicked on “Enable”
verified that in this list apache2, smb, nmb and mysql have “enabled” set to “Yes” - clicked OK and then worked with it.

Really not much magic here.

After a later reboot the three services hadn’t been started, so I tried to disable and enable again with no change, used yast and also systemctl - but made no difference.
A reboot with the selected SysV-init at the boot menu had all started correctly. But booting with systemd always didn’t start any of this three. As systemd is new now I looked what options systemctl has and just tried the “deamon-reexec” to see if this will do anything and to my surprise all got started. Reproduced it several times and then switched to SysV-init which is good enough for this particular system. But I have two more physical machines that are waiting to be upgraded to 12.1 and so I like to learn from what happened here.

Thanks, Andy

On Fri, 25 Nov 2011 05:46:02 +0000, andy kim wrote:

> Sure. All done with yast:
…]
> Really not much magic here.

That’s helpful. “Activating” might have been taken (as indeed I took it)
as meaning “starting”, which isn’t the same as activating the services to
start at system startup. That clarification helps us see that you are
taking the proper steps.

> all got started. Reproduced it several times and then switched to
> SysV-init which is good enough for this particular system. But I have
> two more physical machines that are waiting to be upgraded to 12.1 and
> so I like to learn from what happened here.

These services do depend on network services - so I wonder if they might
not be starting because the network hasn’t started yet. Have you
configured the network to use the older ifup or to use NetworkManager?

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Good point. Indeed, it was set to ifup. The reason for having set to it was that when using yast -> Network Services -> HTTP Server it gives the warning:
Your network interfaces are currently controlled by NetworkManager but the service to configure might not work well with it.

Thanks for pointing into the right direction!