Deleting a co-domain does not clear all entries?

Discussion in 'Installation/Configuration' started by martinfst, Jan 19, 2007.

  1. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    I try to create a co-domain to test a site before moving all dns entries to the new server, so my setup is:

    www.domain.tld --> old server
    www2.domain.tld --> new server (ISPC based)

    I create a co-domain www2. Unfortunately is does not show up. In the apache2/vhost directory, I find the www2 ServerAlias in a file Vhosts_ispconfig.conf with a timestamp. In the Vhosts_ispconfig.conf without a timestamp www2 is gone, but the change date_time of both files are the same. So, it looks like it gets added, but also immediately removed.

    So, I thought I remove all www2 entries in ISPC, do-domain, dns all cleared, also empty-d the recycle bin. Then start from fresh.

    Now I get an error entry already exists. Looking for www2 in /etc/bind shows that the rDNS file still holds the www2 entries. So, up to the database.... and yes www2 is in there also. Looks like the delete function of codomain does not clear all entries? Any suggestions? Insight? Am I on the wrong track?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Hi Martin, the copies of Vhosts_ispconfig.conf where created when ISPConfig can not restart your apache webserver due to a misconfiguration, it then creates a copy of the file Vhosts_ispconfig.conf with date appended and uses the latest working version of Vhosts_ispconfig.conf.

    To find the isuue:

    1) Rename Vhosts_ispconfig.conf to
    2) Rename the latest version of Vhosts_ispconfig.conf with a date appended to Vhosts_ispconfig.conf
    3) run:

    httpd -t

    and post the error message here, in case you dont know the answer already when you read the error :)

    To your bind error. Co-domains and BIND are not connected directly. If you want to delete a A-Record, use the DNS-Manager.
  3. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    Thanks Till,

    one part solved. The reason for ISPConfig not wanting to add the co-domain anymore was due to the fact that for another domain the SSL certificate file was missing. So I generated once the (selfsigned) cert, worked oke during testing and left it. I wasn't working on that domain with SSL specifically, just working on adding mail users / aliases to the domain with the SSL file error. Must have touched a key in the SSL part, because it used to work :rolleyes:

    The bind problem with a co-domain www2 is a bigger problem.
    I removed to co-domain, emptied (all) the recycle bins and try to add with the DNS manager www2. I immediately get the error:
    There is already an A Record entry for this host in this zone
    Looking in /etc/bind, and grepping for www2, I only see this specific www2.domain.tld in the rDNS, not in the normal DNS files.
    Code:       PTR     www2.domain.tld.
    Could the previous error/problem and my tweaking around have 'corrupted' the database? I looked at the database, but I couldn't find quickly how the relation between hostname and domain is stored. It seems be be something with doc_id, but it's not clear to me (yet). Any tip?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I dont think so.

    Please check if there is a A-Record for www2 for this domain in the DNS-Manager. If not, check all recycle bins of the dns manager if there is a www2 A-record.

    Generally, co-domains have nothing to do with your BIND configuration. Only records from the DNS_mnagaer where written in the BIND configuration. The only connection between co-domains and bind is, that a A-RECORD can be added automatically within the DNS-Manager (not directly to the bind configuration, it is added within the ISPConfig interface in the DNS-Manager part) by selecting the create DNS checkbox for the co-domain.
  5. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    Yeah, I know, so I checked and double checked the recycle bins. All are empty. Then I tried with a www3 A record in DNS manager. No juice. I added and deleted a www3 before. Then I went for a www5 record. Yeah, can make that!

    Like I said, there's no www2 or www3 record in /etc/bind (except for the rDNS), So I'm really :confused:

    I'll continue my search and let you knwo what I find.

    This setup is just for me, transferring sites to the new server. I have www pointing to the old server, and testing the site with www2 pointing to the new server. If oke, then I'll change the DNS of www (with ISPConfig) to point to the new server and I'll delete the DNS & co-domain www2 (or www5). But I'd really like to know why it's complaining about an existing record which is not there at all. Time for GhostBusters........
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have any www2 records in the database table dns_a? (do not delete them manually if you find them!)
  7. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    I won't delete them :D
    I have used www2 on 11 domains to be able to use the earlier described trick. Here's a select from dns_a for all www2, www3 and www5 records. I probably need some join to match this with the domains.... I only added www3 and www5 to the domain I'm having problems with.

    doc_id  doctype_id     host     ip_adresse
      10      1018         www2     nnn.nnn.nnn.120
      23      1018         www2     nnn.nnn.nnn.121
      31      1018         www2     nnn.nnn.nnn.122
      35      1018         www2     nnn.nnn.nnn.122
      43      1018         www2     nnn.nnn.nnn.122
      48      1018         www2     nnn.nnn.nnn.122
      53      1018         www2     nnn.nnn.nnn.122
      58      1018         www2     nnn.nnn.nnn.122
      64      1018         www2     nnn.nnn.nnn.122
      66      1018         www2     nnn.nnn.nnn.122
      71      1018         www2     nnn.nnn.nnn.122
      75      1018         www3     nnn.nnn.nnn.122
      85      1018         www5     nnn.nnn.nnn.122
  8. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    Found it

    ISPConfig is doing what it is supposed to do and although I just bought new glasses last year I might require new ones :(

    Like Till suggested: The problem with a www2 record staying behind was indeed due to a not empty recycle bin in the DNS manager. I overlooked it, because it's opposite to the location of recycle bins in other areas of ISPConfig. Here it's on top of the entries, everywhere else it's at the bottom. Duh.

    Attached Files:

Share This Page