DirectAdmin can't restart itself and other services

ZipperZapper

Verified User
Joined
Nov 30, 2015
Messages
142
I installed a fresh DirectAdmin on Ubuntu 18.04 (License set to the general Linux 64-bit) and after some troubleshooting in the Debian 10 beta subforum most of it works just fine now. But there's one big thing that doesn't work across the entire system: restarting services by DirectAdmin. I can't seem to find the right logs/places to look for the issue.

#1
So first of all the Services Monitor within DirectAdmin. Pressing restart results in the same error for every service that's listed there:

Code:
An error has occurred
/usr/bin/systemctl restart nginx.service 2>&1

Code:
An error has occurred
/usr/bin/systemctl restart php-fpm73.service 2>&1

Doing it by hand through SSH (sudo service nginx restart) works perfectly fine.

#2
DirectAdmin is not able to restart itself. For example when I change something in Administrator Settings, it will say 'DirectAdmin will be restarted within 1 minute', but it will never do that.

There are no obvious errors shown, other then the fact changes I make won't take effect unless I SSH into the server and restart DirectAdmin with a 'sudo service directadmin restart'

#3
Restoring databases wasn't working at first, with both gunzip and MySQL throwing an error like this:

Code:
Unable to restore database xxxx to xx : sh: /usr/bin/mysql: No such file or directory
Unable to find /usr/bin/gunzip

This I could fix with a symlink but seems to suggest again DirectAdmin is constantly looking in the wrong places.
Code:
ln -s /bin/gunzip /usr/bin/gunzip

#4
Today I found out that after a user on my site created a new domain, all the relevant folders, files and settings are there, but "./build rewrite_confs" isn't done, making the site unreachable for the user untill I perform a rewrite with the button under 'Custom HTTPD Configurations'. That works fine, but it seems like DirectAdmin is unable to perform it automaticly.

Summary
It seems to me something is fundamentaly wrong with the way DirectAdmin is trying to perform actions and find/use services on my system.
I can't find the right logs or setting to fix it.
 
#2 is something I've experienced as well on a CentOS 8 system.
 
1) Please check the output of:
Code:
nginx -t
2) Is crond running on the system?
3) What's the OS set in your license? Does it match with the actual OS? It could also be related to #1 (and maybe #2 too) :)

Thank you!
 
1) Please check the output of:
Code:
nginx -t
2) Is crond running on the system?
3) What's the OS set in your license? Does it match with the actual OS? It could also be related to #1 (and maybe #2 too) :)

Thank you!

Thanks for your time and help again smtalk!

1)
Nginx is fine:

Code:
nginx -t

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

2)
Assuming you are refering to cron.service: yes, it's running. All cronjobs created by users within DirectAdmin run without issues.

3)
First i tried using Debian 10 beta, but then the installation of DirectAdmin would never finish. I wrote a summary about that here.
Now i'm using the general Linux 64-bit, as suggested by John and by you actually ;) in that same topic.
 
I've made this change for the "Linux 64-bit static" binaries:

They're now available in the pre-release area.
This is most useful for Debian boxes, as the static binaries are compiled on CentOS, so running the production static DA binaries on Debian would give CentOS paths. This change will now check for the CentOS binaries, and if missing, will use the Debian paths as the fallback.
This only applies to the static binaries. The regular binaries will still use their own internal paths as before.

John
 
Back
Top