Ansible Tower Installation failed in RHEL 7.4 with error pkg_resources.DistributionNotFound: awx==3.

Hi all

The installation fails in the step “Migrate the Tower database schema” after run file setup.sh in ansible-tower-setup-3.2.2

`
TASK [awx_install : Stop supervisor] *******************************************************************************************************************************************************
ok: [localhost] => {“changed”: false, “name”: “supervisord”, “state”: “stopped”, “status”: {“ActiveEnterTimestampMonotonic”: “0”, “ActiveExitTimestampMonotonic”: “0”, “ActiveState”: “inactive”, “After”: “systemd-journald.socket system.slice basic.target rc-local.service nss-user-lookup.target”, “AllowIsolate”: “no”, “AmbientCapabilities”: “0”, “AssertResult”: “no”, “AssertTimestampMonotonic”: “0”, “Before”: “shutdown.target”, “BlockIOAccounting”: “no”, “BlockIOWeight”: “18446744073709551615”, “CPUAccounting”: “no”, “CPUQuotaPerSecUSec”: “infinity”, “CPUSchedulingPolicy”: “0”, “CPUSchedulingPriority”: “0”, “CPUSchedulingResetOnFork”: “no”, “CPUShares”: “18446744073709551615”, “CanIsolate”: “no”, “CanReload”: “no”, “CanStart”: “yes”, “CanStop”: “yes”, “CapabilityBoundingSet”: “18446744073709551615”, “ConditionResult”: “no”, “ConditionTimestampMonotonic”: “0”, “Conflicts”: “shutdown.target”, “ControlPID”: “0”, “DefaultDependencies”: “yes”, “Delegate”: “no”, “Description”: “Process Monitoring and Control Daemon”, “DevicePolicy”: “auto”, “ExecMainCode”: “0”, “ExecMainExitTimestampMonotonic”: “0”, “ExecMainPID”: “0”, “ExecMainStartTimestampMonotonic”: “0”, “ExecMainStatus”: “0”, “ExecStart”: “{ path=/usr/bin/supervisord ; argv=/usr/bin/supervisord -c /etc/supervisord.conf ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }”, “FailureAction”: “none”, “FileDescriptorStoreMax”: “0”, “FragmentPath”: “/usr/lib/systemd/system/supervisord.service”, “GuessMainPID”: “yes”, “IOScheduling”: “0”, “Id”: “supervisord.service”, “IgnoreOnIsolate”: “no”, “IgnoreOnSnapshot”: “no”, “IgnoreSIGPIPE”: “yes”, “InactiveEnterTimestampMonotonic”: “0”, “InactiveExitTimestampMonotonic”: “0”, “JobTimeoutAction”: “none”, “JobTimeoutUSec”: “0”, “KillMode”: “control-group”, “KillSignal”: “15”, “LimitAS”: “18446744073709551615”, “LimitCORE”: “18446744073709551615”, “LimitCPU”: “18446744073709551615”, “LimitDATA”: “18446744073709551615”, “LimitFSIZE”: “18446744073709551615”, “LimitLOCKS”: “18446744073709551615”, “LimitMEMLOCK”: “65536”, “LimitMSGQUEUE”: “819200”, “LimitNICE”: “0”, “LimitNOFILE”: “4096”, “LimitNPROC”: “2063094”, “LimitRSS”: “18446744073709551615”, “LimitRTPRIO”: “0”, “LimitRTTIME”: “18446744073709551615”, “LimitSIGPENDING”: “2063094”, “LimitSTACK”: “18446744073709551615”, “LoadState”: “loaded”, “MainPID”: “0”, “MemoryAccounting”: “no”, “MemoryCurrent”: “18446744073709551615”, “MemoryLimit”: “18446744073709551615”, “MountFlags”: “0”, “Names”: “supervisord.service”, “NeedDaemonReload”: “no”, “Nice”: “0”, “NoNewPrivileges”: “no”, “NonBlocking”: “no”, “NotifyAccess”: “none”, “OOMScoreAdjust”: “0”, “OnFailureJobMode”: “replace”, “PermissionsStartOnly”: “no”, “PrivateDevices”: “no”, “PrivateNetwork”: “no”, “PrivateTmp”: “no”, “ProtectHome”: “no”, “ProtectSystem”: “no”, “RefuseManualStart”: “no”, “RefuseManualStop”: “no”, “RemainAfterExit”: “no”, “Requires”: “basic.target”, “Restart”: “no”, “RestartUSec”: “100ms”, “Result”: “success”, “RootDirectoryStartOnly”: “no”, “RuntimeDirectoryMode”: “0755”, “SameProcessGroup”: “no”, “SecureBits”: “0”, “SendSIGHUP”: “no”, “SendSIGKILL”: “yes”, “Slice”: “system.slice”, “StandardError”: “inherit”, “StandardInput”: “null”, “StandardOutput”: “journal”, “StartLimitAction”: “none”, “StartLimitBurst”: “5”, “StartLimitInterval”: “10000000”, “StartupBlockIOWeight”: “18446744073709551615”, “StartupCPUShares”: “18446744073709551615”, “StatusErrno”: “0”, “StopWhenUnneeded”: “no”, “SubState”: “dead”, “SyslogLevelPrefix”: “yes”, “SyslogPriority”: “30”, “SystemCallErrorNumber”: “0”, “TTYReset”: “no”, “TTYVHangup”: “no”, “TTYVTDisallocate”: “no”, “TasksAccounting”: “no”, “TasksCurrent”: “18446744073709551615”, “TasksMax”: “18446744073709551615”, “TimeoutStartUSec”: “1min 30s”, “TimeoutStopUSec”: “1min 30s”, “TimerSlackNSec”: “50000”, “Transient”: “no”, “Type”: “forking”, “UMask”: “0022”, “UnitFilePreset”: “disabled”, “UnitFileState”: “disabled”, “Wants”: “system.slice”, “WatchdogTimestampMonotonic”: “0”, “WatchdogUSec”: “0”}}

TASK [awx_install : Wait for supervisor to stop.] ******************************************************************************************************************************************
ok: [localhost] => {“attempts”: 1, “changed”: false, “stat”: {“exists”: false}}

TASK [awx_install : Migrate the Tower database schema (may take awhile when upgrading).] ***************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“awx-manage”, “migrate”, “–noinput”, “–fake-initial”], “delta”: “0:00:00.190491”, “end”: “2018-02-02 04:45:37.152072”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2018-02-02 04:45:36.961581”, “stderr”: “Traceback (most recent call last):\n File "/usr/bin/awx-manage", line 5, in \n from pkg_resources import load_entry_point\n File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, in \n working_set.require(requires)\n File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require\n needed = self.resolve(parse_requirements(requirements))\n File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve\n raise DistributionNotFound(req)\npkg_resources.DistributionNotFound: awx==3.2.2”, “stderr_lines”: [“Traceback (most recent call last):”, " File "/usr/bin/awx-manage", line 5, in “, " from pkg_resources import load_entry_point”, " File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, in “, " working_set.require(requires)”, " File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require", " needed = self.resolve(parse_requirements(requirements))“, " File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve”, " raise DistributionNotFound(req)", “pkg_resources.DistributionNotFound: awx==3.2.2”], “stdout”: “”, “stdout_lines”: }
to retry, use: --limit @/root/ansible-tower-setup-3.2.2/install.retry

PLAY RECAP *********************************************************************************************************************************************************************************
localhost : ok=87 changed=6 unreachable=0 failed=1
`

I checked the awx-manage is not work.

May I miss any setting ?

`
[root@host ~]# awx-manage
Traceback (most recent call last):
File “/usr/bin/awx-manage”, line 5, in
from pkg_resources import load_entry_point
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 3007, in
working_set.require(requires)
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 728, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 626, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: awx==3.2.2

`

Please help me to take a look.

Thanks

Mark

Hey Mark,

This mailing list is for the open source awx project - it looks like you’re having trouble with the installer that ships with Red Hat Ansible Tower. Please reach out to Red Hat for support.

I see. I also asked them already, and waiting for them. If you guys got this problem, that will help me a lot.
Thanks Ryan.

Vào 20:35:51 UTC+7 Thứ Sáu, ngày 02 tháng 2 năm 2018, Ryan Petrello đã viết:

Hi Mark,

Do you know what’s the resolution for this??

RedHat marked this as “Solution In Progress” in the knowledgebase. https://access.redhat.com/solutions/3570481

I’ve reached out to them but still no answer :frowning:

Please help I’ll buy you a drink!! :smiley:

-Leo

Awx doesn’t install via an rpm.

When you report this problem to your red hat support contact, please include the entire playbook run log located in /var/log/tower/setup*.log

Oops - guess I hit send too soon. I’ve asked for it to be changed to “Solution Verified.” We expect to continue to require /var to be noexec.

Thanks,

-Graham

Please try with the below link and it is working for me. Also try to install the 3.3 version of Ansible tower and it was installed successfully without having any errors for me.

https://www.levvel.io/our-ideas/ansible-docker-devops-tower

Regards,
R.Sundar
9790899078