There are too few entries in the directadmin.conf after the read. Something is likely missing/broken.

TechDaddies

Verified User
Joined
May 3, 2020
Messages
35
Today we installed CustomBuild updates on our server, the same way we do every Monday. I don't know what happened during the update, but everything broke. It seemed like DA reverted back to default settings somehow. It no longer knew that we were running Litespeed. It forgot the server's hostname. All kinds of weird issues occurred.

We got everything back to normal, EXCEPT we cannot access DA via the server's hostname. When we try to renew the hostname's SSL cert with
Code:
/usr/local/directadmin/scripts/letsencrypt.sh request_single our_hostname.com 4096
, we get the following error message:

DirectAdmin certificate has been setup.
There are too few entries in the directadmin.conf after the read. Something is likely missing/broken. Please report the exact commands used to DirectAdmin Support if the file on disk still has more than 20 valuesThere are too few entries in the directadmin.conf after the read. Something is likely missing/broken. Please report the exact commands used to DirectAdmin Support if the file on disk still has more than 20 valuesSetting up cert for Exim...
Setting up cert for WWW server...
Setting up cert for FTP server...
The services will be restarted in about 1 minute via the dataskq.

This kind of makes sense, because the issues we noticed after the botched upgrades this morning seemed to be caused because the directadmin.conf was basically reset back to the default. It was missing our servername line, for example, and forgot our ethernet device.

Here are the current contents of directadmin.conf

Code:
http2=1
unified_ftp_password_file=1
cloud_cache=1
nginx=0
nginx_proxy=0
litespeed=1
openlitespeed=0
ethernet_dev=enp94s0f1
apache_ver=2.0
enable_ssl_sni=1
letsencrypt=1
servername=our_hostname.com
dovecot=1
add_userdb_quota=1
frontpage_on=0

We have multiple DA servers with the same software configuration, and this is the only one we experienced this issue on.
Unfortunately, I did not realize until today that our /usr/local/directadmin directory wasn't being backed up as part of our daily remote backups, so I cannot look at the old version of directadmin.conf to see what may be different.

Any help is very appreciated, both in figuring out what happened (And how to prevent in the future), and what is wrong with the directadmin.conf that's causing the Lets Encrypt renewal for the hostname to not go through.
 
An update with further issues we're experiencing.

We noticed there were a few users missing from the Show All Users page - These were old users, not new ones. Deleted the show_all_users.cache file and reloaded the page and they showed up, all good. However, we cannot change these users' passwords. When we try, we get an error message that "{username} is an invalid username". I also cannot log in as the user using the "Login As User" feature. When I try, it simply loads the login form.
 
Last edited:
When was this box installed? I'd like to note there are some installation defaults, and all of the settings can be seen using:
Code:
/usr/local/directadmin/directadmin c
 
Are you recommending that I overwrite directadmin.conf with the defaults and see what happens? It's unclear to me what caused this issue, but with the box in a partially functioning state, I'm not sure how to proceed without risking making things worse.
 
It is not an issue at all :) Only non-default values need to be set in directadmin.conf.
 
OK, but I do have an issue. Please see my prior posts. I'm getting this error message. I can't log in as a user. I can't change a user's password. Everything just blew up and is now acting strangely, and only on this server.
 
Oh, sorry, I see I didn't pay enough of attention to your initial post. Yes, it seems you may be missing some of the entries then. Do you have any 2nd server with DirectAdmin to compare directadmin.conf to?
 
I do have several servers, but no 2 are configured the same. Is it possible/advisable for me to regenerate the directadmin.conf from the default file and see what happens? Or is this something you guys need to take a look at?
 
/usr/local/directadmin/scripts/letsencrypt.sh request_single our_hostname.com 4096
I thought I would stat at the top.

Is our_hostname.com. actually something like servername.domainname.com
it must be an FQDN. if it's not you need to correct that.

Here are the current contents of directadmin.conf
If that is the entire file it looks too small. Also, the file at the very end should have a blank line like a CR. Some people see that and remove it thinking it should not be there.

If you look in the
Code:
cd /usr/local/directadmin/conf

You should see a directadminf.con.bak. You might see if it can lend a hand to maybe what happened. or revert back.

You can also do
Code:
/usr/local/directadmin/directadmin c

Usage: /usr/local/directadmin/directadmin [c|s|d|v|p|i|r|o|b(#)][set name value (restart)]
c : shows the values in the config file to make sure they were read in correctly
s : prints out where the program is slowing without forking. For Debugging only.
d : run as a daemon (required for init.d scripts)
v : prints the current program version and quits
p : set file permissions
i : run the program installer
r : runs as Deamon, but saves requests to file (debugging)
o : Shows which OS this binary is compiled on, and when.
b(#) : Dumps some debug info to stdout. # is optional debug level,eg b5

It will show you everything it the system is reading defaults and all..

You can use the other options to see debug or set permissions.
 
Yes, the hostname is actually set correctly. I'm just not revealing it publicly since we clearly have something off with this server. Yes, directadmin.conf is too small, obviously. We did not manually edit the file or remove any contents. We just simply used the GUI to install updates and it somehow wrecked everything.

There is not a directadmin.conf.bak file in the conf directory.

Issuing a
Code:
/usr/local/directadmin/directadmin c
did print out a list of conf settings. Should I add these to the directadmin.conf and see if it corrects our issues?
 
Should I add these to the directadmin.conf
No, the system already believes those setting are in the system. So DA believes it's running.

I assume if you do a
Code:
/usr/local/directadmin/directadmin o
the os and all of that is correct? Does it also match what's attached to your license in the client portal?

I assume you are on CentOS 8? when is the last time you ran server updates?

When was the last time you ran a
Code:
cd /usr/local/directadmin/custombuild
./build clean
./build update
./build all
./build rewrite_confs

You could compare it to a known good one from another server as well. I know you said all the servers are different but most servers has many of the same entries. So it may help you find what went wrong.

If you have support with your license you can always log a ticket. here https://tickets.directadmin.com/
 
Last edited:
Also so you know this is just a community-run and supported forum. It's not an official support area. No need to bump posts.
No, I didn't know that. It being hosted on directadmin.com, we kind of assumed it was an official support channel. We're contemplating moving about 500 servers from cPanel to DA and are used to receiving official support via forums. Elsewhere in this thread, you will see that I received responses from a staff member. I don't think I was wrong for assuming that a staff member would continue to help us with our exploded server...

In regards to your other questions - Yes, CentOS 8. Yes, yum is up to date. Yes, I've cleaned, updated, build, and rewrite_confs custombuild. No change in the directadmin.conf and still get the same error mentioned in the first post when trying to get the SSL cert for the hostname...

Thank you for your help.
 
official support via forums
It not that you won't find them here. It not like Cpanel. They don't have an army of support people. I kind of figured that when you kept bumping.


Elsewhere in this thread, you will see that I received responses from a staff member. I don't think I was wrong for assuming that a staff member would continue to help us with our exploded server...
It's not that they won't help. It just not the amount of help you might be used to over there..

Community Forum​

Please check the forum before contacting us to see if your question has already been answered. The forum is also useful for getting help on topics we don't support (e.g. integrating DirectAdmin with 3rd party software).

There are great 3rd party Support teams as well.

 
Thank you for your help.
The community is great and all of us care. We Like DA and quite a few of us came over from the Debacle. We will be here to help you so no worries we just are not Offical ;)

I don't have 500 servers but you might like my post here:

read the few weeks first..
 
You might try this
Code:
/usr/local/directadmin/directadmin i
It will run through and verify the install.

Example output
options.conf exists, not installing the httpd.conf. Relying on custombuild.
Install of /usr/local/directadmin/data/templates/directadmin.conf to /usr/local/directadmin/conf/directadmin.conf successful
quota_partition was not in the directadmin.conf template. Added quota_partition=/
directory /usr/local/directadmin/data created
directory ./data/admin created
directory /usr/local/directadmin/data/tickets created
directory ./data/users created
directory /home/tmp created
directory /usr/local/directadmin/data/sessions created
directory /etc/virtual created
directory /var/spool/virtual created
directory ./data/admin/ips created
directory ./data/admin/packages created
file ./data/admin/packages.list created
ip.list written successfully
./data/admin/login.hist written successfully
./data/admin/next_ticket.number already exists
./data/admin/services.status written successfully
tickets.list written successfully
Admin user created

It only takes about 5 mins. It is not doing a "Real" reinstall. You will notice it will copy the template directadmin.conf. So it should correct it if needed. You might copy your old one to .bak before you run..
 
The "reinstall" only took about 3 seconds, BUT it did fix the problem. It added 19 new lines to directadmin.conf and I was able to successfully issue the SSL cert for the hostname (again).

No idea what caused the explosion in the first place, but it seems that it's back to normal now.
Thanks for the troubleshooting help.
 
Back
Top