Not able to install AWX

Hello Everyone,

I am just new to Ansible and AWX, so please have some patience with my questions and I am really thankful to you.

I am trying to install AWX but it fails with below error

Version info

Ok, that was looking like python was not pointing to the docker version , after resolving that , i get below error . and i think this might be related to docker setup…

Yeah I’m not sure what’s up with your docker install but I will say that the version of docker you are using is over 2 years old.

Ok, that too sorted now,

docker --version
Docker version 17.05.0-ce, build 89658be

But, it still throws error as below…

TASK [image_build : Build sdist builder image] *******************************************************************************************************************************************************************************
task path: /root/awx-devel/installer/image_build/tasks/main.yml:50
fatal: [localhost → localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Error connecting: Error while fetching server API version: init() got an unexpected keyword argument ‘buffering’”}
to retry, use: --limit @/root/awx-devel/installer/install.retry

PLAY RECAP *******************************************************************************************************************************************************************************************************************
localhost : ok=9 changed=2 unreachable=0 failed=1

quest to conquer still continues :slight_smile:

After enabling verbose , i could see this

“Error while fetching server API version” is typically what happens when Ansible can’t communicate with docker for whatever reason.

Thanks,

DO you have any commands/ things to check before trying AWX installation. ?

I see my docker instance is up and running :-

docker info

Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 17.05.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Kernel Version: 4.1.12-61.1.28.el6uek.x86_64
Operating System: Oracle Linux Server 6.9
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.535GiB
Name: dev-armor21.bbs.bunnings.com.au
ID: U3QU:TMGJ:BHPU:H4QY:G4O4:2JB2:UOIN:CWVE:BEJ5:FJIC:C4IU:RUOB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

Between, I was doing this installation on Oracle linux6, which I am finding too much difficult to fulfill all prerequisites in.

I will build try on OL7 and see how it goes.

Ok, I am on Linux 7.

Everything worked fine, till I decided to install AWX.

AWX installation is basic on the same host , and fails as below

},
“msg”: “Error pulling image postgres:9.6 - 500 Server Error: Internal Server Error ("{"message":"Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 172.23.11.114:53: lame referral"}")”
}
to retry, use: --limit @/root/awx-devel/installer/install.retry

Did anyone seen this anytime?

Between, My instance in running behind the proxy.

It seems you are not able to pull the postgres container.
As you wrote “My instance in running behind the proxy” → I believe thats the problem.

Make sure you´ll be able to connect the internet (not just http), try to download the “hello world” from docker and have look if it works.

If it does, i think you are quite close to install awx cotainers.

Christian

Indeed, that was the problem.

I setup correctly PROXY and SSL certificate, now AWX installation went fine.

BUT…
docker logs -f awx_task shows few errors which i am not able to understand how to sort that …

2017-11-29 07:09:06,191: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbitmq:5672/awx: [Errno 113] No route to host.
Trying again in 32.00 seconds…

conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
OperationalError: could not connect to server: No route to host
Is the server running on host “postgres” (172.17.0.2) and accepting
TCP/IP connections on port 5432?

I check from my host i am able to telnet

telnet 172.17.0.2 5432
Trying 172.17.0.2…
Connected to 172.17.0.2.
Escape character is ‘^]’.
^]

bye

docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a469073db788 ansible/awx_task:latest “/tini – /bin/sh …” 45 minutes ago Up 45 minutes 8052/tcp awx_task
8610a693897d ansible/awx_web:latest “/tini – /bin/sh …” About an hour ago Up About an hour 0.0.0.0:80->8052/tcp awx_web
7efc76b533f4 memcached:alpine “docker-entrypoint…” About an hour ago Up About an hour 11211/tcp memcached
69300f7dc7d3 rabbitmq:3 “docker-entrypoint…” About an hour ago Up About an hour 4369/tcp, 5671-5672/tcp, 25672/tcp rabbitmq
f8794d05a9ee postgres:9.6 “docker-entrypoint…” About an hour ago Up About an hour 5432/tcp postgres

Hmm iam not sure whats going wrong.

i would try to stop all containers and run the playbook again .

  1. docker stop awx_task awx_web memcached rabbitmq postgres
  2. ansible-playbook -i inventory install.yml

Christian, thanks for all help.

I have tried what you mentioned.

I see below exception I am getting repeatedly

2017-12-12 23:46:26,510: DEBUG/ForkPoolWorker-1] Start from server, version: 0.9, properties: {‘information’: ‘Licensed under the MPL. See http://www.rabbitmq.com/’, ‘product’: ‘RabbitMQ’, ‘copyright’: ‘Copyright (C) 2007-2017 Pivotal Software, Inc.’, ‘capabilities’: {‘exchange_exchange_bindings’: True, ‘connection.blocked’: True, ‘authentication_failure_close’: True, ‘direct_reply_to’: True, ‘basic.nack’: True, ‘per_consumer_qos’: True, ‘consumer_priorities’: True, ‘consumer_cancel_notify’: True, ‘publisher_confirms’: True}, ‘cluster_name’: ‘rabbit@9fedbdbf7139’, ‘platform’: ‘Erlang/OTP 20.1.7’, ‘version’: ‘3.7.0’}, mechanisms: [‘AMQPLAIN’, ‘PLAIN’], locales: [u’en_US’]
[2017-12-12 23:46:26,512: DEBUG/ForkPoolWorker-1] using channel_id: 1
[2017-12-12 23:46:26,513: DEBUG/ForkPoolWorker-1] Channel open
[2017-12-12 23:46:26,515: DEBUG/MainProcess] pidbox received method active() [reply_to:{u’routing_key’: u’f4384dc6-3dcf-3d3b-a180-d15a4a5e1766’, u’exchange’: u’reply.celery.pidbox’} ticket:48e3c663-c2e0-4cba-872b-b81b529314f9]
[2017-12-12 23:46:26,516: ERROR/MainProcess] Control command error: error(104, ‘Connection reset by peer’)
Traceback (most recent call last):
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/celery/worker/pidbox.py”, line 42, in on_message
self.node.handle_message(body, message)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/kombu/pidbox.py”, line 129, in handle_message
return self.dispatch(**body)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/kombu/pidbox.py”, line 112, in dispatch
ticket=ticket)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/kombu/pidbox.py”, line 135, in reply
serializer=self.mailbox.serializer)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/kombu/pidbox.py”, line 265, in _publish_reply
**opts
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/kombu/messaging.py”, line 181, in publish
exchange_name, declare,
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/kombu/messaging.py”, line 194, in _publish
[maybe_declare(entity) for entity in declare]
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/kombu/messaging.py”, line 102, in maybe_declare
return maybe_declare(entity, self.channel, retry, **retry_policy)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/kombu/common.py”, line 129, in maybe_declare
return _maybe_declare(entity, declared, ident, channel, orig)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/kombu/common.py”, line 135, in _maybe_declare
entity.declare(channel=channel)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/kombu/entity.py”, line 185, in declare
nowait=nowait, passive=passive,
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/amqp/channel.py”, line 616, in exchange_declare
wait=None if nowait else spec.Exchange.DeclareOk,
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/amqp/abstract_channel.py”, line 50, in send_method
conn.frame_writer(1, self.channel_id, sig, args, content)
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/amqp/method_framing.py”, line 166, in write_frame
write(view[:offset])
File “/var/lib/awx/venv/awx/lib/python2.7/site-packages/amqp/transport.py”, line 258, in write
self._write(s)
File “/usr/lib64/python2.7/socket.py”, line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 104] Connection reset by peer
[2017-12-12 23:46:26,522: DEBUG/MainProcess] Closed channel #3
[2017-12-12 23:46:26,522: DEBUG/MainProcess] using channel_id: 3
[2017-12-12 23:46:26,524: DEBUG/MainProcess] Channel open
2017-12-12 23:46:27,529 ERROR awx.main.scheduler Failed to retrieve active tasks from celery
2017-12-12 23:46:27,529 ERROR awx.main.scheduler Failed to retrieve active tasks from celery
[2017-12-12 23:46:27,529: ERROR/ForkPoolWorker-1] Failed to retrieve active tasks from celery
[2017-12-12 23:46:27,605: INFO/ForkPoolWorker-1] Task awx.main.scheduler.tasks.run_task_manager[1cd58557-6ca8-46d3-92cf-d911145796f1] succeeded in 1.197403564s: None

Is there any checks I can perform to see if other containers in desired state?