Bug 1130429 - katello-installer fails with "Could not set 'present' on ensure: 422 Unprocessable Entity"
Summary: katello-installer fails with "Could not set 'present' on ensure: 422 Unproces...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer
Version: 6.0.3
Hardware: x86_64
OS: Linux
medium
high vote
Target Milestone: Unspecified
Assignee: Dominic Cleal
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker
TreeView+ depends on / blocked
 
Reported: 2014-08-15 08:21 UTC by Pavel Moravec
Modified: 2014-08-22 11:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-22 11:20:29 UTC


Attachments (Terms of Use)

Description Pavel Moravec 2014-08-15 08:21:17 UTC
Description of problem:
katello-installer fails under unknown but reproducible circumstances with error:

 Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/katello-installer/modules/foreman_proxy/manifests/register.pp
 Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/katello-installer/modules/foreman_proxy/manifests/register.pp
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[pmoravec-sat6.gsslab.fab.redhat.com]/ensure: change from absent to present failed: Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/katello-installer/modules/foreman_proxy/manifests/register.pp


Version-Release number of selected component (if applicable):
Sat 6.0.3


How reproducible:
100% on my VM


Steps to Reproduce:
1. ssh 10.33.20.50 (root / redhat)
2. katello-installer --reset


Actual results:
See above error; /var/log/katello-installer/katello-installer.log has:

[ WARN 2014-08-15 03:05:21 main]  /Stage[main]/Certs::Foreman/Exec[foreman_certs_config]/returns: executed successfully
[ INFO 2014-08-15 03:05:21 main]  RESOURCE Exec[foreman_certs_config]
[DEBUG 2014-08-15 03:05:21 main]  /Stage[main]/Certs::Foreman/Exec[foreman_certs_config]: The container Class[Certs::Foreman] will propagate my refresh event
[DEBUG 2014-08-15 03:05:21 main]  Class[Certs::Foreman]: The container Stage[main] will propagate my refresh event
[ INFO 2014-08-15 03:06:27 main] E, [2014-08-15T03:06:27.218370 #20852] ERROR -- : 422 Unprocessable Entity
[ INFO 2014-08-15 03:06:27 main] {
[ INFO 2014-08-15 03:06:27 main]     "error"^[[0;37m => ^[[0m{
[ INFO 2014-08-15 03:06:27 main]                "errors"^[[0;37m => ^[[0m{
[ INFO 2014-08-15 03:06:27 main]             "base"^[[0;37m => ^[[0m[
[ INFO 2014-08-15 03:06:27 main]                 ^[[1;37m[0] ^[[0m^[[0;33m"Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([Errno::ECONNREFUSED]: Connection refused - connect(2)) for proxy https://pmoravec-sat6.gsslab.fab.redhat.com:9090/features"^[[0m,
[ INFO 2014-08-15 03:06:27 main]                 ^[[1;37m[1] ^[[0m^[[0;33m"Please check the proxy is configured and running on the host."^[[0m
[ INFO 2014-08-15 03:06:27 main]             ]
[ INFO 2014-08-15 03:06:27 main]         },


Expected results:
katello-installer succeeds


Additional info:
feel free to check the VM with reproducer, it's free to use

Comment 1 Pavel Moravec 2014-08-15 08:29:52 UTC
Some BZ troubleshooting:

- bz1121697 mentioning the same error: resolution (adding symlink) does not help
- Tomcat runs well, foreman-proxy logs are basically empty

Comment 3 Dominic Cleal 2014-08-21 13:31:00 UTC
I cannot reproduce the issue on the VM you mentioned:

[root@pmoravec-sat6 ~]# service foreman-proxy status
foreman-proxy (pid  6291) is running...
[root@pmoravec-sat6 ~]# ps auxww | grep proxy
492       6291  0.1  0.4 161444 53020 ?        SNl  Aug16   9:44 /usr/bin/ruby /usr/share/foreman-proxy/bin/smart-proxy
[root@pmoravec-sat6 ~]# telnet pmoravec-sat6.gsslab.fab.redhat.com 9090
-bash: telnet: command not found
[root@pmoravec-sat6 ~]# katello-installer --reset
Installing             Done                                               [100%] [......................................]
  Success!
  * Katello is running at https://pmoravec-sat6.gsslab.fab.redhat.com
      Initial credentials are admin / redacted
  * Capsule is running at https://pmoravec-sat6.gsslab.fab.redhat.com:9090
  * To install additional capsule on separate machine continue by running:"

      capsule-certs-generate --capsule-fqdn "$CAPSULE" --certs-tar "~/$CAPSULE-certs.tar"

  The full log is at /var/log/katello-installer/katello-installer.log
[root@pmoravec-sat6 ~]# service foreman-proxy status
foreman-proxy (pid  6291) is running...

The error in the description indicates the foreman-proxy process simply isn't running, or perhaps the name resolves to another host, though the host appears to be running the foreman-proxy perfectly fine right now.

"([Errno::ECONNREFUSED]: Connection refused - connect(2)) for proxy https://pmoravec-sat6.gsslab.fab.redhat.com:9090/features"^[[0m,"

Comment 4 Pavel Moravec 2014-08-22 11:20:29 UTC
(In reply to Dominic Cleal from comment #3)
> I cannot reproduce the issue on the VM you mentioned:
> 
> [root@pmoravec-sat6 ~]# service foreman-proxy status
> foreman-proxy (pid  6291) is running...
> [root@pmoravec-sat6 ~]# ps auxww | grep proxy
> 492       6291  0.1  0.4 161444 53020 ?        SNl  Aug16   9:44
> /usr/bin/ruby /usr/share/foreman-proxy/bin/smart-proxy
> [root@pmoravec-sat6 ~]# telnet pmoravec-sat6.gsslab.fab.redhat.com 9090
> -bash: telnet: command not found
> [root@pmoravec-sat6 ~]# katello-installer --reset
> Installing             Done                                              
> [100%] [......................................]
>   Success!
>   * Katello is running at https://pmoravec-sat6.gsslab.fab.redhat.com
>       Initial credentials are admin / redacted
>   * Capsule is running at https://pmoravec-sat6.gsslab.fab.redhat.com:9090
>   * To install additional capsule on separate machine continue by running:"
> 
>       capsule-certs-generate --capsule-fqdn "$CAPSULE" --certs-tar
> "~/$CAPSULE-certs.tar"
> 
>   The full log is at /var/log/katello-installer/katello-installer.log
> [root@pmoravec-sat6 ~]# service foreman-proxy status
> foreman-proxy (pid  6291) is running...
> 
> The error in the description indicates the foreman-proxy process simply
> isn't running, or perhaps the name resolves to another host, though the host
> appears to be running the foreman-proxy perfectly fine right now.
> 
> "([Errno::ECONNREFUSED]: Connection refused - connect(2)) for proxy
> https://pmoravec-sat6.gsslab.fab.redhat.com:9090/features"^[[0m,"

It seems I had to change /etc/hosts meantime due to some other activity. Most probably the file was wrong or hostname was improperly resolved.

Closing it as worksforme (clean re-installation tested just now).


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