Webmin: RHEL 7 (Fedora21+, CentOS7+) systemctl start webmin.service

Created on 24 Jul 2015  ยท  9Comments  ยท  Source: webmin/webmin

Jamie, I think it's worth adding systemctl { start | stop | restart | enable | disable } webmin.service, what do you think? It would make sense. service seems to be deprecated and prommissed to be removed in the future as far as I remember.

Most helpful comment

This works for me (CentOS 7):

/etc/rc.d/init.d/webmin stop
systemctl start webmin

All 9 comments

Where is Webmin using the service command instead of systemctl ?

Not sure about Webmin but manually calling it from console returns(ed) error. I'm sorry, because I just tested it on the other installation of Fedora and it seems all correct.

Before, when I was running systemctl status webmin.service - I saw an error in console. Now it seems fine. Sorry, not sure what is that. I will close it for now and in case there is a problem, I'll send you the screenshot.

I think I see this error again (Fedora 22 Server).

# systemctl restart webmin.service
Job for webmin.service failed. See "systemctl status webmin.service" and "journalctl -xe" for details.

Running systemctl status webmin.service

webmin.service - LSB: Start or stop the Webmin server
   Loaded: loaded (/etc/rc.d/init.d/webmin)
   Active: failed (Result: exit-code) since Sat 2015-07-25 22:03:11 MSK; 1min 6s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10794 ExecStart=/etc/rc.d/init.d/webmin start (code=exited, status=1/FAILURE)

Jul 25 22:03:06 host systemd[1]: Starting LSB: Start or stop the Webmin server...
Jul 25 22:03:06 host webmin[10795]: Webmin starting
Jul 25 22:03:11 host systemd[1]: webmin.service: control process exited, code=exited status=1
Jul 25 22:03:11 host systemd[1]: Failed to start LSB: Start or stop the Webmin server.
Jul 25 22:03:11 host systemd[1]: Unit webmin.service entered failed state.
Jul 25 22:03:11 host systemd[1]: webmin.service failed.

I think the reason is that Webmin doesn't create a systemd script - instead it uses a regular init.d script for maximum compatability.

Why not create it then when systemd is present?

Just to keep things simple - boot systems like systemd have a lot of quirks and aren't as well tested for use by Webmin as classic init scripts. Also, this way I can include /etc/init.d/webmin as a file in the RPM, rather than needing to create it as part of the install process.

For some reason it doesn't return error anymore. I think it's auto-generated after fresh install at some point. Thank you for your explanation!

i think it not auto generate, i still facing this error on CentOS 7
`[root@test-pw-install ~]# systemctl status webmin.service
โ— webmin.service - LSB: Start or stop the Webmin server
Loaded: loaded (/etc/rc.d/init.d/webmin)
Active: failed (Result: exit-code) since Fri 2016-09-09 09:01:28 UTC; 6min ago
Docs: man:systemd-sysv-generator(8)

Sep 09 09:01:23 test-pw-install systemd[1]: Starting LSB: Start or stop the Webmin server...
Sep 09 09:01:28 test-pw-install systemd[1]: webmin.service: control process exited, code=exited status=1
Sep 09 09:01:28 test-pw-install systemd[1]: Failed to start LSB: Start or stop the Webmin server.
Sep 09 09:01:28 test-pw-install systemd[1]: Unit webmin.service entered failed state.
Sep 09 09:01:28 test-pw-install systemd[1]: webmin.service failed.
`

This works for me (CentOS 7):

/etc/rc.d/init.d/webmin stop
systemctl start webmin
Was this page helpful?
0 / 5 - 0 ratings

Related issues

art-lucas picture art-lucas  ยท  10Comments

egberts picture egberts  ยท  7Comments

muhammadwafa picture muhammadwafa  ยท  8Comments

MHeuvel picture MHeuvel  ยท  6Comments

ctgreybeard picture ctgreybeard  ยท  7Comments