Can't Stop/start/restart Service

newadmin

Verified User
Joined
May 2, 2007
Messages
5
I found I can't Stop/start/restart Service in service monitor under directadmin 1.32.2.
My Server system info:
Centos 4.4
Apache 1.3.37
DirectAdmin 1.32.2
Exim 4.60
MySQL 4.1.21
Named 9.2.4
ProFTPd 1.2.10
 
For Example: sshd (pid 1122) in status field, After I click Stop button, and Screen is reload but the monitor status field also show sshd (pid 1122) and is not show Process is stopped.
 
If you are currently logged in with ssh then the process is going to show even though the daemon is not running.

Code:
netstat -npa | grep sshd

will show you if it is actually listening or not.
 
I try to stop proftpd, it also show listen after the following command in SSH:

netstat -npa | grep proftpd
 
Any service will be restarted automatically by DA every minute, if stopped.
The faster way I found to avoid that is to move the init script out of the init.d directory.
 
Simpler to turn off DA's automatic restart service on a per-service basis for those you don't want, since removing the init script out of the init.d directory will mean no services will start at system startup unless you make other changes to enable them.

It could easily result in your server becoming a brick.

The configuration for the automatic restart service is at:

/usr/local/directadmin/data/admin/services.status

It's quite self-explanatory. I don't remember if you have to restart anything to make it work or not; it won't hurt to restart the directadmin daemon.

Jeff
 
That's a solution if you never want the restarting service on a specific service, but what if you have to shut down something pretty fast, and let it down until a vulnerability or bug is solved? It happens quite often to me.

The nicest thing would be that when you stop a service from DA the restarting service stays deactivated until you start it back. A bit like the services in a NT kernel set to "Automatically start": if it fails it restarts; if you stop it it will stay down.
 
That's a solution if you never want the restarting service on a specific service

services.status is service specific.

but what if you have to shut down something pretty fast

Code:
date;perl -pi -e 's/exim=ON/exim=OFF/' /usr/local/directadmin/data/admin/services.status;service exim stop;date


Tue Jan  6 12:36:53 EST 2009
Shutting down exim: 
Tue Jan  6 12:36:53 EST 2009

That's pretty fast.

The nicest thing would be that when you stop a service from DA the restarting service stays deactivated until you start it back.

Sounds like a feature request to me.
 
The nicest thing would be that when you stop a service from DA the restarting service stays deactivated until you start it back.

It already does that.
 
scsi is right. I just tried it and it does set the particular service to OFF in /usr/local/directadmin/data/admin/services.status
 
Back to newadmin's problem. I don't know what to tell you. I would have to look at the machine myself to figure it out.
 
Thank You All ppl.
I found it not restarted automatically by DA. is DA not run my action.
My test result:
If I stop proftpd in webmin, then It will show stopped and System Log also show "proftpd - TERM succeeded"

If I set proftd=OFF in /usr/local/directadmin/data/admin/services.status and stop proftpd in DA, then it will show proftpd (PID1212) in status and not found any log in system log. I also checked proftpd is listen.

I also want to know where can I check the DA action log?
 
Back
Top