#779483 collectd: Fails to install without a valid FQDN

Package:
collectd
Source:
collectd
Description:
statistics collection and monitoring daemon
Submitter:
s3v
Date:
2018-12-22 18:45:04 UTC
Severity:
normal
#779483#5
Date:
2015-03-01 10:05:28 UTC
From:
To:

Hi,

attempting to install this package...

   # apt-get install collectd

   Reading package lists... Done
   Building dependency tree
   Reading state information... Done
   The following extra packages will be installed:
     collectd-core libdbi1 librrd4
   Suggested packages:
     collectd-dev librrds-perl libconfig-general-perl apcupsd bind9
hddtemp ipvsadm lm-sensors mbmon
     memcached nginx nut openvpn olsrd pdns-server postgresql time-daemon
   Recommended packages:
     libesmtp6 liblvm2app2.2 libmodbus5 libopenipmi0 liboping0
libowcapi-2.9-8 libpcap0.8 libperl5.20
     libpq5 libprotobuf-c1 librabbitmq1 libsnmp30 libtokyotyrant3
libupsclient4 libvirt0
     default-jre-headless rrdtool
   The following NEW packages will be installed:
     collectd collectd-core libdbi1 librrd4
   0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
   Need to get 1119 kB of archives.
   After this operation, 3941 kB of additional disk space will be used.
   Do you want to continue? [Y/n]
   Get:1 http://ftp.it.debian.org/debian/ jessie/main collectd-core
amd64 5.4.1-6 [777 kB]
   Get:2 http://ftp.it.debian.org/debian/ jessie/main libdbi1 amd64
0.9.0-4 [32.3 kB]
   Get:3 http://ftp.it.debian.org/debian/ jessie/main librrd4 amd64
1.4.8-1.2 [223 kB]
   Get:4 http://ftp.it.debian.org/debian/ jessie/main collectd amd64
5.4.1-6 [86.7 kB]
   Fetched 1119 kB in 2s (490 kB/s)
   Preconfiguring packages ...
   Selecting previously unselected package collectd-core.
   (Reading database ... 146134 files and directories currently installed.)
   Preparing to unpack .../collectd-core_5.4.1-6_amd64.deb ...
   Unpacking collectd-core (5.4.1-6) ...
   Selecting previously unselected package libdbi1:amd64.
   Preparing to unpack .../libdbi1_0.9.0-4_amd64.deb ...
   Unpacking libdbi1:amd64 (0.9.0-4) ...
   Selecting previously unselected package librrd4.
   Preparing to unpack .../librrd4_1.4.8-1.2_amd64.deb ...
   Unpacking librrd4 (1.4.8-1.2) ...
   Selecting previously unselected package collectd.
   Preparing to unpack .../collectd_5.4.1-6_amd64.deb ...
   Unpacking collectd (5.4.1-6) ...
   Processing triggers for man-db (2.7.0.2-5) ...
   Setting up collectd-core (5.4.1-6) ...
   Setting up libdbi1:amd64 (0.9.0-4) ...
   Setting up librrd4 (1.4.8-1.2) ...
   Setting up collectd (5.4.1-6) ...
   Job for collectd.service failed. See 'systemctl status
collectd.service' and 'journalctl -xn' for details.
   invoke-rc.d: initscript collectd, action "restart" failed.
   dpkg: error processing package collectd (--configure):
   subprocess installed post-installation script returned error exit
status 1
   Processing triggers for libc-bin (2.19-15) ...
   Errors were encountered while processing:
   collectd
   E: Sub-process /usr/bin/dpkg returned an error code (1)

   # systemctl -l status collectd.service

   ● collectd.service - LSB: manage the statistics collection daemon
     Loaded: loaded (/etc/init.d/collectd)
     Active: failed (Result: exit-code) since dom 2015-03-01 10:26:49
CET; 2min 13s ago
     Process: 6119 ExecStop=/etc/init.d/collectd stop (code=exited,
status=0/SUCCESS)
     Process: 6127 ExecStart=/etc/init.d/collectd start (code=exited,
status=1/FAILURE)

     mar 01 10:26:49 s3v3land collectd[6130]: Looking up "s3v3land"
failed. You have set the "FQDNLookup" option,
     but I cannot resolve my hostname to a fully qualified domain name.
Please fix the network configuration.
     mar 01 10:26:49 s3v3land collectd[6127]: Starting statistics
collection and monitoring daemon: collectd
     not starting, configuration error failed!
     mar 01 10:26:49 s3v3land systemd[1]: collectd.service: control
process exited, code=exited status=1
     mar 01 10:26:49 s3v3land systemd[1]: Failed to start LSB: manage
the statistics collection daemon.
     mar 01 10:26:49 s3v3land systemd[1]: Unit collectd.service entered
failed state.

The error occurs if /etc/hosts hasn't FQDN domain name:

     127.0.0.1       localhost
     192.168.1.3     s3v3land.FOO

     # The following lines are desirable for IPv6 capable hosts
     ::1     localhost ip6-localhost ip6-loopback
     ff02::1 ip6-allnodes
     ff02::2 ip6-allrouters

After removing "FOO" from /etc/hosts file, the problem disappears and
package installation ends fine.

Can you provide some warnings regarding incorrect syntax in "etc/hosts"
but, despite that, allowing a normal installation of the package?

Thanks for reading and for your job.

#779483#10
Date:
2015-03-01 12:43:08 UTC
From:
To:
forwarded 779483 collectd@verplant.org
thanks

Hi,
[…]

Thanks for reporting this. By default, the Debian package configuration
uses 'FQDNLookup true' and I think it makes sense to abort if the lookup
fails. However, I think we can make that optional by allowing a third
value (besides "true" and "false") like "allow-fallback" or something
which I could then use in the default package configuration.

With this email, I forwarded the issue to the upstream mailing list for
further comments.

Cheers,
Sebastian

#779483#17
Date:
2017-03-25 10:53:44 UTC
From:
To:
Hi!
Do yoy have any news about this issue?

After more than two years the error message is slightly different:

 The following NEW packages will be installed:
 collectd collectd-core
 0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
 Need to get 0 B/1106 kB of archives.
 After this operation, 4135 kB of additional disk space will be used.
 Do you want to continue? [Y/n]
 Preconfiguring packages ...
 Selecting previously unselected package collectd-core.
 (Reading database ... 173831 files and directories currently installed.)
 Preparing to unpack .../collectd-core_5.7.1-1.1_amd64.deb ...
 Unpacking collectd-core (5.7.1-1.1) ...
 Selecting previously unselected package collectd.
 Preparing to unpack .../collectd_5.7.1-1.1_amd64.deb ...
 Unpacking collectd (5.7.1-1.1) ...
 Setting up collectd-core (5.7.1-1.1) ...
 Created symlink /etc/systemd/system/multi-user.target.wants/collectd.service ->
 /lib/systemd/system/collectd.service.
 Processing triggers for systemd (232-19) ...
 Processing triggers for man-db (2.7.6.1-2) ...
 Setting up collectd (5.7.1-1.1) ...
 Job for collectd.service failed because the control process exited with error code.
 See "systemctl status collectd.service" and "journalctl -xe" for details.
 invoke-rc.d: initscript collectd, action "restart" failed.
 * collectd.service - Statistics collection and monitoring daemon
 Loaded: loaded (/lib/systemd/system/collectd.service; enabled; vendor preset:
 enabled)
 Active: activating (auto-restart) (Result: exit-code) since Sat 2017-03-25
 10:35:21 CET; 8ms ago
 Docs: man:collectd(1)
 man:collectd.conf(5)
https://collectd.org
 Process: 20181 ExecStartPre=/usr/sbin/collectd -t (code=exited, status=1/FAILURE)
 dpkg: error processing package collectd (--configure):
 subprocess installed post-installation script returned error exit status 1
 Errors were encountered while processing:
 collectd
 E: Sub-process /usr/bin/dpkg returned an error code (1)

but the result remains the same (uninstallable package) :(

I think that this issue violates the Debian Policy (section 6.3), therefore I raise
the severity of this bug to "serious" accordingly.
Feel free to downgrade the bug severity as appropriate.

Thanks.

#779483#22
Date:
2018-12-22 18:06:24 UTC
From:
To:
Hi again.

Uhm, something gone wrong...

After long time and no user/maintainer/upstreamer reactions, i guess
this issue is not important at all. I set the severity to "normal".

Thanks for your work.

Kind regards and happy XMas!