#6261 Replace ERROR: cannot connect to 'http://localhost:8888/ipa/json': [Errno 111] Connection refused with 'IPA is not configured on this system'
Closed: fixed Opened by mbasti.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1368345

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:

If pushed, then it can be moved to 4.4.1

Metadata Update from @mbasti:
- Issue assigned to akasurde
- Issue set to the milestone: FreeIPA 4.5 backlog

Metadata Update from @fbarreto:
- Issue assigned to fbarreto (was: akasurde)

PR: https://github.com/freeipa/freeipa/pull/939

Metadata Update from @fbarreto:
- Issue close_status updated to: None

Metadata Update from @fbarreto:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/939 (was: https://github.com/freeipa/freeipa/pull/25)

master:

  • cac3475a0454b730d6e5b2093c2e63d395acd387 Changing how commands handles error when it can't connect to IPA server

Metadata Update from @pvoborni:
- Issue set to the milestone: FreeIPA 4.5.4 (was: FreeIPA 4.5 backlog)

ipa-4-5:

  • 73b381e21183dc2058c9a6ac4620928230a2dce8 Changing how commands handles error when it can't connect to IPA server

Metadata Update from @pvomacka:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

master:

  • a5a619abc19af23cfb25d5ce35deb4338cee7822 ipa commands: print 'IPA is not configured' when ipa is not setup
  • 10c6258929510cb99aa162c95a57b26184a0faca Test: test ipa-* commands when IPA is not configured

The ticket is flagged for 4.5 but the backport failed:

Failed to apply patches onto origin/ipa-4-5. Manual backport is needed.

ipa-4-7:

  • 9f2d8f5b587dd6e63f464dcf696bb3b5f3af2c56 ipa commands: print 'IPA is not configured' when ipa is not setup
  • 8cf6b6ea095e4270b0a7c3fa56b8018e05e9045b Test: test ipa-* commands when IPA is not configured

ipa-4-6:

  • af2ee7ae345037a30164043bddb247b2bbeb60b6 ipa commands: print 'IPA is not configured' when ipa is not setup
  • 95af5dc29ff775296d34cc5dc9260105457e0c80 Test: test ipa-* commands when IPA is not configured
  • 9182917280a5c2590fa677729db54b38a9ac4d1f Disable message about log in ipa-backup if IPA is not configured

ipa-4-5:

  • 2098c9fbb16df0aed2d4a614838af79fec3d7130 ipa commands: print 'IPA is not configured' when ipa is not setup
  • a84f17a116bc183f8f2ac6353f6348e511c62471 Test: test ipa-* commands when IPA is not configured
Metadata