Changing user's IP makes the site offline

freshmint

Verified User
Joined
Oct 10, 2005
Messages
113
When I change a user's IP, the user's site goes offline and all I see when I try to enter his domain is the Apache's test page:

Hey, it worked !
The SSL/TLS-aware Apache webserver was
successfully installed on this website.

I changed the IP for 3 users, 2 of them got this problem and one worked fine. I checked the /usr/local/directadmin/data/users/USER folder and all mentions of the IP address is pointing correctly to the new IP. I checked the /var/named/domain.com.db and it has the new IP too. I also restarted httpd and named services with no success.

Does anyone have any idea how to fix this?
 
Oh, and for the record, I also tried rewriting the httpd.conf files (echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue) but it didn't work too.
 
Does http://www.domain.com work? or you just putting domain.com into the URL?

No, it doesn't. www.domain.com and domain.com has the same problem.

I tried on one of those 2 domains that went wrong yesterday, it worked fine again. I came to the conclusion that you can't modify several sites IPs in a row without DA rewriting the files and restarting the needed services (because the first site I moved yesterday worked and the rest didn't; today same thing, the first one works, the other one left doesn't), but that's NOT the case.

I proceeded and after 5 minutes I tried on the last site I need to move and it got the Apache test page. No idea why.
 
Generally this happens because DNS hasn't yet propagated. If you're still seeing the problem a day later, that's the time to start checking into why. If you'd post real domain name information others could test for you.

Jeff
 
The domain is fhbd.org.

But I don't think it matters because I can't have the site offline, so as soon as I see the test page I have to get it back to the old IP. That's why if you check it now it'll be working.

I don't believe it's a DNS issue since the other 2 sites went fine and instantaneously. Also, it's instantaneously too when I change the site to the new IP and then revert it back to the old IP.
 
When it is reverted back to the old ip, the old DNS information is still loaded in your view. Best option is to wait for it to propegate.
 
The problem is I can't have the site down. And I still don't understand why the other 2 sites would be instantaneously and this one would not.

I tried editing the TTL on /var/named/fhbd.org.db to 0 and then, after 5 hours, I tried to change the IP again. Same thing, got the Apache test page. :(
 
You're telling us that the problem exists. You're telling us exactly what problem exists. But it appears you're not willing to give us the tools to test it.

And that you're not willing to test it yourself.

If you're still having the problem, then at least give us the IP# on the new server so we can change our own hosts file to test it.

Jeff
 
You're telling us that the problem exists. You're telling us exactly what problem exists. But it appears you're not willing to give us the tools to test it.

And that you're not willing to test it yourself.

If you're still having the problem, then at least give us the IP# on the new server so we can change our own hosts file to test it.

Jeff

Yes, the problem still exists. It's not that I'm not willing to give the informations for you to test, but I also can't have THIS site down. For the sites I can test, it works. I can move others sites within my IPs with no problems and they work instantaneously. Just this one, when I try to change it from 72.21.63.34 to 72.21.63.36 (it's on the same server, by the way), I get the Apache test page.

Is there any configuration file on Apache or DA I could look into to which could cause such behaviour on Apache?
 
Sounds like a DNS issue to me.

After changing it do an nslookup on the DA box to see if you get the new IP.

Then do an nslookup on your web browser box to see what IP it gets. If its not the new one try flushing the cache or rebooting.

If the other two worked instantly its probably because you moved them then tested. If you check the site first its IP will get loaded into the cache of your ISP or whatever DNS resolver you use.

Check the file /usr/local/directadmin/data/users/username/httpd.conf

If the new IP is correct in that file be rest assured that everything is working fine. Call someone who accesses the net via a different ISP and who has not looked at the site in the past 4 hours and ask them if they can see the site.

You can also try lowering the TTL from 14400 to 60 in the DNS zone file for 4 hours before changing it.
 
Sounds like a DNS issue to me.

After changing it do an nslookup on the DA box to see if you get the new IP.

Then do an nslookup on your web browser box to see what IP it gets. If its not the new one try flushing the cache or rebooting.

If the other two worked instantly its probably because you moved them then tested. If you check the site first its IP will get loaded into the cache of your ISP or whatever DNS resolver you use.

Check the file /usr/local/directadmin/data/users/username/httpd.conf

If the new IP is correct in that file be rest assured that everything is working fine. Call someone who accesses the net via a different ISP and who has not looked at the site in the past 4 hours and ask them if they can see the site.

You can also try lowering the TTL from 14400 to 60 in the DNS zone file for 4 hours before changing it.

Thank you for your response. I tried already lowering the TTL to 0, but it didn't work (I waited 5 hours to test). Anyway, I'll modify it now and try again later tonight. I'll let you know how it goes. :)
 
Thank you for your response. I tried already lowering the TTL to 0, but it didn't work (I waited 5 hours to test). Anyway, I'll modify it now and try again later tonight. I'll let you know how it goes. :)


I wouldn't trust TTL 0 as many caching DNS servers don't accept it. As of now your server is responding with TTL of 14400.

#dig [domain-in-question].org
;; ANSWER SECTION:
[domain-in-question].org. 14400 IN A 72.21.63.34
 
Not sure what happened on your end, but just after I posted my last reply I did another dig and nslookup on your domain. Your soa record changed and now I can't find an IP for the domain at all.

;; AUTHORITY SECTION:
org. 0 IN SOA tld1.ultradns.net. domadmin.ultradns.net. 2007871081 1800 900 604800 86400
 
Not sure what happened on your end, but just after I posted my last reply I did another dig and nslookup on your domain. Your soa record changed and now I can't find an IP for the domain at all.

;; AUTHORITY SECTION:
org. 0 IN SOA tld1.ultradns.net. domadmin.ultradns.net. 2007871081 1800 900 604800 86400

I didn't change anything on my end. I just noticed though the changes I'm doing are not taking effect, so I figured I'm not changing the correct number.

On my [domain-in-question].db file, I was changing the line

$TTL 14400

to

$TTL 60

Is that just a variable not being used?

Because now I guess I should change the other lines which has a "14400 IN" as the second and third params, as in:

[domain-in-question].org. 14400 IN A 72.21.63.34

Is that correct?
 
$TTL 14400

to

$TTL 60

Is that just a variable not being used?

That sets the default for the file. This value is used it its not specified in the A record.

Because now I guess I should change the other lines which has a "14400 IN" as the second and third params, as in:

[domain-in-question].org. 14400 IN A 72.21.63.34

Is that correct?

Right, you need to change it there. That value superseds the default set above. You also need to advance the serial number by 1 and reload named.
 
That sets the default for the file. This value is used it its not specified in the A record.

Right, you need to change it there. That value superseds the default set above. You also need to advance the serial number by 1 and reload named.

Ok, alright. I didn't know about the serial number thing. I did the changes now, will try again tomorrow. Thank you so far, I'll let you know how things go.
 
Whenever you change an ip of an existing domain you need to wait for your isp to clear its dns cache. That takes time. That is a simple fact. Whenever you look at a domain your isp does a ip lookup and then caches that ip so it doesn't have to look it up again for several hours. So if you look at your domain then change the ip then try to go to it again you will not see it because your isp is still giving you the old ip address.

Technically the site is not down. It is only down for those who are on isp's who have previously did an ip lookup for that domain within the past few hours.

The only way around this is to create a duplicate httpd.conf file for that domain with the old ip address and have the main httpd.conf file load it. This way the domain will work on both the new ip and the old ip.
 
After changing it do an nslookup on the DA box to see if you get the new IP.

Then do an nslookup on your web browser box to see what IP it gets. If its not the new one try flushing the cache or rebooting.

If the other two worked instantly its probably because you moved them then tested. If you check the site first its IP will get loaded into the cache of your ISP or whatever DNS resolver you use.

Check the file /usr/local/directadmin/data/users/username/httpd.conf

If the new IP is correct in that file be rest assured that everything is working fine. Call someone who accesses the net via a different ISP and who has not looked at the site in the past 4 hours and ask them if they can see the site.

Alright, everything's in into place now. The dig from localbox and remotebox is working fine, the httpd.conf file lists the correct IP and I could check the site online just after the change. Thank you very much!

Whenever you change an ip of an existing domain you need to wait for your isp to clear its dns cache. That takes time. That is a simple fact. Whenever you look at a domain your isp does a ip lookup and then caches that ip so it doesn't have to look it up again for several hours. So if you look at your domain then change the ip then try to go to it again you will not see it because your isp is still giving you the old ip address.

Technically the site is not down. It is only down for those who are on isp's who have previously did an ip lookup for that domain within the past few hours.

The only way around this is to create a duplicate httpd.conf file for that domain with the old ip address and have the main httpd.conf file load it. This way the domain will work on both the new ip and the old ip.

Yes, it was a DNS issue, but at least my ISP dns cache uses the TTL the named tell them to use. If that'd not work, I'd do your httpd.conf duplicate advice. Thank you too.

:D
 
Back
Top