RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1368345 - Replace ERROR: cannot connect to 'http://localhost:8888/ipa/json': [Errno 111] Connection refused with 'IPA is not configured on this system'
Summary: Replace ERROR: cannot connect to 'http://localhost:8888/ipa/json': [Errno 111...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Michal Reznik
URL:
Whiteboard:
: 1456595 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-19 06:52 UTC by Sudhir Menon
Modified: 2018-10-30 10:56 UTC (History)
9 users (show)

Fixed In Version: ipa-4.6.4-7.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:55:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3187 0 None None None 2018-10-30 10:56:33 UTC

Description Sudhir Menon 2016-08-19 06:52:04 UTC
Description of problem: Replace ERROR: cannot connect to "http://localhost:8888/ipa/json': [Errno 111] Connection refused" with "IPA is not configured on this system"

Version-Release number of selected component (if applicable):
ipa-server-4.4.0-7.el7.x86_64

How reproducible: Always.

Steps to Reproduce:
1. Ensure all the packages related to ipa-server is installed.
2. Ensure that ipa-server is not installed.
3. Now run the below commands.

Actual results:

[root@ipaserver ~]# ipa trust-find
ipa: ERROR: cannot connect to 'http://localhost:8888/ipa/json': [Errno 111] Connection refused

[root@ipaserver ~]# ipa-advise
trying http://localhost:8888/ipa/json
Forwarding 'schema' to json server 'http://localhost:8888/ipa/json'
cannot connect to 'http://localhost:8888/ipa/json': [Errno 111] Connection refused
The ipa-advise command failed.

[root@ipaserver ~]# ipa-managed-entries status
Unexpected error
NetworkError: cannot connect to 'http://localhost:8888/ipa/json': [Errno 111] Connection refused

[root@ipaserver ~]# ipa-replica-install
Configuring client side components
WARNING: ntpd time&date synchronization service will not be configured as
conflicting service (chronyd) is enabled
Use --force-ntpd option to disable it and force configuration of ntpd
One of password / principal / keytab is required.
Installation failed. Rolling back changes.
IPA client is not configured on this system.
Removing client side components
IPA client is not configured on this system.
ipa.ipapython.install.cli.install_tool(Replica): ERROR    Configuration of client side components failed!
ipa.ipapython.install.cli.install_tool(Replica): ERROR    The ipa-replica-install command failed. See /var/log/ipareplica-install.log for more information

[root@ipaserver ~]# ipa-compat-manage
An IPA server to update cannot be found. Has one been configured yet?
The error was: IPA realm not found in DNS, in the config file (/etc/ipa/default.conf) or on the command line.

[root@ipaserver ~]# ipa-join
cannot open configuration file /etc/ipa/default.conf
Unable to determine IPA server from /etc/ipa/default.conf

Expected results: Basically all the commands, if possible should check if ipa server is installed in the first place and if not then it should display message like 'IPA is not configured on this system" rather than displaying Network error or any other message.

This is for uniformity across all commands behaviour when ipa-server is not installed.

Some of the commands which displayed proper message.

[root@ipaserver ~]# ipa-nis-manage
IPA is not configured on this system.
 
[root@ipaserver ~]# ipa-dns-install
The log file for this installation can be found in /var/log/ipaserver-install.log
IPA is not configured on this system.

[root@ipaserver ~]# ipa-adtrust-install
The log file for this installation can be found in /var/log/ipaserver-install.log
IPA is not configured on this system.

[root@ipaserver ~]# ipa-ca-install
IPA server is not configured on this system.

[root@ipaserver ~]# ipa-backup
IPA is not configured on this system.
The ipa-backup command failed. See /var/log/ipabackup.log for more information

[root@ipaserver ~]# ipa-client-automount
IPA client is not configured on this system.

[root@ipaserver ~]# ipa-dns-install
The log file for this installation can be found in /var/log/ipaserver-install.log
IPA is not configured on this system.

[root@ipaserver ~]# ipa-kra-install
IPA is not configured on this system.
The ipa-kra-install command failed. See /var/log/ipaserver-kra-install.log for more information

[root@ipaserver ~]# ipa-server-upgrade
IPA is not configured on this system.
The ipa-server-upgrade command failed. See /var/log/ipaupgrade.log for more information

[root@ipaserver ~]# ipa-winsync-migrate
IPA is not configured on this system.

Additional info:

Comment 2 Martin Bašti 2016-08-26 09:42:11 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/6261

Comment 4 Florence Blanc-Renaud 2017-08-08 14:19:09 UTC
*** Bug 1456595 has been marked as a duplicate of this bug. ***

Comment 5 Tomas Krizek 2017-08-11 11:56:49 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/cac3475a0454b730d6e5b2093c2e63d395acd387

Comment 7 Florence Blanc-Renaud 2018-02-20 08:53:59 UTC
Fixed upstream:
ipa-4-5:
    73b381e Changing how commands handles error when it can't connect to IPA server

Comment 10 Sudhir Menon 2018-08-07 10:38:02 UTC
Tested on Red Hat Enterprise Linux Server release 7.6 Beta (Maipo)  using
ipa-server-4.6.4-3.el7.x86_64
sssd-1.16.2-11.el7.x86_64
389-ds-base-1.3.8.4-9.el7.x86_64
krb5-server-1.15.1-34.el7.x86_64
pki-server-10.5.9-4.el7.noarch
selinux-policy-3.13.1-211.el7.noarch


Certain commands are still not displaying the change i.e 'IPA client is not configured on this system'.

[root@master ~]# ipa-advise
'Env' object has no attribute 'server'
The ipa-advise command failed.

[root@master ~]# ipa-server-upgrade
IPA server upgrade failed: Inspect /var/log/ipaupgrade.log and run command ipa-server-upgrade manually.
Unexpected error - see /var/log/ipaupgrade.log for details:
AttributeError: 'Env' object has no attribute 'basedn'
The ipa-server-upgrade command failed. See /var/log/ipaupgrade.log for more information

[root@master ~]# ipa-join
cannot open configuration file /etc/ipa/default.conf
Unable to determine IPA server from /etc/ipa/default.conf

[root@master ~]# ipa-compat-manage status
Directory Manager password: 
Unexpected error
AttributeError: 'Env' object has no attribute 'basedn'

[root@master ~]# ipa-compat-manage enable
Directory Manager password: 
Unexpected error
AttributeError: 'Env' object has no attribute 'basedn'

[root@master ~]# ipa-compat-manage disable
Directory Manager password: 
Unexpected error
AttributeError: 'Env' object has no attribute 'basedn'

[root@master ~]# ipa-replica-install
WARNING: conflicting time&date synchronization service 'chronyd' will
be disabled in favor of ntpd
Configuring client side components
One of password / principal / keytab is required.
The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information
Removing client side components
IPA client is not configured on this system.
The ipa-client-install command failed. See /var/log/ipaclient-uninstall.log for more information
Your system may be partly configured.
Run /usr/sbin/ipa-server-install --uninstall to clean up.
ipapython.admintool: ERROR    Configuration of client side components failed!
ipapython.admintool: ERROR    The ipa-replica-install command failed. See /var/log/ipareplica-install.log for more information

Comment 15 Florence Blanc-Renaud 2018-08-24 09:18:02 UTC
Automation: ipatests/test_cmdline/test_cli.py::test_command_ipa_not_installed

Comment 18 Michal Reznik 2018-09-05 13:54:29 UTC
Reproducible on 

[root@master ~]# rpm -q ipa-server ipa-client ipa-server-trust-ad
ipa-server-4.5.4-10.el7_5.1.x86_64
ipa-client-4.5.4-10.el7_5.1.x86_64
ipa-server-trust-ad-4.5.4-10.el7_5.1.x86_64

[root@master ~]# ipa-run-tests -vvv test_cmdline/test_cli.py -rxXs
...
...
test_cmdline/test_cli.py::test_command_ipa_not_installed[args0-1-IPA client is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args1-1-IPA client is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args2-1-IPA client is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args3-1-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args4-1-IPA is not configured on this system] FAILED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args5-1-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args6-1-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args7-1-IPA server is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args8-1-IPA is not configured on this system] FAILED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args9-1-IPA is not configured on this system] FAILED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args10-4-IPA is not configured] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args11-1-IPA is not configured on this system] FAILED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args12-1-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args13-1-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args14-1-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args15-1-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args16-1-IPA is not configured on this system] FAILED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args17-1-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args18-1-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args19-1-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args20-1-IPA is not configured on this system] PASSED

Verified on:

[root@master ~]# rpm -q ipa-server ipa-client ipa-server-trust-ad
ipa-server-4.6.4-7.el7.x86_64
ipa-client-4.6.4-7.el7.x86_64
ipa-server-trust-ad-4.6.4-7.el7.x86_64

[root@master ~]# ipa-run-tests -vvv test_cmdline/test_cli.py -rxXs
...
...
test_cmdline/test_cli.py::test_command_ipa_not_installed[args0-1-None-IPA client is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args1-1-None-IPA client is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args2-1-None-IPA client is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args3-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args4-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args5-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args6-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args7-1-None-IPA server is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args8-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args9-1-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args10-4-None-IPA is not configured] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args11-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args12-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args13-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args14-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args15-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args16-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args17-1-IPA is not configured on this system-None] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args18-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args19-2-None-IPA is not configured on this system] PASSED
test_cmdline/test_cli.py::test_command_ipa_not_installed[args20-1-None-IPA is not configured on this system] PASSED

Comment 20 errata-xmlrpc 2018-10-30 10:55:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3187


Note You need to log in before you can comment on or make changes to this bug.