Page 1 of 1

Domain Names (Sometimes) Not Resolving

Posted: Fri Mar 30, 2007 2:15 pm
by bennybobw
I'm running Plesk 8.1 on CentOS 4.
The only thing I've done so far is update to php5 (working) and install yum and its dependents. Yum wasn't installed because I'm using MediaTemple and they uninstall yum.

I'm having trouble with my domain names resolving. http://alarm-inc.com/ always works but http://www.alarm-inc.com/ and http://webmail.alarm-inc.com/ doesn't. The mysterious thing is that it's going in and out.

Now, for instance, webmail.alarm-inc.com resolves but www.alarm-inc.com doesn't. For about two hours webmail didn't resolve even after restarting htppd several times and a complete server restart.

My DNS settings in plesk look okay:

Code: Select all

64.13.231.140 / 24     PTR     alarm-inc.com.
alarm-inc.com.    NS     ns.alarm-inc.com.
alarm-inc.com.    A      64.13.231.140
alarm-inc.com.     MX(10)     mail.alarm-inc.com.
ftp.alarm-inc.com.    CNAME     alarm-inc.com.
mail.alarm-inc.com.    A    64.13.231.140
ns.alarm-inc.com.    A    64.13.231.140
webmail.alarm-inc.com.    A    64.13.231.140
www.alarm-inc.com.    CNAME    alarm-inc.com.
And my httpd.include looks okay too:

Code: Select all

<VirtualHost 64.13.231.140:80>
	ServerName   alarm-inc.com:80
	ServerAlias  www.alarm-inc.com
	UseCanonicalName Off
	SuexecUserGroup         ftpadmin psacln
	ServerAdmin  "[myemailaddresshere]@gmail.com"
	DocumentRoot /var/www/vhosts/alarm-inc.com/httpdocs
	CustomLog  /var/www/vhosts/alarm-inc.com/statistics/logs/access_log plesklog
	ErrorLog   /var/www/vhosts/alarm-inc.com/statistics/logs/error_log
<IfModule mod_userdir.c>
	UserDir /var/www/vhosts/alarm-inc.com/web_users
</IfModule>
	ScriptAlias  /cgi-bin/ /var/www/vhosts/alarm-inc.com/cgi-bin/
	Alias  /plesk-stat /var/www/vhosts/alarm-inc.com/statistics/
	<Location  /plesk-stat/>
		Options +Indexes
	</Location>
	<Location  /plesk-stat/logs/>
		Require valid-user
	</Location>
	Alias  /webstat /var/www/vhosts/alarm-inc.com/statistics/webstat
	Alias  /webstat-ssl /var/www/vhosts/alarm-inc.com/statistics/webstat-ssl
	Alias  /ftpstat /var/www/vhosts/alarm-inc.com/statistics/ftpstat
	Alias  /anon_ftpstat /var/www/vhosts/alarm-inc.com/statistics/anon_ftpstat
	Alias  /awstats-icon /var/www/html/awstats/icon
	<IfModule mod_ssl.c>
		SSLEngine off
	</IfModule>
	<Directory /var/www/vhosts/alarm-inc.com/httpdocs>
	<IfModule mod_perl.c>
	<Files ~ (\.pl$)>
		SetHandler perl-script
		PerlHandler ModPerl::Registry
		Options ExecCGI
		allow from all
		PerlSendHeader On
	</Files>
	</IfModule>
	<IfModule sapi_apache2.c>
		php_admin_flag engine on
		php_admin_flag safe_mode off
		php_admin_value open_basedir "/var/www/vhosts/alarm-inc.com/httpdocs:/tmp"
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine on
		php_admin_flag safe_mode off
		php_admin_value open_basedir "/var/www/vhosts/alarm-inc.com/httpdocs:/tmp"
	</IfModule>
	<IfModule mod_python.c>
	<Files ~ (\.py$)>
		SetHandler python-program
		PythonHandler	mod_python.cgihandler
	</Files>
	</IfModule>
	<IfModule mod_fcgid.c>
		AddHandler fcgid-script .fcgi
		Options +FollowSymLinks +ExecCGI
	</IfModule>
		Options +Includes +ExecCGI
	</Directory>
	<Directory /var/www/vhosts/alarm-inc.com/web_users>
	<IfModule sapi_apache2.c>
		php_admin_flag engine off
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine off
	</IfModule>
	</Directory>
	Alias "/error_docs" "/var/www/vhosts/alarm-inc.com/error_docs"
	ErrorDocument 400 /error_docs/bad_request.html
	ErrorDocument 401 /error_docs/unauthorized.html
	ErrorDocument 403 /error_docs/forbidden.html
	ErrorDocument 404 /error_docs/not_found.html
	ErrorDocument 500 /error_docs/internal_server_error.html
	Include /var/www/vhosts/alarm-inc.com/conf/vhost.conf
</VirtualHost>
Can anyone seen this problem before? Thanks for your help.

-bennybobw

Posted: Sat Mar 31, 2007 5:31 am
by breun
Are you trying to resolve the domain on your own machine or on the server? What nameservers are in the server's /etc/resolv.conf file?

Posted: Sat Mar 31, 2007 7:20 pm
by bennybobw
I'm trying to make it resolve on the server--that is, when I go to http://www.alarm-inc.com/ I should see the same thing as when I go to http://alarm-inc.com/ I'm trying to access the site from my computer, not from the server.

It doesn't make sense to me why they both wouldn't resolve if they are both set up as CNAME records.

The name servers in resolv.conf are:

Code: Select all

nameserver 64.207.129.21
nameserver 64.207.128.21
I'm not sure why those are different than my DNS records, but I assume it has something to do with my hosting provider.

update: webmail-alarm.com is resolving, while www.alarm-inc.com still is not resolving.

Thanks for your help!

-bennybobw

Posted: Sat Mar 31, 2007 7:41 pm
by breun
bennybobw wrote:I'm trying to make it resolve on the server--that is, when I go to http://www.alarm-inc.com/ I should see the same thing as when I go to http://alarm-inc.com/
Then you're probably not trying to make it resolve on the server, but on the host you're running your browser on (which could be, but probably isn't your server).
It doesn't make sense to me why they both wouldn't resolve if they are both set up as CNAME records.
They're not both set up as CNAME records, in an earlier post you stated that alarm-inc.com is an A record and www.alarm-inc.com is a CNAME for alarm-inc.com.
The name servers in resolv.conf are:

Code: Select all

nameserver 64.207.129.21
nameserver 64.207.128.21
I'm not sure why those are different than my DNS records, but I assume it has something to do with my hosting provider.
That's resolv1.mediatemple.net and resolv2.mediatemple.net. If you're running DNS on your Plesk server you might as well use 127.0.0.1 (localhost) by the way.
update: webmail-alarm.com is resolving, while www.alarm-inc.com still is not resolving.
They're both working for me:

Code: Select all

$ host webmail.alarm-inc.com
webmail.alarm-inc.com has address 64.13.231.140
$ host www.alarm-inc.com
www.alarm-inc.com has address 64.13.231.140
However, it seems alarm-inc.com is not registered on your nameservers, but on the Media Temple nameservers:

Code: Select all

$ dig alarm-inc.com

; <<>> DiG 9.3.2 <<>> alarm-inc.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30550
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;alarm-inc.com.                 IN      A

;; ANSWER SECTION:
alarm-inc.com.          43173   IN      A       64.13.231.140

;; AUTHORITY SECTION:
alarm-inc.com.          43173   IN      NS      ns1.mediatemple.net.
alarm-inc.com.          43173   IN      NS      ns2.mediatemple.net.

;; ADDITIONAL SECTION:
ns1.mediatemple.net.    25487   IN      A       64.207.129.18
ns2.mediatemple.net.    1501    IN      A       64.207.128.18

;; Query time: 38 msec
;; SERVER: 195.241.77.53#53(195.241.77.53)
;; WHEN: Sun Apr  1 01:37:03 2007
;; MSG SIZE  rcvd: 130
So editing the DNS records on your server doesn't change a thing, DNS is handled on ns1.mediatemple.net and ns2.mediatemple.net.

Posted: Sun Apr 01, 2007 12:39 pm
by bennybobw
Thanks Breun now I understand what was happening.
I didn't buy the domain name--I looked on the site where we bought it (and at your post). The primary nameserver was on mediatemple and the other was on domain discover and the DNS records didn't match. So I took out domaindiscover and everything's working fine now.

I should have checked all that stuff first, but I didn't even realize it and I didn't know the dig command. Thanks for your help.

-bennybobw

Posted: Sun Apr 01, 2007 1:50 pm
by breun
dig is like nslookup++. :)