DNS not working

Discussion in 'Installation/Configuration' started by mrbronz, Nov 27, 2023.

  1. pyte

    pyte Well-Known Member HowtoForge Supporter

    Is the Zonefile. It does not have a .err extension when the syntax is OK. So please run the command against the correct file.
    Code:
    named-checkzone gregson.me.uk /etc/bind/pri.gregson.me.uk
    Can you post the content of pri.gregson.me.uk here too?
     
  2. mrbronz

    mrbronz Member HowtoForge Supporter

    OK got it sorted.

    I will try and explain,
    The first issue was related to a dot issue, which was an easy fix. I was able to resolve this issue with the help of Till.

    The second issue was identified by pyte, who suggested running the "named-checkzone" command to test the zone file. This command revealed some errors.

    However, when I ran a dig command on my server using ns1 and ns2, it returned the old server IP addresses.
    Upon checking the "/etc/bind/pri.gregson.me.uk" file, I found that it still contained the old server IP addresses. To resolve this, I copied the updated file to all servers.

    I also noticed that the "/etc/bind/pri.gregson.me.uk.err" file was missing on ns1 and ns2 servers. I resolved this by copying the file from my main server to the other two servers.

    Despite the issue being fixed, I am still not convinced that the main server might not be synchronizing with ns1 and ns2 servers.

    I would like to know if there is a way to check and correct this synchronization issue.
     
    Last edited: Nov 29, 2023
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    You don't fix in such a file because ISPConfig is mysql base so fix / figure out why it is not writing properly to the right file.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Is ns2 server a mirror of ns1, or did you create DNS secondary zones in ISPConfig Panel? These are two different ways to get zone file copied to ns2, for further troubleshooting it is necessary to know which is used.
    By the way, have you now read the DNS tutorial linked to in my signature?
     
  5. mrbronz

    mrbronz Member HowtoForge Supporter

    I followed this tutorial and then implemented the changes I told you about.

    Changing the files manually seemed to work, but, like I said, how do I test that the servers are communicating correctly?
    I have implemented the Grant privileges for ns1 and ns2 on the main server file. Privileges are as specified.
    But how do I test and confirm they are communicating, Do you have any ideas?
    The only real issue I have now is the ISP3 control panel is not secure.
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That tutorial sets ns2 as mirror of ns1. So it is ISPConfig that writes the zone files on both servers.
    See the read before posting article, about not writing changes to disk.
    Why is that? How did you determine that is the case?
     
    ahrasis likes this.
  7. mrbronz

    mrbronz Member HowtoForge Supporter

    Point 1: If your tutorial sets NS2 as a mirror, then that's what mine is set to.
    Point 2: See the read before posting any article, "No comment!"
    Point 3: I don't know why that is, that's why I need to fix it!
    Point 4: I determined that the Ispconfig 3 control panel was not secure by observing my browser address bar when logging into it.

    upload_2023-11-30_18-38-58.png

    Kind regards
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    So you do not want to know how to find the reason for your problem? The read before posting thread https://forum.howtoforge.com/threads/please-read-before-posting.58408/ , as @Taleman mentioned, has a chapter on how to debug it if changes do not get written to disk.

    This means you either use the wrong URL (not the system hostname) to access the server, or this name was not reachable for Let's Encrypt at install time. You can create a new SSL cert by running an ispconfig update with --force option and choose to recreate the SSL cert during update.
     
  9. mrbronz

    mrbronz Member HowtoForge Supporter

    Hi Till,
    Yes, I do want to know, I said "no comment" because I'm embarrassed because I missed that step out... sorry !
    It makes no difference the url I use you can assume that was the last URL I used to test it.
    upload_2023-11-30_19-13-31.png

    But thank you for the info I am now in the process of trying that suggestion.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, sorry, then I misunderstood you.


    run the command:

    hostname -f

    on your server. The hostname it shows is the system hostname and that#s what the SSL cert gets issued for.
     
  11. mrbronz

    mrbronz Member HowtoForge Supporter

    hostname -f
    hostname: No address associated with hostname

    But hostname file contains "martin"

    /etc/hosts file contains
    Code:
    127.0.0.1       localhost
    127.0.1.1       martin.gregson.me.uk    martin
    192.168.61.70   martin.gregson.me.uk    martin
    192.168.61.71   ns1.gregson.me.uk       ns1
    192.168.61.72   ns2.gregson.me.uk       ns2
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
     
  12. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Access it with martin.gregson.me.uk:8080 as you set for your server. Refer back to the preliminary set up tutorial for guide to fix it.
     
  13. mrbronz

    mrbronz Member HowtoForge Supporter

    Thanks, Ahrais, but which part of the "preliminary set up tutorial"?

    As far as I can tell, I have checked the relevant parts I have shown in post #31

    I checked the syslog file and have noted a warning: "Access denied for user 'ispcsrv3'@'ns2.gregson.me.uk' (using password: YES)"
    Should I be concerned about this warning?
    I am making the assumption a warning, so no real threat, but would like to fix it if possible.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, it means the slave node can not work as it has no access to the master. And that's why your DNS fails as DNS records can not be fetched by the slave node form master. This is typically a problem with wrongly set up hostnames. Run an ISPConfig update on the slave server and let it reconfigure permissions in master database. Then you should also fix the master servers hostname, the hostname -f command must return the system hostname. Delete the line "127.0.1.1 martin.gregson.me.uk martin" in /etc/hosts file on the master and check if hostname -f works then.
     
    ahrasis likes this.
  15. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Guide fot setting up hostname is in the preliminary server setup tutorials (almost last part) and it can be used to fix its problem too. The link for the preliminary server setup tutorial should be there in the starting part of most ISPConfig Perfect Server Tutorials.
     
  16. mrbronz

    mrbronz Member HowtoForge Supporter

    Hi Till

    I have run the IPC3 update.php and reconfigured permissions as run from my slave. I cannot see any changes.
    I am still getting a similar Syslog warning "Access denied for user 'ispcsrv3'@'ns2.gregson.me.uk' (using password: YES)"
    But I am also getting more jobs stuck in the job queue
    upload_2023-12-1_14-48-10.png

    I'm assuming this is related to the miscommunication. Sever issue.
     
  17. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you share the full update run from the slave? And a run of /usr/local/ispconfig/server/server.sh after the update has been done?
     
  18. mrbronz

    mrbronz Member HowtoForge Supporter

    Hi All

    Thanks for all the help you have given me. You have all helped me sort it out yet again. Thank you.

    The /etc/resolv.conf had no entries in it, so I listed my DNS nameservers in it and 8.8.8.8 as a backup
    I replaced the 127.0.1.1 host entry.
    In addition, it seemed I may have missed a step when creating the DNS servers; I forgot to create the DNS users in my master servers MySQL for both ns1.gregson.me.uk and their local addresses.
    To ensure I got it correct on the slaves, I deleted ispconfig and installed on both masters.

    Once I rebooted all the servers, all working.

    Many, many thanks for being so patient with me.
    I have a different issue with the job queue,

    But I will create a different thread for that issue.
     
    Th0m likes this.

Share This Page