# How can i upgrade python version for RabbitMQ Image

**URL:** <https://forum.ansible.com/t/how-can-i-upgrade-python-version-for-rabbitmq-image/32549>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [March 27, 2020, 3:40pm UTC](https://forum.ansible.com/t/how-can-i-upgrade-python-version-for-rabbitmq-image/32549 "2020-03-27T15:40:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [March 27, 2020, 3:40pm UTC](https://forum.ansible.com/t/how-can-i-upgrade-python-version-for-rabbitmq-image/32549/1 "2020-03-27T15:40:23Z")

</div>

Hello,

We are getting some medium severity vulnerabilities related to older Python 2.7 version in RabbitMQ. Is there a way to fix these using the AWX build process?  
The suggested fix is: **All Python 2.7.x users should upgrade to the latest version \>= python-2.7.172.7** but i am not sure how i can achieve this using the build process.

> /usr/lib/python2.7/urllib2.py |
> 
> - |  
> /usr/lib/python2.7/httplib.py |  
> /usr/lib/python2.7/httplib.py |  
> /usr/lib/python2.7/smtpd.py |  
> /usr/lib/python2.7/ssl.py |  
> /usr/lib/python2.7/smtpd.py |  
> /usr/lib/python2.7/urllib2.py |  
> /usr/lib/python2.7/httplib.py |  
> /usr/lib/python2.7/httplib.py |  
> /usr/lib/python2.7/smtpd.py |  
> /usr/lib/python2.7/ssl.py |  
> /usr/lib/python2.7/smtpd.py |

Also, could anyone please suggest how the RabbitMQ and Memcached Images are created during build process, i could only find a way to make changes in AWX Web/task images.

Thanks.

Regards,  
Ankit

---

<div class="post-metadata">

**Author:** ![klaasdemter](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@klaasdemter](https://forum.ansible.com/u/klaasdemter)\
**Post date:** [March 27, 2020, 4:02pm UTC](https://forum.ansible.com/t/how-can-i-upgrade-python-version-for-rabbitmq-image/32549/2 "2020-03-27T16:02:56Z")

</div>

RabbitMQ is being replaced ([https://github.com/ansible/awx/pull/6034](https://github.com/ansible/awx/pull/6034)).  
Next release won't have a dependency on it if I understood it right.  
So issues with rabbitmq container will resolve themselves soon.

\> could anyone please suggest how the RabbitMQ and Memcached Images are created during build process  
if you use containers they are not built, they are downloaded from docker hub.  
RabbitMQ container: [https://github.com/ansible/awx-rabbitmq](https://github.com/ansible/awx-rabbitmq)  
memcached container: [https://github.com/docker-library/memcached](https://github.com/docker-library/memcached)

Greetings  
Klaas

---

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [March 30, 2020, 7:55am UTC](https://forum.ansible.com/t/how-can-i-upgrade-python-version-for-rabbitmq-image/32549/3 "2020-03-30T07:55:02Z")

</div>

Hello All,

Can anyone please suggest few helpful points here.

Thanks.

---

<div class="post-metadata">

**Author:** ![rpetrell](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@rpetrell](https://forum.ansible.com/u/rpetrell)\
**Post date:** [March 30, 2020, 5:37pm UTC](https://forum.ansible.com/t/how-can-i-upgrade-python-version-for-rabbitmq-image/32549/4 "2020-03-30T17:37:19Z")

</div>

Ankit,

Give the latest release (10.0.0) a try - we’ve removed the RabbitMQ container entirely.

---

<div class="post-metadata">

**Author:** ![Kadel-Garcia\_Nico](https://avatars.discourse-cdn.com/v4/letter/k/dbc845/32.png) [@Kadel-Garcia\_Nico](https://forum.ansible.com/u/Kadel-Garcia_Nico)\
**Post date:** [April 3, 2020, 6:14am UTC](https://forum.ansible.com/t/how-can-i-upgrade-python-version-for-rabbitmq-image/32549/5 "2020-04-03T06:14:45Z")

</div>

Isn’t that built into your operating systems upgrade tools? Python2.7.172.7 would still show up at /usr/lib/python2.7, that is the “major release number”.

**Nico Kadel-Garcia**

Senior DevOps Engineer

Cengage Learning

200 Pier Four Blvd.

Boston, MA 02210

[nico.kadel-garcia@cengage.com](mailto:nico.kadel-garcia@cengage.com)

---

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [April 3, 2020, 7:59am UTC](https://forum.ansible.com/t/how-can-i-upgrade-python-version-for-rabbitmq-image/32549/6 "2020-04-03T07:59:00Z")

</div>

Hi Ryan,

Thanks, i noticed it and tried the version 10.0.0, now for some reason my browser keeps showing the migration screen. This is a new clean installation and i have tried this multiple times but facing the same issue. Could you please suggest how to resolve this?

 ![migrating.png](https://us1.discourse-cdn.com/ansible/original/2X/f/fa0e7c37f3343c3cc5dc8b5734c39d658ac177e6.png)

---

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [April 3, 2020, 8:04am UTC](https://forum.ansible.com/t/how-can-i-upgrade-python-version-for-rabbitmq-image/32549/7 "2020-04-03T08:04:31Z")

</div>

Hi Nico,

Actually that specific version has fixes for some of the library scripts in 2.7.16. I didnt get the part about upgrade tool of OS, i was trying to find a way to build or upgrade AWX RMQ image with Python 3.x. The default version in it is Python 2.7.16 but it is using RabbitMQ-alpine-management as base image and that is using alpine as base image. Hence, wanted to understand the dependency tree for upgraded version of python.

---

<div class="post-metadata">

**Author:** ![Kadel-Garcia\_Nico](https://avatars.discourse-cdn.com/v4/letter/k/dbc845/32.png) [@Kadel-Garcia\_Nico](https://forum.ansible.com/u/Kadel-Garcia_Nico)\
**Post date:** [April 4, 2020, 4:59am UTC](https://forum.ansible.com/t/how-can-i-upgrade-python-version-for-rabbitmq-image/32549/8 "2020-04-04T04:59:57Z")

</div>

The container is a docker image, righ? I assume you’re using the CentOS 8 based docker containers? Most containers are stripped down OS images. Run “yum install” inside the docker container to get an updated image, and test with that.

**Nico Kadel-Garcia**

Senior DevOps Engineer

Cengage Learning

200 Pier Four Blvd.

Boston, MA 02210

[nico.kadel-garcia@cengage.com](mailto:nico.kadel-garcia@cengage.com)
