#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 6 years ago Opened 7 years ago 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

7 years ago

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

6 years ago

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

6 years ago

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)

6 years ago

master:

  • cac3475 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)

6 years ago

ipa-4-5:

  • 73b381e 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)

6 years ago

master:

  • a5a619a ipa commands: print 'IPA is not configured' when ipa is not setup
  • 10c6258 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:

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

ipa-4-6:

  • af2ee7a ipa commands: print 'IPA is not configured' when ipa is not setup
  • 95af5dc Test: test ipa-* commands when IPA is not configured
  • 9182917 Disable message about log in ipa-backup if IPA is not configured

ipa-4-5:

  • 2098c9f ipa commands: print 'IPA is not configured' when ipa is not setup
  • a84f17a Test: test ipa-* commands when IPA is not configured

Login to comment on this ticket.

Metadata