GoAccess log error from ns slave

Discussion in 'ISPConfig 3 Priority Support' started by atle, Mar 8, 2021.

  1. till

    till Super Moderator Staff Member ISPConfig Developer

    Mirroring always mirrors all services, that's why the multiserver guides always use a dedicated nameserver or as in the mirror guide, mirror all services. So technically your ns2 server is a web server when it mirrors a server that is a web server. This explains why the records are in the database. The only thing that we can do to prevent the error to show up in your special case is that we must add some code to not run the goaccess functions when web services are disabled for the node even if there are websites that use goaccess on that node.
     
    Th0m likes this.
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    If this would be implemented, it should be implemented for all sorts of services...

    There is a feature request to only mirror a selected service: https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/990
     
  3. atle

    atle Member HowtoForge Supporter

    Well, I dont think the error message is a biggie, brought it most up for you to validate if it is a bug or something.

    What interest me more however is the mirroring and setting up a slave NS. What is best practice for ISPConfig here? The websites, and the zones are created on the master server. How are they supposed to be copied to a ns server? I thought it was by mirroring, as Till has said in another thread. Or do you recommend one to not mirror, and transfer the zones in any other way? It is feasable with the API, but that would be yet another script to maintain.
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Personally, I create the zones as secondary zone and don't use the mirroring. DNSSEC is currently broken on mirrored setups, and I think it is good practice to use DNSSEC.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    When you want to use Mirroring, then you don't create any zones on the master. You have a ns1 server node and a ns2 server node in that case, see ISPConfig Multiserver tutorials. Or do what @Thom suggested and use the secondary zone feature instead of mirroring, when using the secondary zone feature then you can create zones on the master without needing a dedicated ns1 server.
     
  6. atle

    atle Member HowtoForge Supporter

    You create them manually?
     
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  8. atle

    atle Member HowtoForge Supporter

    I believe I have followed what us said in the manual, with the difference that the master server is ns1 as well, and ns2 is a separate server. Hence zones are created on the master/ns1 server. But the problem, at least for me, is that new zones are not copied so ns2, if not mirrored. Do you mean the new zones should be copied to ns2?
     
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    This is exactly the problem.

    When you disable mirroring, you should use the secondary zones feature.
     
  10. atle

    atle Member HowtoForge Supporter

  11. atle

    atle Member HowtoForge Supporter

    And in this case I have to copy new zones manually?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Then alter your setup so it matches the one from the manual by adding a new ns1 node and then changing ns2 to be a mirror of ns1.
     
    Th0m likes this.
  13. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Feel free to contribute to the project by implementing/fixing a request/bug ;)

    Otherwise, install a separate main nameserver as it is done in the multiserver guide.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    No, BIND is copying the zones in this case instead of ISPConfig. All you do is to create a secondary record for each zone once using ISPConfig GUI or API and from that point on, BIND is mirroring the whole zone on it's own.
     
  15. atle

    atle Member HowtoForge Supporter

    Hm, bind never used to copy new zones, it only transfer the content of zones that reside on both servers.
     
  16. atle

    atle Member HowtoForge Supporter

    :) Yes. Fixing would be nice, but I am not yet to comfortable with how ISPConfig is structured and built up. I am extremely impressed of what I seen, ISPC is far ahead of cpanel and DA that definitly are more "hacky", or fragmented scripted. At some point I believe I will be able to contribute.
    Right now probably a "hack/script" using the API is something I will work out. I need to think this through at bit first, how I want the structure of name servers. I dont believe the mirroring solution is bad, it has worked for 6 month, so it seems to be robust.
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    I nowhere said that it copies new zones on it's own. Please reread my post #34, it clearly explains what to do and what to add in ISPConfig to sync zones via zone transfer.
     
  18. atle

    atle Member HowtoForge Supporter

    And this I will do, a bit skeptic about transfer of new zones nevertheless, but I will see. This with creating new zones on slave servers is a generic problem. It is usually a stopper for using third parties as slave servers since few of them offers an api to add new zones.
     
  19. atle

    atle Member HowtoForge Supporter

    And you mean when I create a website on the master, it will copy the new zone to ns1 automatically?
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    No, websites have nothing to do with DNS, no matter if your ns1 is on the master or not. You do this:

    1) Create a new ns1 server.
    2) Change the settings of ns2 to mirror ns1.
    3) When you create a dns zone in ISPConfig, you create it on ns1 instead of the master. It's a multiserver setup, so the only difference between creating a zone on ns1 and master is the server that you select in the 'server' field of the dns zone. And as you disable name services on the master, you have only one server to select in that field anyway.
     

Share This Page