Best Practice for Second Server Configuration

verdon

Well-Known Member
Nov 1, 2003
945
16
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
Hi,

I'm looking for some general guidance/tips on adding a second shared server to a one-man, one-server hosting business.

I currently have one sever, i.e.
domain: example.com (111.222.333.400)
hostname: server1.example.com (111.222.333.400)
dns: ns1.example.com (111.222.333.400) and ns2.example.com (111.222.333.401)

I had thought to bring my second server online with
hostname: server2.example.com (111.222.333.500)
dns: ns3.example.com (111.222.333.500) and ns4.example.com (111.222.333.501)

I created the zone file on the both servers for server2.example.com (111.222.333.500) and had the rDNS setup and it all resolves. I was going to do the same for ns3 and ns4 and then setup DNS clustering between the two.

My first issue appeared when I tried to set the hostname for server2, and I received the error "
The system cannot set the hostname to a domain owned by a user because all local email would be directed to the “nobody” account."

So, I take it then that I cannot actually configure the second server before creating an account on it? Does that mean that I must have a unique domain registered just for this? Is my basic concept OK, or should I just treat the second server as a completely unique entity with no real connection to the first?

I appreciate any thoughts.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

My first issue appeared when I tried to set the hostname for server2, and I received the error "The system cannot set the hostname to a domain owned by a user because all local email would be directed to the “nobody” account."
Are you sure that "server2.example.com" does not exist as a cPanel account on this server? Generally, it's okay if "example.com" exists as an account as long as "server2.example.com" isn't added as a subdomain or addon domain name.

However, note that setting up DNS clustering between two hosting servers is what's called a WHM-to-WHM two-way sync configuration. This type of configuration is not recommended because it may cause DNS errors on your servers. You can read a full clustering guide at:

Guide to DNS Cluster Configurations - cPanel Knowledge Base - cPanel Documentation

Thank you.
 

verdon

Well-Known Member
Nov 1, 2003
945
16
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
Are you sure that "server2.example.com" does not exist as a cPanel account on this server? Generally, it's okay if "example.com" exists as an account as long as "server2.example.com" isn't added as a subdomain or addon domain name.
Hi,

Yes. Thanks. There are no accounts at all on the 2nd server. The only zone file is the one I manually added (via WHM/Add DNS) for server2.example.com. example.com is the first server. I guess I'm trying to avoid registering unneeded domain.com just for the 2nd server, but am unsure of the best approach.

Thanks for the link to clustering.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
There are no accounts at all on the 2nd server. The only zone file is the one I manually added (via WHM/Add DNS) for server2.example.com.
Hello,

Can you open a support ticket using the link in my signature so we can take a closer look? I don't believe that error message should appear if an account for "example.com" does not exist on the server.

Thank you.
 

verdon

Well-Known Member
Nov 1, 2003
945
16
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
In case anyone is watching this, it seems like my initial attempt to add the new zone for server2.example.com using Home > DNS Functions > Add a DNS Zone resulted in an entry into /etc/userdomains and marked the domain as owned by nobody, which lead to the hostname error. It's not clear if that was the expected behaviour, and that is being investigated.

The fix was to simply delete that DNS zone, then update my hostname to server2.example.com, after which I was prompted to create an A record for the new hostname, which recreated the zonefile, without the entry in /etc/userdomains .. and the server seems happy. I'll know better once all DNS has propagated, and I get an account or two set up.

I'm guessing at this point, that in regards to the other question about DNS clustering in my initial post, that my thoughts of using server1 and server2 as secondary DNS for each other is not a good idea, and until I know better, I will just use each server for each own's primary and secondary DNS. I suppose the better practice would be to bring a 3rd DNS-only server online sometime, and use it as a secondary DNS for both.
 
  • Like
Reactions: cPanelMichael