bind9 postinst fails on rndc-confgen

Bug #898004 reported by ben thielsen
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
bind9 (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

>lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

>apt-cache policy bind9
bind9:
  Installed: 1:9.7.3.dfsg-1ubuntu4.1
  Candidate: 1:9.7.3.dfsg-1ubuntu4.1
  Version table:
 *** 1:9.7.3.dfsg-1ubuntu4.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ oneiric-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1:9.7.3.dfsg-1ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages

when installing bind9, installation fails, leaving the package half installed:

>apt-get install bind9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  dnsutils bind9-doc resolvconf ufw
The following NEW packages will be installed:
  bind9
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 331 kB of archives.
After this operation, 1106 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric-updates/main bind9 amd64 1:9.7.3.dfsg-1ubuntu4.1 [331 kB]
Fetched 331 kB in 1s (282 kB/s)
Preconfiguring packages ...
Selecting previously deselected package bind9.
(Reading database ... 17868 files and directories currently installed.)
Unpacking bind9 (from .../bind9_1%3a9.7.3.dfsg-1ubuntu4.1_amd64.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up bind9 (1:9.7.3.dfsg-1ubuntu4.1) ...
Adding group `bind' (GID 107) ...
Done.
Adding system user `bind' (UID 105) ...
Adding new user `bind' (UID 105) with group `bind' ...
Not creating home directory `/var/cache/bind'.
Auto configuration failed
139717989152576:error:0E065068:configuration file routines:STR_COPY:variable has no value:conf_def.c:618:line 79
dpkg: error processing bind9 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 bind9
E: Sub-process /usr/bin/dpkg returned an error code (1)

>dpkg -l bind9
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===============================-===============================-==============================================================================
iF bind9 1:9.7.3.dfsg-1ubuntu4.1 Internet Domain Name Server

>dpkg --configure bind9
Setting up bind9 (1:9.7.3.dfsg-1ubuntu4.1) ...
Auto configuration failed
139873104557888:error:0E065068:configuration file routines:STR_COPY:variable has no value:conf_def.c:618:line 79
dpkg: error processing bind9 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 bind9

>./bind9.postinst 'configure'
Auto configuration failed
140732604843840:error:0E065068:configuration file routines:STR_COPY:variable has no value:conf_def.c:618:line 79

looking a bit closer at the post install script, it's revealed that the rndc-confgen command is actually what's failing:

>rndc-confgen -r /dev/urandom -a
Auto configuration failed
140093146728256:error:0E065068:configuration file routines:STR_COPY:variable has no value:conf_def.c:618:line 79

- and the error is actually an openssl error.

it turns out that there was a variable in openssl.cnf, pointing to a file which didn't exist [inadvertently left over from some other modifications made to openssl.cnf]:

private_key = $dir/private/cakey.pem

removing this line from the config allows rndc-confgen to complete successfully, and thus the package installation completes successfully:

>apt-get install bind9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  dnsutils bind9-doc resolvconf ufw
The following NEW packages will be installed:
  bind9
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/331 kB of archives.
After this operation, 1106 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package bind9.
(Reading database ... 17868 files and directories currently installed.)
Unpacking bind9 (from .../bind9_1%3a9.7.3.dfsg-1ubuntu4.1_amd64.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up bind9 (1:9.7.3.dfsg-1ubuntu4.1) ...
Adding group `bind' (GID 107) ...
Done.
Adding system user `bind' (UID 105) ...
Adding new user `bind' (UID 105) with group `bind' ...
Not creating home directory `/var/cache/bind'.
wrote key file "/etc/bind/rndc.key"
#
 * Starting domain name service... bind9 [ OK ]

i know that the init script relies on rndc, but i don't think that the inability to run the rndc-confgen command should cause package installation to fail. perhaps a message alerting the user. if installation had completed, i would have found there was an error on my own, but the cause would have been much clearer, as i would have been running the command myself, directly.

Changed in bind9 (Ubuntu):
importance: Undecided → Medium
Thomas Hood (jdthood)
summary: - post installation script fails with exit status 1
+ bind9 postinst fails on rndc-confgen
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bind9 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.