Hide Forgot
Description of problem: katello-configure fails with the following error: err: /Stage[main]/Candlepin::Service/Exec[wait for candlepin]/returns: change from notrun to 0 failed: /usr/bin/wget --spider --tries 10 --retry-connrefused --no-check-certificate https://localhost:8443/candlepin/ returned 4 instead of one of [0] at /usr/share/katello/install/puppet/modules/candlepin/manifests/service.pp:10 The wget return code signifies "Network error" I added '-o /tmp/wget.log' to the wget line, and ran katello-configure again. What it showed was that it was resolving localhost to '::1' and '127.0.0.1'. Since IPv6 was disabled on the kernel command line, it was throwing an error. wget will not retry on this particular error, as it sees it as an unrecoverable error. Once tomcat has actually started, the above wget call works fine. I was able to work around it in two different ways: 1. Remove the '::1' entry from /etc/hosts (Probably the best way) 2. Add '-4' to the wget command to force it to only use ipv4. Version-Release number of selected component (if applicable): katello-glue-candlepin-0.1.307-1.el6.noarch katello-qpid-broker-key-pair-1.0-1.noarch katello-cli-0.1.107-1.el6.noarch katello-common-0.1.307-1.el6.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-glue-pulp-0.1.307-1.el6.noarch katello-0.1.307-1.el6.noarch katello-qpid-client-key-pair-1.0-1.noarch katello-selinux-0.1.10-1.el6.noarch katello-all-0.1.307-1.el6.noarch katello-certs-tools-1.0.4-1.el6.noarch katello-configure-0.1.107-1.el6.noarch katello-glue-foreman-0.1.307-1.el6.noarch katello-cli-common-0.1.107-1.el6.noarch How reproducible: At will. Steps to Reproduce: 1. katello-configure on system with ipv6 disabled and '::1' entry in /etc/hosts 2. 3. Actual results: configure fails with err: /Stage[main]/Candlepin::Service/Exec[wait for candlepin]/returns: change from notrun to 0 failed: /usr/bin/wget --spider --tries 10 --retry-connrefused --no-check-certificate https://localhost:8443/candlepin/ returned 4 instead of one of [0] at /usr/share/katello/install/puppet/modules/candlepin/manifests/service.pp:10 Expected results: Configure succeeds
How to disable ipv6: <bcrochet> one sec <bcrochet> ipv6.disable=1 <bcrochet> to the kernel cl <bcrochet> [root@qe-blade-02 ~]# cat /proc/cmdline <bcrochet> ro root=UUID=50de6ac6-581e-43d0-aadd-dd5a2ac7df14 rd_NO_LUKS intel_idle.max_cstate=2 console=ttyS1,19200n8 verbose text ipv6.disable=1 LANG=en_US.UTF-8 rd_NO_MD console=ttyS1,19200n8 KEYTABLE=us SYSFONT=latarcyrheb-sun16 crashkernel=129M@0M rd_NO_LVM rd_NO_DM <bcrochet> I *think* there is an alias as well... noipv6 <bcrochet> But that may only work with anaconda <bcrochet> what ipv6.disable does is still loads the ipv6 module (there are other dependencies), but disables the code within the module.
Had to scratch an RHCE itch -- and strangely (or interestingly -- I was not able to reproduce this using the preferred method of disabling ipv6 (At least insofar as doing so after having already booted): # sysctl -w net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.all.disable_ipv6 = 1 The above command should disable ipv6 for the existing session. I did this and subsequently installed a katello instance with no issues. The method for making this persistent after a reboot is adding (or editing) the following line in /etc/sysctl.conf net.ipv6.conf.all.disable_ipv6 = 1 Note that I have not yet tried the latter method. That said, other than one command being a one-off and the other being persistent, they should be functionally identical as far as the kernel goes.
Was this entry in /etc/hosts present on your system? ::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost Once I removed this line, it worked.
I have the following: [root@se-blade ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 Your line referenced above looks suspect: ::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost I'm not sure why it reads localhost.localdomain twice - and why "localhost" is at the end. I think that makes a difference, strange as it may seem.
That line was from a Fedora machine. My apologies. My RHEL 6.2 system that failed was identical to yours.
Here's the breakdown: When ipv6 is disabled on the kernel command line via: ipv6.disable=1 it makes the entire ipv6 stack non-functional. Thus, when wget runs, and the ::1 entry is in /etc/hosts as an alias localhost, it will fail with a return code of 4, without every retrying. When ipv6 is disabled on the kernel command line via: ipv6.disable_ipv6=1 it leaves the ipv6 stack in place, but will not assign an address to the interfaces. What will then happen, is that wget will just complain that the network is unreachable, but will not fail until the retries have actually occurred. This second behavior also occurs when one uses sysctl to disable ipv6, as Corey states in comment #2. This probably just needs to be addressed in doco. If ipv6.disable is the desired approach (some may have a different need to use that), then no ipv6 entry in /etc/hosts for localhost can be there, or else, it will fail. The software should work fine with all other ipv6 disablement configs.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: If you must use disable.ipv6=1 via the kernel command line, then you can't have ::1 point to localhost in /etc/hosts
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,2 +1,5 @@ -If you must use disable.ipv6=1 via the kernel command line, then you can't +Katello's configuration script (katello-configure) requires access to the localhost. If the kernel has disabled IPv6 via the kernel command line (disable.ipv6=1), katello-configure fails due to the following line in etc/hosts: -have ::1 point to localhost in /etc/hosts+ +::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 + +Kernels with IPv6 disabled cannot have ::1 pointing to localhost in /etc/hosts. Removing this line in /etc/hosts resolves the issue and the katello-configure script successfully runs.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -2,4 +2,4 @@ ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 -Kernels with IPv6 disabled cannot have ::1 pointing to localhost in /etc/hosts. Removing this line in /etc/hosts resolves the issue and the katello-configure script successfully runs.+Kernels with IPv6 disabled cannot have ::1 pointing to localhost in /etc/hosts. Removing this line in /etc/hosts resolves the issue and the katello-configure script runs successfully.
Release note added. Link: http://documentation-stage.bne.redhat.com/docs/en-US/CloudForms/1.0/html-single/Release_Notes/index.html#sect-Release_Notes-System_Engine-System_Engine_Considerations-known_issues_06 Regards, Shikha
Going to close this since it is documented and the way it was originally disabled in the summary is not a best practice.