Solved Error creating first domain on fresh server?

HHawk79

Verified User
Joined
Sep 3, 2021
Messages
86
Hi all,

Setup a clean / new DirectAdmin server today and tried to add a default domain, but apparently it's not working.
In the DA interface I am getting the following message (after some time):

ither your request was invalid or the program hasn't completed your request.
Please notify the server admin


I noticed the following in the directadmin.log file:
2021:09:03-13:28:45: Timeout (timeout=60) from host : last flagged: Email::create(example-domain.com) : admin : getlock(./data/users/admin/user.conf, 'ConfigFile::readFile') : finished
2021:09:03-13:28:45: Socket write error: fd is connected to a pipe or socket whose reading end is closed. When this happens the writing process will also receive a SIG_PIPE signal. (Thus, the write return value is seen only if the program catches, blocks or ignores this signal.)
2021:09:03-13:28:45: *** Segmentation fault *** Send::sendData(est-dns.eu) : admin : getlock(./data/users/admin/user.conf, 'ConfigFile::readFile') : finished : User: admin : 77.777.77.777 : /CMD_DOMAIN : json=yes : {"domain":"example-domain.com","uquota":"unlimited","ssl":"ON","php":"ON","json":"yes","action":"create","ubandwidth":"unlimited"}
2021:09:03-13:28:45: sys::remove_tracked_temporary_files: removed temporary file './data/users/admin/lock_domain.lock'
2021:09:03-13:32:24: Socket write error: fd is connected to a pipe or socket whose reading end is closed. When this happens the writing process will also receive a SIG_PIPE signal. (Thus, the write return value is seen only if the program catches, blocks or ignores this signal.)
2021:09:03-13:32:24: Error while sending file. Sent 0
2021:09:03-13:32:25: Socket write error: fd is connected to a pipe or socket whose reading end is closed. When this happens the writing process will also receive a SIG_PIPE signal. (Thus, the write return value is seen only if the program catches, blocks or ignores this signal.)
2021:09:03-13:32:25: Error while sending file. Sent 0
2021:09:03-13:32:31: Socket write error: fd is connected to a pipe or socket whose reading end is closed. When this happens the writing process will also receive a SIG_PIPE signal. (Thus, the write return value is seen only if the program catches, blocks or ignores this signal.)
2021:09:03-13:32:31: Error while sending file. Sent 0

I never had this before. Setup has been the same as always? Anyone an idea?
It's the latest DirectAdmin version (DA 1.62.7).

I found the following forum thread: https://forum.directadmin.com/threads/dns-management-error-reading-db-file.52308/
And I tried the provided solutions, but it didn't work...

In the meantime I will redo the setup to see if that helps...

Regards
 
Also on the 2nd new/clean server the same issues. No clue what is going wrong here... :(
 
Yes, ofcourse. It's a clean server, so there are no other users. So I am doing it as an admin.
Yes, that's is correct. Tried that, didn't work. Luckily I hadn't closed my old SSH screen, so here is the result of that script:

root /# ./fix.sh
Checking example-domain.com ...
*** Adding example-domain.com to /etc/named.conf
Warning: Cannot find /var/named/example-domain.com.db
root /# ./fix.sh
Checking example-domain.com ... Already exists. Skipping
However, afterwards it still gave errors e.g. opening DNS settings.

The domain is created, but you cannot access the DNS settings.
I will give it a new go. Currently redoing the server setup (for the third time) and will try with a different browser. However I doubt the issue is Firefox, as I have alaways used that before.

Anyways, will report back later.
 
Tried Chrome. The exact same issue. There were no issues before (2 or 3 months ago) when I setup a server.
So no clue where it's coming from to be honest...

When I click DNS management for the domain created I get the following error:

Error Reading db file
Can't open file /var/named/example-domain.com.db for reading

When I apply the "solution" provided from my earlier thread (and which you stated again) the result is the same...

In the meantime I have convinced the customer to go for Plesk instead (server already setup as well), but still, I want to understand the cause and how to fix this. Otherwise I will be unable to deliver DirectAdmin servers to my customers...

//added

Also named service does not start because of the "added" domain:
service named status
Redirecting to /bin/systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/etc/systemd/system/named.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2021-09-03 16:47:07 CEST; 19s ago
Process: 1774 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)

Sep 03 16:47:07 ns1.example-domain.com bash[1774]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
Sep 03 16:47:07 ns1.example-domain.com bash[1774]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Sep 03 16:47:07 ns1.example-domain.com bash[1774]: zone 0.in-addr.arpa/IN: loaded serial 0
Sep 03 16:47:07 ns1.example-domain.com bash[1774]: zone example-domain.com/IN: loading from master file /var/named/example-domain.com.db failed: file not found
Sep 03 16:47:07 ns1.example-domain.com bash[1774]: zone example-domain.com/IN: not loaded due to errors.
Sep 03 16:47:07 ns1.example-domain.com bash[1774]: _default/example-domain.com/IN: file not found
Sep 03 16:47:07 ns1.example-domain.com systemd[1]: named.service: control process exited, code=exited status=1
Sep 03 16:47:07 ns1.example-domain.com systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Sep 03 16:47:07 ns1.example-domain.com systemd[1]: Unit named.service entered failed state.
Sep 03 16:47:07 ns1.example-domain.com systemd[1]: named.service failed.

When I removed the broken domain, I am able to start the named service again....
 
Last edited:
Very odd. But it seems example domain already existing, but as you say you can't access DNS.
I suggested another browser because some times it can be cause by browsers. I also use Firefox and never have problems.

Seems there is more going on. Check if /var/named/example-domain.com.db is indeed present there.
Because it says file not found. So it logic that named will not start. Probably it's mentioned in named.conf but not present in the /var/named directory. Remove it from DA where present and then fysically remove it from the named.conf file and the directory.
Then named should be able to start again.

Also very important, check that thetmp path listed in /usr/local/directadmin/conf/directadmin.conf is writable.
Check that /var/named directory is like this:
drwxrwx--T 5 root named 20K 2021-09-03 00:29 named

However, it seems a bug to me since it's a totally new install. I presume since you installed one before, you have used all pre-install commands to install all necessary packages.

Also check if OS version and ip on the license is the same as on the server.

If that is al the case it might be best to send in a ticket for this.
 
Possibly this is related to this topic?

 
@cjd thank you! I appled that solution and indeed it worked! No clue why it always used to work before. Oh well, better that it's solved and I continue with setting up servers. TY! ;-)

Offtopic; sorry for the late reply... I hate not replying but I was in bed with fever two days (no Covid-19 though). So I am sorry for the late reply.
 
You don't need to be sorry for a late reply. Better late than never.
You might want to change your initial post and set the prefix to "fixed". ;)

I hope you are well now. Glad to hear it was not covid.
 
Hi Richard,

:-)

I tried to change it to fixed, but I am not allowed to edit my original post?
 
You're not? Ah maybe there is a new user limit for maybe 10 posts of so.
No problem, thanks for trying then. :)
 
Back
Top