#48959 remove-ds-admin.pl does not stop the admin server if SSL is enabled
Closed: wontfix None Opened 7 years ago by mreynolds.

If you run remove-ds-admin.pl, and the admin server is running under SSL, the httpd processes are still running:

# remove-ds-admin.pl -y -a
Removed admin server and all directory server instances

# ps -ef | grep http
root      3992  1451  0 11:40 ?        00:00:00 /usr/sbin/httpd -k start -f /etc/dirsrv/admin-serv/httpd.conf
root      3994  3992  0 11:40 ?        00:00:00 /usr/sbin/httpd -k start -f /etc/dirsrv/admin-serv/httpd.conf
dirsrv    3996  3992  0 11:40 ?        00:00:00 /usr/sbin/httpd -k start -f /etc/dirsrv/admin-serv/httpd.conf

The problem is that remove-ds-admin.pl runs "/bin/systemctl stop dirsrv-admin.service" which is not working if SSL is enabled for some unknown reason. If SSL is NOT setup then this command does correctly stop the admin server.

The problem was that the start/stop/restart admin scripts were not using systemd. So after restarting admin server using "restart-ds-admin" the systemd commands would silently fail.

{{{

ps -efZ httpd

system_u:system_r:httpd_t:s0 root 15848 1 0 16:31 ? 00:00:00 /usr/sbin/httpd -k start -f /etc/dirsrv/admin-serv/httpd.conf
system_u:system_r:httpd_t:s0 root 15849 15848 0 16:31 ? 00:00:00 /usr/sbin/httpd -k start -f /etc/dirsrv/admin-serv/httpd.conf
system_u:system_r:httpd_t:s0 dirsrv 15850 15848 0 16:31 ? 00:00:00 /usr/sbin/httpd -k start -f /etc/dirsrv/admin-serv/httpd.conf

Restart admin using "restart-ds-admin", and the contexts are all wrong:

unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 14541 1451 0 15:31 ? 00:00:00 /usr/sbin/httpd -k start -f /etc/dirsrv/admin-serv/httpd.conf
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 14543 14541 0 15:31 ? 00:00:00 /usr/sbin/httpd -k start -f /etc/dirsrv/admin-serv/httpd.conf
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 dirsrv 14545 14541 0 15:31 ? 00:00:00 /usr/sbin/httpd -k start -f /etc/dirsrv/admin-serv/httpd.conf

And now "systemctl stop dirsrv-admin.service" will not work.
}}}

This problem is fixed in the latest version of admin server where the scripts do use systemd when available.

Metadata Update from @mreynolds:
- Issue set to the milestone: 389-admin,console 1.1.44

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/2018

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Duplicate)

3 years ago

Login to comment on this ticket.

Metadata