Docker Community Forums

Share and learn in the Docker community.

Free ipa installation in docker


(Rangacr92) #1

Dear team,

i trying to install freeipa inside the docker container thats running ubuntu image under docker service

i do get following errors while trying ipa-server-install

root@ipa:/# cat /var/log/ipaserver-install.log
2017-12-30T09:40:22Z DEBUG Logging to /var/log/ipaserver-install.log
2017-12-30T09:40:22Z DEBUG ipa-server-install was invoked with arguments [] and options: {‘no_dns_sshfp’: None, ‘ignore_topology_disconnect’: None, ‘verbose’: False, ‘ip_addresses’: None, ‘domainlevel’: None, ‘mkhomedir’: None, ‘no_pkinit’: None, ‘http_cert_files’: None, ‘no_ntp’: None, ‘subject’: None, ‘no_forwarders’: None, ‘external_ca_type’: None, ‘ssh_trust_dns’: None, ‘domain_name’: None, ‘idmax’: None, ‘http_cert_name’: None, ‘dirsrv_cert_files’: None, ‘no_dnssec_validation’: None, ‘ca_signing_algorithm’: None, ‘no_reverse’: None, ‘pkinit_cert_files’: None, ‘unattended’: False, ‘auto_reverse’: None, ‘auto_forwarders’: None, ‘no_host_dns’: None, ‘no_sshd’: None, ‘no_ui_redirect’: None, ‘dirsrv_config_file’: None, ‘realm_name’: None, ‘forwarders’: None, ‘idstart’: None, ‘external_ca’: None, ‘pkinit_cert_name’: None, ‘no_ssh’: None, ‘external_cert_files’: None, ‘no_hbac_allow’: None, ‘dirsrv_cert_name’: None, ‘ca_cert_files’: None, ‘zonemgr’: None, ‘quiet’: False, ‘setup_dns’: None, ‘host_name’: None, ‘log_file’: None, ‘reverse_zones’: None, ‘allow_zone_overlap’: None, ‘uninstall’: False}
2017-12-30T09:40:22Z DEBUG IPA version 4.3.1
2017-12-30T09:40:22Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:22Z DEBUG Loading Index file from '/var/lib/ipa/sysrestore/sysrestore.index’
2017-12-30T09:40:22Z DEBUG httpd is not configured
2017-12-30T09:40:22Z DEBUG kadmin is not configured
2017-12-30T09:40:22Z DEBUG dirsrv is not configured
2017-12-30T09:40:22Z DEBUG pki-tomcatd is not configured
2017-12-30T09:40:22Z DEBUG install is not configured
2017-12-30T09:40:22Z DEBUG krb5kdc is not configured
2017-12-30T09:40:22Z DEBUG ntpd is not configured
2017-12-30T09:40:22Z DEBUG named is not configured
2017-12-30T09:40:22Z DEBUG ipa_memcached is not configured
2017-12-30T09:40:22Z DEBUG filestore is tracking no files
2017-12-30T09:40:22Z DEBUG Loading Index file from '/var/lib/ipa-client/sysrestore/sysrestore.index’
2017-12-30T09:40:22Z DEBUG Loading Index file from '/var/lib/ipa/sysrestore/sysrestore.index’
2017-12-30T09:40:22Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:22Z DEBUG Starting external process
2017-12-30T09:40:22Z DEBUG args=/bin/systemctl is-enabled chronyd.service
2017-12-30T09:40:22Z DEBUG Process finished, return code=0
2017-12-30T09:40:22Z DEBUG stdout=
2017-12-30T09:40:22Z DEBUG stderr=Failed to get unit file state for chronyd.service: No such file or directory

2017-12-30T09:40:22Z DEBUG Starting external process
2017-12-30T09:40:22Z DEBUG args=/usr/sbin/apache2ctl -t -D DUMP_VHOSTS
2017-12-30T09:40:22Z DEBUG Process finished, return code=0
2017-12-30T09:40:22Z DEBUG stdout=VirtualHost configuration:
*:80 ipa.gworks.mobi (/etc/apache2/sites-enabled/000-default.conf:1)

2017-12-30T09:40:22Z DEBUG stderr=
2017-12-30T09:40:25Z DEBUG Check if ipa.gworks.mobi is a primary hostname for localhost
2017-12-30T09:40:25Z DEBUG Primary hostname for localhost: ipa.gworks.mobi
2017-12-30T09:40:25Z DEBUG Search DNS for ipa.gworks.mobi
2017-12-30T09:40:25Z DEBUG Check if ipa.gworks.mobi is not a CNAME
2017-12-30T09:40:26Z DEBUG Check reverse address of 172.17.0.2
2017-12-30T09:40:26Z DEBUG Found reverse name: ipa.gworks.mobi
2017-12-30T09:40:26Z DEBUG will use host_name: ipa.gworks.mobi

2017-12-30T09:40:27Z DEBUG read domain_name: gworks.mobi

2017-12-30T09:40:29Z DEBUG read realm_name: GWORKS.MOBI

2017-12-30T09:40:44Z DEBUG importing all plugin modules in ipalib.plugins…
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.aci
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.automember
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.automount
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.baseldap
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.baseuser
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.batch
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.caacl
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.cert
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.certprofile
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.config
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.delegation
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.dns
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.domainlevel
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.group
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.hbacrule
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.hbacsvc
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.hbacsvcgroup
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.hbactest
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.host
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.hostgroup
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.idrange
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.idviews
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.internal
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.krbtpolicy
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.migration
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.misc
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.netgroup
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.otpconfig
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.otptoken
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.otptoken_yubikey
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.passwd
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.permission
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.ping
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.pkinit
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.privilege
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.pwpolicy
2017-12-30T09:40:44Z DEBUG Starting external process
2017-12-30T09:40:44Z DEBUG args=klist -V
2017-12-30T09:40:44Z DEBUG Process finished, return code=0
2017-12-30T09:40:44Z DEBUG stdout=Kerberos 5 version 1.13.2

2017-12-30T09:40:44Z DEBUG stderr=
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.radiusproxy
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.realmdomains
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.role
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.rpcclient
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.selfservice
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.selinuxusermap
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.server
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.service
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.servicedelegation
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.session
2017-12-30T09:40:44Z WARNING session memcached servers not running
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.stageuser
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.sudocmd
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.sudocmdgroup
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.sudorule
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.topology
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.trust
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.user
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.vault
2017-12-30T09:40:44Z DEBUG importing plugin module ipalib.plugins.virtual
2017-12-30T09:40:44Z DEBUG importing all plugin modules in ipaserver.plugins…
2017-12-30T09:40:44Z DEBUG importing plugin module ipaserver.plugins.dogtag
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.plugins.join
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.plugins.ldap2
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.plugins.rabase
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.plugins.xmlserver
2017-12-30T09:40:45Z DEBUG importing all plugin modules in ipaserver.install.plugins…
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.adtrust
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.ca_renewal_master
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.dns
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.fix_replica_agreements
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.rename_managed
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.update_ca_topology
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.update_idranges
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.update_managed_permissions
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.update_nis
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.update_pacs
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.update_passsync
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.update_referint
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.update_services
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.update_uniqueness
2017-12-30T09:40:45Z DEBUG importing plugin module ipaserver.install.plugins.upload_cacrt
2017-12-30T09:40:45Z DEBUG SessionAuthManager.register: name=jsonserver_session_139721111963472
2017-12-30T09:40:45Z DEBUG SessionAuthManager.register: name=xmlserver_session_139721111965200
2017-12-30T09:40:45Z DEBUG Mounting ipaserver.rpcserver.xmlserver() at '/xml’
2017-12-30T09:40:45Z DEBUG session_auth_duration: 0:20:00
2017-12-30T09:40:45Z DEBUG Mounting ipaserver.rpcserver.jsonserver_kerb() at '/json’
2017-12-30T09:40:45Z DEBUG session_auth_duration: 0:20:00
2017-12-30T09:40:45Z DEBUG Mounting ipaserver.rpcserver.login_kerberos() at '/session/login_kerberos’
2017-12-30T09:40:45Z DEBUG session_auth_duration: 0:20:00
2017-12-30T09:40:45Z DEBUG Mounting ipaserver.rpcserver.sync_token() at '/session/sync_token’
2017-12-30T09:40:45Z DEBUG Mounting ipaserver.rpcserver.xmlserver_session() at '/session/xml’
2017-12-30T09:40:45Z DEBUG session_auth_duration: 0:20:00
2017-12-30T09:40:45Z DEBUG session_auth_duration: 0:20:00
2017-12-30T09:40:45Z DEBUG Mounting ipaserver.rpcserver.jsonserver_session() at '/session/json’
2017-12-30T09:40:45Z DEBUG session_auth_duration: 0:20:00
2017-12-30T09:40:45Z DEBUG Mounting ipaserver.rpcserver.login_password() at '/session/login_password’
2017-12-30T09:40:45Z DEBUG session_auth_duration: 0:20:00
2017-12-30T09:40:45Z DEBUG Mounting ipaserver.rpcserver.change_password() at '/session/change_password’
2017-12-30T09:40:45Z DEBUG Starting external process
2017-12-30T09:40:45Z DEBUG args=/sbin/ip -family inet -oneline address show
2017-12-30T09:40:45Z DEBUG Process finished, return code=0
2017-12-30T09:40:45Z DEBUG stdout=1: lo inet 127.0.0.1/8 scope host lo\ valid_lft forever preferred_lft forever
29: eth0 inet 172.17.0.2/16 scope global eth0\ valid_lft forever preferred_lft forever

2017-12-30T09:40:45Z DEBUG stderr=
2017-12-30T09:40:48Z DEBUG group dirsrv exists
2017-12-30T09:40:48Z DEBUG user dirsrv exists
2017-12-30T09:40:48Z DEBUG Starting external process
2017-12-30T09:40:48Z DEBUG args=/bin/systemctl is-enabled chronyd.service
2017-12-30T09:40:48Z DEBUG Process finished, return code=0
2017-12-30T09:40:48Z DEBUG stdout=
2017-12-30T09:40:48Z DEBUG stderr=Failed to get unit file state for chronyd.service: No such file or directory

2017-12-30T09:40:48Z DEBUG Starting external process
2017-12-30T09:40:48Z DEBUG args=/bin/systemctl is-active chronyd.service
2017-12-30T09:40:48Z DEBUG Process finished, return code=1
2017-12-30T09:40:48Z DEBUG stdout=
2017-12-30T09:40:48Z DEBUG stderr=Failed to connect to bus: No such file or directory

2017-12-30T09:40:48Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Starting external process
2017-12-30T09:40:48Z DEBUG args=/bin/systemctl disable chronyd.service
2017-12-30T09:40:48Z DEBUG Process finished, return code=1
2017-12-30T09:40:48Z DEBUG stdout=
2017-12-30T09:40:48Z DEBUG stderr=Operation failed: No such file or directory

2017-12-30T09:40:48Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Configuring NTP daemon (ntpd)
2017-12-30T09:40:48Z DEBUG [1/4]: stopping ntpd
2017-12-30T09:40:48Z DEBUG Starting external process
2017-12-30T09:40:48Z DEBUG args=/usr/sbin/service ntp status
2017-12-30T09:40:48Z DEBUG Process finished, return code=3
2017-12-30T09:40:48Z DEBUG stdout= * NTP server is not running

2017-12-30T09:40:48Z DEBUG stderr=
2017-12-30T09:40:48Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Starting external process
2017-12-30T09:40:48Z DEBUG args=/usr/sbin/service ntp stop
2017-12-30T09:40:48Z DEBUG Process finished, return code=0
2017-12-30T09:40:48Z DEBUG stdout= * Stopping NTP server ntpd
…done.

2017-12-30T09:40:48Z DEBUG stderr=
2017-12-30T09:40:48Z DEBUG duration: 0 seconds
2017-12-30T09:40:48Z DEBUG [2/4]: writing configuration
2017-12-30T09:40:48Z DEBUG Backing up system configuration file '/etc/ntp.conf’
2017-12-30T09:40:48Z DEBUG Saving Index File to '/var/lib/ipa/sysrestore/sysrestore.index’
2017-12-30T09:40:48Z DEBUG Backing up system configuration file '/etc/default/ntp’
2017-12-30T09:40:48Z DEBUG Saving Index File to '/var/lib/ipa/sysrestore/sysrestore.index’
2017-12-30T09:40:48Z DEBUG duration: 0 seconds
2017-12-30T09:40:48Z DEBUG [3/4]: configuring ntpd to start on boot
2017-12-30T09:40:48Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG duration: 0 seconds
2017-12-30T09:40:48Z DEBUG [4/4]: starting ntpd
2017-12-30T09:40:48Z DEBUG Starting external process
2017-12-30T09:40:48Z DEBUG args=/usr/sbin/service ntp start
2017-12-30T09:40:48Z DEBUG Process finished, return code=0
2017-12-30T09:40:48Z DEBUG stdout= * Starting NTP server ntpd
…done.

2017-12-30T09:40:48Z DEBUG stderr=
2017-12-30T09:40:48Z DEBUG Starting external process
2017-12-30T09:40:48Z DEBUG args=/usr/sbin/service ntp status
2017-12-30T09:40:48Z DEBUG Process finished, return code=0
2017-12-30T09:40:48Z DEBUG stdout= * NTP server is running

2017-12-30T09:40:48Z DEBUG stderr=
2017-12-30T09:40:48Z DEBUG duration: 0 seconds
2017-12-30T09:40:48Z DEBUG Done configuring NTP daemon (ntpd).
2017-12-30T09:40:48Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Configuring directory server (dirsrv). Estimated time: 1 minute
2017-12-30T09:40:48Z DEBUG [1/46]: creating directory server user
2017-12-30T09:40:48Z DEBUG group dirsrv exists
2017-12-30T09:40:48Z DEBUG user dirsrv exists
2017-12-30T09:40:48Z DEBUG duration: 0 seconds
2017-12-30T09:40:48Z DEBUG [2/46]: creating directory server instance
2017-12-30T09:40:48Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state’
2017-12-30T09:40:48Z DEBUG Backing up system configuration file '/etc/default/dirsrv’
2017-12-30T09:40:48Z DEBUG Saving Index File to '/var/lib/ipa/sysrestore/sysrestore.index’
2017-12-30T09:40:48Z DEBUG
dn: dc=gworks,dc=mobi
objectClass: top
objectClass: domain
objectClass: pilotObject
dc: gworks
info: IPA V2.0

2017-12-30T09:40:48Z DEBUG writing inf template
2017-12-30T09:40:48Z DEBUG
[General]
FullMachineName= ipa.gworks.mobi
SuiteSpotUserID= dirsrv
SuiteSpotGroup= dirsrv
ServerRoot= /usr/lib/dirsrv
[slapd]
ServerPort= 389
ServerIdentifier= GWORKS-MOBI
Suffix= dc=gworks,dc=mobi
RootDN= cn=Directory Manager
InstallLdifFile= /var/lib/dirsrv/boot.ldif
inst_dir= /var/lib/dirsrv/scripts-GWORKS-MOBI

2017-12-30T09:40:48Z DEBUG calling setup-ds.pl
2017-12-30T09:40:48Z DEBUG Starting external process
2017-12-30T09:40:48Z DEBUG args=/usr/sbin/setup-ds --silent --logfile - -f /tmp/tmpPYPqbg
2017-12-30T09:40:50Z DEBUG Process finished, return code=1
2017-12-30T09:40:50Z DEBUG stdout=[17/12/30:09:40:50] - [Setup] Info Error: command ‘/bin/systemctl --system daemon-reload’ failed - output [Failed to connect to bus: No such file or directory
] error []Error: command ‘/bin/systemctl --system daemon-reload’ failed - output [Failed to connect to bus: No such file or directory
] error [][17/12/30:09:40:50] - [Setup] Fatal Error: Could not create directory server instance ‘GWORKS-MOBI’.
Error: Could not create directory server instance ‘GWORKS-MOBI’.
[17/12/30:09:40:50] - [Setup] Fatal Exiting . . .
Log file is ‘-’

Exiting . . .
Log file is ‘-’

2017-12-30T09:40:50Z DEBUG stderr=
2017-12-30T09:40:50Z DEBUG Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/ipaserver/install/service.py”, line 447, in start_creation
run_step(full_msg, method)
File “/usr/lib/python2.7/dist-packages/ipaserver/install/service.py”, line 437, in run_step
method()
File “/usr/lib/python2.7/dist-packages/ipaserver/install/dsinstance.py”, line 547, in __create_instance
raise RuntimeError(“failed to create ds instance %s” % e)
RuntimeError: failed to create ds instance Command ‘/usr/sbin/setup-ds --silent --logfile - -f /tmp/tmpPYPqbg’ returned non-zero exit status 1

2017-12-30T09:40:50Z DEBUG [error] RuntimeError: failed to create ds instance Command ‘/usr/sbin/setup-ds --silent --logfile - -f /tmp/tmpPYPqbg’ returned non-zero exit status 1
2017-12-30T09:40:50Z DEBUG File “/usr/lib/python2.7/dist-packages/ipapython/admintool.py”, line 171, in execute
return_value = self.run()
File “/usr/lib/python2.7/dist-packages/ipapython/install/cli.py”, line 318, in run
cfgr.run()
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 310, in run
self.execute()
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 332, in execute
for nothing in self._executor():
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 372, in __runner
self._handle_exception(exc_info)
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 394, in _handle_exception
six.reraise(*exc_info)
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 362, in __runner
step()
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 359, in
step = lambda: next(self.__gen)
File “/usr/lib/python2.7/dist-packages/ipapython/install/util.py”, line 81, in run_generator_with_yield_from
six.reraise(*exc_info)
File “/usr/lib/python2.7/dist-packages/ipapython/install/util.py”, line 59, in run_generator_with_yield_from
value = gen.send(prev_value)
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 586, in _configure
next(executor)
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 372, in __runner
self._handle_exception(exc_info)
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 449, in _handle_exception
self.__parent._handle_exception(exc_info)
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 394, in _handle_exception
six.reraise(*exc_info)
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 446, in _handle_exception
super(ComponentBase, self)._handle_exception(exc_info)
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 394, in _handle_exception
six.reraise(*exc_info)
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 362, in __runner
step()
File “/usr/lib/python2.7/dist-packages/ipapython/install/core.py”, line 359, in
step = lambda: next(self.__gen)
File “/usr/lib/python2.7/dist-packages/ipapython/install/util.py”, line 81, in run_generator_with_yield_from
six.reraise(*exc_info)
File “/usr/lib/python2.7/dist-packages/ipapython/install/util.py”, line 59, in run_generator_with_yield_from
value = gen.send(prev_value)
File “/usr/lib/python2.7/dist-packages/ipapython/install/common.py”, line 63, in _install
for nothing in self._installer(self.parent):
File “/usr/lib/python2.7/dist-packages/ipaserver/install/server/install.py”, line 1513, in main
install(self)
File “/usr/lib/python2.7/dist-packages/ipaserver/install/server/install.py”, line 267, in decorated
func(installer)
File “/usr/lib/python2.7/dist-packages/ipaserver/install/server/install.py”, line 882, in install
hbac_allow=not options.no_hbac_allow)
File “/usr/lib/python2.7/dist-packages/ipaserver/install/dsinstance.py”, line 342, in create_instance
self.start_creation(runtime=60)
File “/usr/lib/python2.7/dist-packages/ipaserver/install/service.py”, line 447, in start_creation
run_step(full_msg, method)
File “/usr/lib/python2.7/dist-packages/ipaserver/install/service.py”, line 437, in run_step
method()
File “/usr/lib/python2.7/dist-packages/ipaserver/install/dsinstance.py”, line 547, in __create_instance
raise RuntimeError(“failed to create ds instance %s” % e)

2017-12-30T09:40:50Z DEBUG The ipa-server-install command failed, exception: RuntimeError: failed to create ds instance Command ‘/usr/sbin/setup-ds --silent --logfile - -f /tmp/tmpPYPqbg’ returned non-zero exit status 1
2017-12-30T09:40:50Z ERROR failed to create ds instance Command ‘/usr/sbin/setup-ds --silent --logfile - -f /tmp/tmpPYPqbg’ returned non-zero exit status 1
2017-12-30T09:40:50Z ERROR The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information
root@ipa:/#


(David Maze) #2

As a general rule, commands like systemctl or initctl or service just don’t work inside Docker. You should find another way to run the service (and since you’re hitting this from an installer, another way to install it).

Digging around freeipa.org, this doesn’t seem like a good “thing” to run in a Docker container, since it apparently contains a half-dozen services and general Docker practice is to run only one service in a container. Worse, basically all of the components have long-running state and keep security-sensitive data (the Kerberos protocol requires the server knowing every user’s and service’s password in recoverable form as a big example) so you would need to do a lot of state management and keep a lot of data “outside” Docker to make it work.

Nevertheless, it does look like there’s a prebuilt Docker image. Architecturally, the Vagrant-based VM would be a better starting point; but even in today’s cloud-everything land, I’d install this on a dedicated system, even a dedicated physical host if that was a legitimate choice.

Like, you started a container, got a shell, started running install commands, and are going to lose all your work when the container exits and gets deleted?

The Docker documentation has a pretty good tutorial on the standard image-based workflow. You write down the steps to install the software in a compact Dockerfile, and then run docker build to build the image. That’s fully reproducible (even if containers and images get deleted you can rebuild the same image by re-running docker build), and during development it pretty readily lets you tweak and retry things.

It sounds like you’re more or less up to the very first steps here which you’d write in a Dockerfile like

FROM centos:7 
RUN yum install freeipa-server
RUN ipa-server-install

and then could repeatedly adjust and docker build until it worked.