ansible-elk icon indicating copy to clipboard operation
ansible-elk copied to clipboard

Cannot install openntpd in Ubuntu 14.04

Open nowshad-amin opened this issue 9 years ago • 3 comments

  • name: Install common apt packages apt: pkg={{ item }} state=latest with_items: elk_common_packages sudo: yes

Result:

failed: [172.32.1.82] => (item=openntpd,python-apt,python-pycurl,python-pip,supervisor,monit,git-core) => {"failed": true, "item": "openntpd,python-apt,python-pycurl,python-pip,supervisor,monit,git-core"} stderr: /etc/openntpd/ntpd.conf: Permission denied invoke-rc.d: initscript openntpd, action "start" failed. dpkg: error processing package openntpd (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: openntpd E: Sub-process /usr/bin/dpkg returned an error code (1)

stdout: Reading package lists... Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: libopts25 Use 'apt-get autoremove' to remove it. The following extra packages will be installed: git git-man liberror-perl python-meld3 Suggested packages: git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki git-svn exim4 postfix mail-transport-agent The following packages will be REMOVED: ntp The following NEW packages will be installed: git git-core git-man liberror-perl monit openntpd python-meld3 supervisor 0 upgraded, 8 newly installed, 1 to remove and 145 not upgraded. Need to get 4021 kB of archives. After this operation, 22.8 MB of additional disk space will be used. Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main liberror-perl all 0.17-1.1 [21.1 kB] Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main git-man all 1:1.9.1-1ubuntu0.1 [698 kB] Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main git amd64 1:1.9.1-1ubuntu0.1 [2627 kB] Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main git-core all 1:1.9.1-1ubuntu0.1 [1458 B] Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe openntpd amd64 20080406p-7 [33.9 kB] Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe monit amd64 1:5.6-2 [286 kB] Get:7 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe python-meld3 amd64 0.6.10-1 [39.0 kB] Get:8 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe supervisor all 3.0b2-1 [314 kB] Fetched 4021 kB in 0s (11.6 MB/s) (Reading database ... 56888 files and directories currently installed.) Removing ntp (1:4.2.6.p5+dfsg-3ubuntu2.14.04.3) ...

  • Stopping NTP server ntpd ...done. Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Selecting previously unselected package liberror-perl. (Reading database ... 56857 files and directories currently installed.) Preparing to unpack .../liberror-perl_0.17-1.1_all.deb ... Unpacking liberror-perl (0.17-1.1) ... Selecting previously unselected package git-man. Preparing to unpack .../git-man_1%3a1.9.1-1ubuntu0.1_all.deb ... Unpacking git-man (1:1.9.1-1ubuntu0.1) ... Selecting previously unselected package git. Preparing to unpack .../git_1%3a1.9.1-1ubuntu0.1_amd64.deb ... Unpacking git (1:1.9.1-1ubuntu0.1) ... Selecting previously unselected package git-core. Preparing to unpack .../git-core_1%3a1.9.1-1ubuntu0.1_all.deb ... Unpacking git-core (1:1.9.1-1ubuntu0.1) ... Selecting previously unselected package openntpd. Preparing to unpack .../openntpd_20080406p-7_amd64.deb ... Unpacking openntpd (20080406p-7) ... Selecting previously unselected package monit. Preparing to unpack .../monit_1%3a5.6-2_amd64.deb ... Unpacking monit (1:5.6-2) ... Selecting previously unselected package python-meld3. Preparing to unpack .../python-meld3_0.6.10-1_amd64.deb ... Unpacking python-meld3 (0.6.10-1) ... Selecting previously unselected package supervisor. Preparing to unpack .../supervisor_3.0b2-1_all.deb ... Unpacking supervisor (3.0b2-1) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Processing triggers for ureadahead (0.100.0-16) ... Setting up liberror-perl (0.17-1.1) ... Setting up git-man (1:1.9.1-1ubuntu0.1) ... Setting up git (1:1.9.1-1ubuntu0.1) ... Setting up git-core (1:1.9.1-1ubuntu0.1) ... Setting up openntpd (20080406p-7) ... Starting openntpd: Setting up monit (1:5.6-2) ...
  • Starting daemon monitor monit ...done. Setting up python-meld3 (0.6.10-1) ... Setting up supervisor (3.0b2-1) ... Starting supervisor: supervisord. Processing triggers for ureadahead (0.100.0-16) ...

msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'openntpd' 'supervisor' 'monit' 'git-core'' failed: /etc/openntpd/ntpd.conf: Permission denied invoke-rc.d: initscript openntpd, action "start" failed. dpkg: error processing package openntpd (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: openntpd E: Sub-process /usr/bin/dpkg returned an error code (1)

nowshad-amin avatar Oct 03 '15 16:10 nowshad-amin

Hi,

sudo is enabled for this task

elk_common_packages sudo: yes

and yet you are getting permissions related error:

stderr: /etc/openntpd/ntpd.conf: Permission denied

The error is not related to this playbook. Try to purge openntpd package.

bakhti avatar Oct 08 '15 13:10 bakhti

Also didnt work for me

TASK: [bakhti.elk | Install common apt packages] ****************************** <127.0.0.1> REMOTE_MODULE apt pkg=openntpd,python-apt,python-pycurl,python-pip,supervisor,monit,git-core state=latest failed: [default] => (item=openntpd,python-apt,python-pycurl,python-pip,supervisor,monit,git-core) => {"failed": true, "item": "openntpd,python-apt,python-pycurl,python-pip,supervisor,monit,git-core"} stderr: E: Sub-process /usr/bin/dpkg returned an error code (1)

stdout: Reading package lists... Building dependency tree... Reading state information... openntpd is already the newest version. The following package was automatically installed and is no longer required: libopts25 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 66 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up openntpd (3.9p1+debian-9) ... Starting openntpd: /etc/openntpd/ntpd.conf: Permission denied invoke-rc.d: initscript openntpd, action "start" failed. dpkg: error processing openntpd (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: openntpd

msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'openntpd'' failed: E: Sub-process /usr/bin/dpkg returned an error code (1)

FATAL: all hosts have already failed -- aborting

default : ok=2 changed=0 unreachable=0 failed=1

fernandeze avatar Oct 13 '15 14:10 fernandeze

th problem is that the openntpd package in being installed. When you already have the nap package, it conflicts.

You need to remove the ntp package before and make sure its config files are purged

jcoetsie avatar Jan 20 '16 11:01 jcoetsie