Error run Django LiveStaticTestCase with Nginx reverse proxy using CircleCI

  1. Our Stack: Django 1.9 + PostgreSQL 9.5 + Nginx + Selenium + Chrome
  2. Because our web application logic based on request domain name, so our Django LiveStaticTestCase running use Nginx as a reverse proxy server. And I already add Nginx as dependency in circle.yml by sudo apt-get install nginx, and replace the default conf by our own.
  3. The problem is that: the Django LiveStaticTestCase related test cause error on CircleCI , but when I debug used SSH, and repeat the test command, everything success.

TestCase error info on CircleCI:

`python -Wi test fenxiao --with-xunit --liveserver= --xunit-file=$CIRCLE_TEST_REPORTS/django/nosetests.xml
nosetests account company order sitez cart fenxiao --with-xunit --xunit-file=/tmp/circle-junit.eItcVvW/django/nosetests.xml --verbosity=1
Creating test database for alias ‘default’…

ERROR: test_change_user_info (fenxiao.tests.test_e2e.ApplyViewTest)

Traceback (most recent call last):
File “/home/ubuntu/bazaar4/fenxiao/tests/”, line 26, in setUp
self.browser = webdriver.Chrome()
File “/home/ubuntu/virtualenvs/venv-system/lib/python2.7/site-packages/selenium/webdriver/chrome/”, line 69, in init
File “/home/ubuntu/virtualenvs/venv-system/lib/python2.7/site-packages/selenium/webdriver/chrome/”, line 88, in quit
File “/home/ubuntu/virtualenvs/venv-system/lib/python2.7/site-packages/selenium/webdriver/chrome/”, line 111, in stop
url_request.urlopen(“” % self.port)
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 154, in urlopen
return, data, timeout)
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 431, in open
response = self._open(req, data)
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 449, in _open
’_open’, req)
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 409, in _call_chain
result = func(*args)
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 1227, in http_open
return self.do_open(httplib.HTTPConnection, req)
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 1194, in do_open
h.request(req.get_method(), req.get_selector(),, headers)
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 1057, in request
self._send_request(method, url, body, headers)
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 1097, in _send_request
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 1053, in endheaders
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 897, in _send_output
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 859, in send
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 836, in connect
self.timeout, self.source_address)
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 563, in create_connection
File “/opt/circleci/python/2.7.11/lib/python2.7/”, line 228, in meth
return getattr(self._sock,name)(*args)
TypeError: a float is required