# Exceptions when trying to use apache2\_mod\_proxy

**URL:** <https://forum.ansible.com/t/exceptions-when-trying-to-use-apache2-mod-proxy/30011>\
**Category:** Ansible Project\
**Created:** [March 28, 2019, 4:05pm UTC](https://forum.ansible.com/t/exceptions-when-trying-to-use-apache2-mod-proxy/30011 "2019-03-28T16:05:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Sondag](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jeff\_Sondag](https://forum.ansible.com/u/Jeff_Sondag)\
**Post date:** [March 28, 2019, 4:05pm UTC](https://forum.ansible.com/t/exceptions-when-trying-to-use-apache2-mod-proxy/30011/1 "2019-03-28T16:05:29Z")

</div>

I’m trying to manage an apache load balancer with apache2\_mod\_proxy, and am getting the following error. If someone could help that would be very much appreciated.

I’ve submitted it as a bug with more information, here. [https://github.com/ansible/ansible/issues/54259](https://github.com/ansible/ansible/issues/54259)

TASK [apache2\_mod\_proxy] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: first argument must be string or compiled pattern

fatal: [localhost]: FAILED! =\> {“changed”: false, “module\_stderr”: "Traceback (most recent call last):

File "/root/.ansible/tmp/ansible-tmp-1553280134.74-29374324244571/AnsiballZ\_apache2\_mod\_proxy.py", line 114, in   
\_ansiballz\_main()  
File "/root/.ansible/tmp/ansible-tmp-1553280134.74-29374324244571/AnsiballZ\_apache2\_mod\_proxy.py", line 106, in \_ansiballz\_main  
invoke\_module(zipped\_mod, temp\_path, ANSIBALLZ\_PARAMS)  
File "/root/.ansible/tmp/ansible-tmp-1553280134.74-29374324244571/AnsiballZ\_apache2\_mod\_proxy.py", line 49, in invoke\_module  
imp.load\_module(‘ **main** ’, mod, module, MOD\_DESC)  
File "/tmp/ansible\_apache2\_mod\_proxy\_payload\_6P4Nj2/ **main**.py", line 444, in   
File "/tmp/ansible\_apache2\_mod\_proxy\_payload\_6P4Nj2/ **main**.py", line 388, in main  
File "/tmp/ansible\_apache2\_mod\_proxy\_payload\_6P4Nj2/ **main**.py", line 271, in get\_member\_status  
File "/tmp/ansible\_apache2\_mod\_proxy\_payload\_6P4Nj2/ **main**.py", line 260, in get\_member\_attributes  
File "/usr/lib64/python2.7/re.py", line 142, in search  
return \_compile(pattern, flags).search(string)  
File "/usr/lib64/python2.7/re.py", line 238, in \_compile  
raise TypeError, "first argument must be string or compiled pattern"  
TypeError: first argument must be string or compiled pattern  
", “module\_stdout”: “”, “msg”: “MODULE FAILURE  
See stdout/stderr for the exact error”, “rc”: 1}

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [March 28, 2019, 5:33pm UTC](https://forum.ansible.com/t/exceptions-when-trying-to-use-apache2-mod-proxy/30011/2 "2019-03-28T17:33:43Z")

</div>

Hi,

First point, did you install "BeautifulSoup python module" as written in documentation ?

Seems you can install this module with EPEL repo ([https://centos.pkgs.org/7/epel-x86\_64/python-BeautifulSoup-3.2.1-7.el7.noarch.rpm.html](https://centos.pkgs.org/7/epel-x86_64/python-BeautifulSoup-3.2.1-7.el7.noarch.rpm.html))

Regards,

JYL

---

<div class="post-metadata">

**Author:** ![Jeff\_Sondag](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jeff\_Sondag](https://forum.ansible.com/u/Jeff_Sondag)\
**Post date:** [March 28, 2019, 6:14pm UTC](https://forum.ansible.com/t/exceptions-when-trying-to-use-apache2-mod-proxy/30011/3 "2019-03-28T18:14:57Z")

</div>

I installed it the following way, which installed version 3.2.1

```auto
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install ./epel-release-latest-*.noarch.rpm
yum -y install python-pip
pip install beautifulsoup

```

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [March 28, 2019, 6:33pm UTC](https://forum.ansible.com/t/exceptions-when-trying-to-use-apache2-mod-proxy/30011/4 "2019-03-28T18:33:38Z")

</div>

Regards,

---

<div class="post-metadata">

**Author:** ![Jeff\_Sondag](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@Jeff\_Sondag](https://forum.ansible.com/u/Jeff_Sondag)\
**Post date:** [March 28, 2019, 6:57pm UTC](https://forum.ansible.com/t/exceptions-when-trying-to-use-apache2-mod-proxy/30011/5 "2019-03-28T18:57:28Z")

</div>

Yes, the server I’m pointing at is a production server working as a load balancer for Genesys Web Services.
