Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Config file cannot be parsed by unbound

    DHCP and DNS
    1
    1
    908
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tonymorella
      last edited by

      When I make any changes to Unbound I am getting the following:
      The generated config file cannot be parsed by unbound. Please correct the following errors:
      /var/unbound/test/unbound_server.key: No such file or directory
      [1480357537] unbound-checkconf[69057:0] fatal error: server-key-file: "/var/unbound/test/unbound_server.key" does not exist

      This just started today, no changes I can think of caused this.

      If I make the test directory and copy all the files from /var/unbound into it I am able to save changes and the test directory is deleted.

      in unbound.inc can see the function in unbound.inc:

      
      function test_unbound_config($unboundcfg, &$output) {
              global $g;
      
              $cfgsubdir = "/test";
              unbound_generate_config($unboundcfg, $cfgsubdir);
              unbound_remote_control_setup($cfgsubdir);
              do_as_unbound_user("unbound-anchor", $cfgsubdir);
      
              $cfgdir = "{$g['unbound_chroot_path']}{$cfgsubdir}";
      
              $rv = 0;
              exec("/usr/local/sbin/unbound-checkconf {$cfgdir}/unbound.conf 2>&1", $output, $rv);
              rmdir_recursive($cfgdir);
      
              return $rv;
      
      

      Any ideas?

      Update:

      I just updated to dev 2.3.3 and the problem is gone, but not sure how stable this version is.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.