I am running CentOS7 with CWP on Digital Ocean droplet. The server is currently hosting two domains, and I added third domain on 26th April. I did it with normal steps, like:
- point domain to my server ns records,
ns1.example.com
andns2.example.com
- added new domain on cwp from New Account menu with ssl option enabled
After few hours, domain was working fine and I uploaded my web and go live. After that, I tried to enable ssl but I notice, it wasn't installed for that domain. I go ahead and try again to install ssl for the domain, from user account. It throws an error DNS of your domain doesn't point to this server or you have htaccess restrictions
I decided to try it from the WHM, which resulted in same error. I googled and found several articles on CentOS Web Panel Forum, and I tried several solutions, including:
- change hostname (save it again without any modification)
- edit nameserverIPs (save it again without any modification)
- deleting account in particular way, and then adding again
I tried all, but none of them worked for me. Then I decided to manually compare dns config file of problematic domain with working domain. I noticed some records on problematic domain was starting with domain, instead of @
symbol. I matched all lines with working domain configuration, but still no luck.
While searching I found, maybe something is wrong with dns server, I run service named status
command to check its status and I found couple of errors network unreachable resolving
, complete output can be seen below:
[root@server log]# service named status
Redirecting to /bin/systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2020-04-28 16:56:51 PKT; 46min ago
Process: 9965 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
Process: 9912 ExecReload=/bin/sh -c /usr/sbin/rndc reload > /dev/null 2>&1 || /bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 10792 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, status=0/SUCCESS)
Process: 10790 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=0/SUCCESS)
Main PID: 10794 (named)
CGroup: /system.slice/named.service
└─10794 /usr/sbin/named -u named -c /etc/named.conf
Apr 28 16:56:51 serv.xyz.com named[10794]: network unreachable resolving './NS/IN': 2001:dc3::35#53
Apr 28 16:56:51 serv.xyz.com named[10794]: network unreachable resolving './DNSKEY/IN': 2001:500:2f::f#53
Apr 28 16:56:51 serv.xyz.com named[10794]: network unreachable resolving './NS/IN': 2001:500:2f::f#53
Apr 28 16:56:51 serv.xyz.com named[10794]: network unreachable resolving './DNSKEY/IN': 2001:500:200::b#53
Apr 28 16:56:51 serv.xyz.com named[10794]: network unreachable resolving './NS/IN': 2001:500:200::b#53
Apr 28 16:56:51 serv.xyz.com named[10794]: network unreachable resolving './DNSKEY/IN': 2001:500:a8::e#53
Apr 28 16:56:51 serv.xyz.com named[10794]: network unreachable resolving './NS/IN': 2001:500:a8::e#53
Apr 28 16:56:51 serv.xyz.com named[10794]: managed-keys-zone: Key 20326 for zone . acceptance timer complete: k...usted
Apr 28 16:56:51 serv.xyz.com named[10794]: resolver priming query complete
Apr 28 17:24:15 serv.xyz.com named[10794]: client @0x7f9dac0c6f10 193.29.15.169#52139 (5hz.org): query (cache) ...enied
Hint: Some lines were ellipsized, use -l to show in full.
[root@server log]#
Now, I searched for dns solution and I found disabling IPv6 is the solution. I tried to disable that by adding OPTIONS="-4"
, and even tried to comment IPv6 line, but still no luck.
I am wondering, if there's something wrong with DNS server, then how other two sites are still working? I performed ns lookup, which shows correct dns information. However, when I do ns lookup for problematic domain, it shows ns
records but there's no IP linked to it.
I performed lookup on leafdns and this is the error: None of your nameserver names contain glue or A records. This error is fatal. Your domain is not resolveable
. Even though there's an error, but I can still access my domain.
Edit: Here is content of my DNS config file
; Generated by CWP
; Zone file for DOMAIN_IN_QUESTION.com
$TTL 14400
@ 86400 IN SOA ns1.SERVER_DOMAIN.com. webmaster.DOMAIN_IN_QUESTION.com. (
2020042832 ; serial, todays date+todays
3600 ; refresh, seconds
7200 ; retry, seconds
1209600 ; expire, seconds
86400 ) ; minimum, seconds
@ 86400 IN NS ns1.SERVER_DOMAIN.com.
@ 86400 IN NS ns2.SERVER_DOMAIN.com.
@ IN A XXX.XXX.XXX.XXX
localhost.DOMAIN_IN_QUESTION.com. IN A 127.0.0.1
@ IN MX 0 DOMAIN_IN_QUESTION.com.
mail 14400 IN CNAME DOMAIN_IN_QUESTION.com.
smtp 14400 IN CNAME DOMAIN_IN_QUESTION.com.
pop 14400 IN CNAME DOMAIN_IN_QUESTION.com.
pop3 14400 IN CNAME DOMAIN_IN_QUESTION.com.
imap 14400 IN CNAME DOMAIN_IN_QUESTION.com.
webmail 14400 IN A XXX.XXX.XXX.XXX
cpanel 14400 IN A XXX.XXX.XXX.XXX
cwp 14400 IN A XXX.XXX.XXX.XXX
www 14400 IN CNAME DOMAIN_IN_QUESTION.com.
ftp 14400 IN CNAME DOMAIN_IN_QUESTION.com.
_dmarc 14400 IN TXT "v=DMARC1; p=none"
@ 14400 IN TXT "v=spf1 +a +mx +ip4:XXX.XXX.XXX.XXX ~all"
default._domainkey 14400 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCi4acT6Vt0/7FVab8FzfLqJ8LU4rciFbo2t4yFmVoX1Uxi4QQsEJqTBZBfnWerkw6zzdY6+WYd4nn/sZSVCXDWC4/bmGylAkewthvOkAK1xsa8mXeOHrhX3CtqlVu3Ti+U4NpmmfgHehqq0NUKF9ma6NaJNMK3zFojToEdqNGQfwIDAQAB"
Note: I made these replacement in the config file:
IP replaced with
XXX.XXX.XXX.XXX
Server address replaced with
SERVER_DOMAIN
Affected domain replaced with
DOMAIN_IN_QUESTION
I don't have any clue, can someone please help me in this? It's been 2+ day and I am very upset. :(