Freebsd 7 64-bit - DirectAdmin restarting services over and over

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
197
It seems that directadmin doesn't think my services are running as it keeps trying to restart them periodically. Everything seems to be fine but for some reason the DA system doesn't seem to think so.

I installed FreeBSD 7.1 64-bit using the post here about using mostly ports. I haven't had many problems and DA seems to run fine except I can't get it to monitor the exim port (doesn't show as running in system information even though I can see it in service monitor).

Any ideas on what I can look for as to why it keeps restarting everything? Thanks in advance!


tail -150 -f /var/log/directadmin/system.log
2009:02:20-16:55:01: directadmin started
2009:02:20-16:55:11: dovecot started
2009:02:20-16:55:32: httpd started
2009:02:20-16:55:52: named started
2009:02:20-16:56:01: directadmin started
2009:02:20-16:56:03: named restarted
2009:02:20-16:56:11: dovecot started
2009:02:20-16:56:24: sshd started
2009:02:20-16:56:32: httpd started
2009:02:20-16:56:52: named started
2009:02:20-16:57:13: sshd started


And in /var/log/messages
Feb 20 16:55:52 daphne named[77252]: starting BIND 9.4.2-P2 -u bind
Feb 20 16:55:52 daphne named[77252]: could not listen on UDP socket: address in use
Feb 20 16:55:52 daphne named[77252]: creating IPv4 interface bge0 failed; interface ignored
Feb 20 16:55:52 daphne named[77252]: could not listen on UDP socket: address in use
Feb 20 16:55:52 daphne named[77252]: creating IPv4 interface bge0 failed; interface ignored
Feb 20 16:55:52 daphne named[77252]: could not listen on UDP socket: address in use
Feb 20 16:55:52 daphne named[77252]: creating IPv4 interface bge0 failed; interface ignored
Feb 20 16:55:52 daphne named[77252]: could not listen on UDP socket: address in use
Feb 20 16:55:52 daphne named[77252]: creating IPv4 interface bge0 failed; interface ignored
Feb 20 16:55:52 daphne named[77252]: could not listen on UDP socket: address in use
Feb 20 16:55:52 daphne named[77252]: creating IPv4 interface lo0 failed; interface ignored
Feb 20 16:55:52 daphne named[77252]: not listening on any interfaces
Feb 20 16:55:52 daphne named[77252]: couldn't add command channel 127.0.0.1#953: address in use
Feb 20 16:55:52 daphne named[77252]: couldn't add command channel ::1#953: address in use
Feb 20 16:55:52 daphne named[77252]: could not listen on UDP socket: permission denied
Feb 20 16:55:52 daphne named[77252]: creating IPv4 interface bge0 failed; interface ignored
Feb 20 16:55:52 daphne named[77252]: could not listen on UDP socket: permission denied
Feb 20 16:55:52 daphne named[77252]: creating IPv4 interface bge0 failed; interface ignored
Feb 20 16:55:52 daphne named[77252]: could not listen on UDP socket: permission denied
Feb 20 16:55:52 daphne named[77252]: creating IPv4 interface bge0 failed; interface ignored
Feb 20 16:55:52 daphne named[77252]: could not listen on UDP socket: permission denied
Feb 20 16:55:52 daphne named[77252]: creating IPv4 interface bge0 failed; interface ignored
Feb 20 16:55:52 daphne named[77252]: could not listen on UDP socket: permission denied
Feb 20 16:55:52 daphne named[77252]: creating IPv4 interface lo0 failed; interface ignored
Feb 20 16:55:52 daphne named[77252]: running
Feb 20 16:56:02 daphne named[75698]: stopping command channel on 127.0.0.1#953
Feb 20 16:56:02 daphne named[75698]: stopping command channel on ::1#953
Feb 20 16:56:02 daphne named[77252]: exiting
Feb 20 16:56:02 daphne named[75698]: exiting
Feb 20 16:56:03 daphne named[77271]: starting BIND 9.4.2-P2 -u bind
Feb 20 16:56:03 daphne named[77271]: command channel listening on 127.0.0.1#953
Feb 20 16:56:03 daphne named[77271]: command channel listening on ::1#953
Feb 20 16:56:03 daphne named[77271]: running
 
you checked the location of all PID files, and they're
permissions, if it's at all relevent.

for bind, you're sure you've set up your interfaces correctly,
and /etc/hosts etc is correct?
 
I rebooted and it stopped the problem. I had forgot that the last time I installed DA on FreeBSD 7.x I had to do the same thing. My fault for not documenting the process well enough.


Only issue now is exim monitoring. It is running (from ports) and the service monitor page shows it -

exim-4.69-3 exim-4.69-3 (pid 14292 )

But the system information page shows it as stopped.

This is what I have in services.status

directadmin=ON
dovecot=ON
exim-4.69-3=ON
httpd=ON
mysqld=ON
named=ON
proftpd=ON
sshd=ON

I also tried just plain exim=ON but that doesn't work.
 
I believe the only resolution is to remove all the entries from the file /usr/local/directadmin/data/admin/services.status if you don't want DirectAdmin to attempt to manage them.

Jeff
 
I thought the reboot had fixed the problem but all of a sudden around 9 this morning it started again. Only thing I did was a reseller backup. Not sure why that would start this.

What are the ramifications of removing all of the services from services.status? Other than monitoring and emailing when a service goes down, is it used elsewhere? For example, when DA restarts apache each night?

Just to clarify, none of the services are really down. They have been up the whole time. DA just thinks they are down for some reason.


2009:02:26-08:37:01: getProcessList returned 15 processes
2009:02:26-08:38:01: getProcessList returned 15 processes
2009:02:26-08:39:01: getProcessList returned 15 processes
2009:02:26-08:40:02: getProcessList returned 15 processes
2009:02:26-08:41:01: getProcessList returned 16 processes
2009:02:26-08:42:01: getProcessList returned 15 processes
2009:02:26-08:43:01: getProcessList returned 15 processes
2009:02:26-08:44:02: getProcessList returned 17 processes
2009:02:26-08:45:01: getProcessList returned 17 processes
2009:02:26-08:46:01: getProcessList returned 18 processes
2009:02:26-08:47:01: getProcessList returned 17 processes
2009:02:26-08:48:01: getProcessList returned 17 processes
2009:02:26-08:49:01: getProcessList returned 14 processes
2009:02:26-08:50:02: getProcessList returned 17 processes
2009:02:26-08:51:01: getProcessList returned 17 processes
2009:02:26-08:52:01: getProcessList returned 17 processes
2009:02:26-08:53:01: getProcessList returned 17 processes
2009:02:26-08:54:01: getProcessList returned 17 processes
2009:02:26-08:55:02: getProcessList returned 18 processes
2009:02:26-08:56:01: getProcessList returned 17 processes
2009:02:26-08:57:01: getProcessList returned 17 processes
2009:02:26-08:58:01: getProcessList returned 17 processes
2009:02:26-08:59:01: getProcessList returned 17 processes
2009:02:26-09:00:02: service directadmin wasn't running, starting it
2009:02:26-09:00:12: getProcessList returned 15 processes
2009:02:26-09:00:12: service dovecot wasn't running, starting it
2009:02:26-09:00:22: getProcessList returned 18 processes
2009:02:26-09:00:22: service exim-4.69-3 wasn't running, starting it
2009:02:26-09:00:22: Error starting service exim-4.69-3 : uid 0 gid 0 : /usr/local/etc/rc.d/exim-4.69-3 start >>/dev/null 2>>/dev/null
2009:02:26-09:00:32: getProcessList returned 15 processes
2009:02:26-09:00:32: service httpd wasn't running, starting it
2009:02:26-09:00:43: getProcessList returned 19 processes
2009:02:26-09:00:43: service mysqld wasn't running, starting it
2009:02:26-09:00:43: Error starting service mysqld : uid 0 gid 0 : /usr/local/etc/rc.d/mysqld start >>/dev/null 2>>/dev/null
2009:02:26-09:00:53: getProcessList returned 16 processes
2009:02:26-09:00:53: service named wasn't running, starting it
2009:02:26-09:01:00: getProcessList returned 19 processes
2009:02:26-09:01:03: getProcessList returned 19 processes
2009:02:26-09:01:03: service proftpd wasn't running, starting it
2009:02:26-09:01:03: Error starting service proftpd : uid 0 gid 0 : /usr/local/etc/rc.d/proftpd start >>/dev/null 2>>/dev/null
2009:02:26-09:01:13: getProcessList returned 19 processes
 
Last edited:
You can remove the processes from the monitor if you don't want DirectAdmin to monitor them. The ramifications are that you won't be able to start/stop/restart them through DirectAdmin, and you won't get the emails or the restart attempts.

Jeff
 
Still an issue

Hello,

I have been trouble shooting the same issue. I removed all of the lines from file /usr/local/directadmin/data/admin/services.status, however I still have the following errors appearing in errortaskq.log:

2010:04:11-06:05:01: getProcessList returned 2 processes
2010:04:11-06:06:00: getProcessList returned 2 processes
2010:04:11-06:07:00: getProcessList returned 2 processes
2010:04:11-06:08:00: getProcessList returned 2 processes

I am running FreeBSD 8.0 64bit.

Have you found any other ways to troubleshoot or resolve the problem?

Thank you
 
Hello,

DA has 2 was of getting the process listings on FreeBSD systems.

First DA asks the kernel for the process list.
This is done using the sysctl() function.

DA then looks at the number of processes that it returned.
If there are 20 or fewer processes, it's reasonable to assume that the listing is not correct, so DA then falls-back to the same way that the CentOS/Fedora systems do it. If this case happens, then you will see "getProcessList returned x processes", just before DA tries the next method.


The next method is to check the /proc directory for the processes. This requires that your OS has /proc loaded as a "procfs" file system.
Related:
http://www.cyberciti.biz/faq/howto-freebsd-mount-procfs/

John
 
Back
Top