Closed Bug 1440446 Opened 6 years ago Closed 6 years ago

Intermittent Travis Selenium "error: [Errno 111] Connection refused" during test_filter_in_progress

Categories

(Tree Management :: Treeherder, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: emorley, Unassigned)

Details

From:
https://travis-ci.org/mozilla/treeherder/jobs/344944719


"""
$ pytest tests/selenium/ --driver Firefox
============================= test session starts ==============================
platform linux2 -- Python 2.7.14, pytest-3.4.1, py-1.5.2, pluggy-0.6.0
driver: Firefox
sensitiveurl: mozilla\.org
Django settings: tests.settings (from ini file)
rootdir: /home/travis/build/mozilla/treeherder, inifile: setup.cfg
plugins: variables-1.7.1, selenium-1.11.4, django-3.1.2, base-url-1.4.1
collected 20 items                                                             
tests/selenium/test_filter_jobs_by_failure_result.py ...                 [ 15%]
tests/selenium/test_filter_jobs_by_keywords.py .                         [ 20%]
tests/selenium/test_filter_jobs_by_result_status.py ......E              [ 55%]
tests/selenium/test_perfherder.py .                                      [ 60%]
tests/selenium/test_range.py ..                                          [ 70%]
tests/selenium/test_reset_filters.py .                                   [ 75%]
tests/selenium/test_select_unclassified_job.py ..                        [ 85%]
tests/selenium/test_switch_app.py .                                      [ 90%]
tests/selenium/test_switch_repo.py .                                     [ 95%]
tests/selenium/test_view_single_result.py .                              [100%]
==================================== ERRORS ====================================
__________________ ERROR at setup of test_filter_in_progress ___________________
request = <SubRequest 'driver' for <Function 'test_filter_in_progress'>>
driver_class = <class 'selenium.webdriver.firefox.webdriver.WebDriver'>
driver_kwargs = {'capabilities': {'acceptInsecureCerts': True, 'browserName': 'firefox', 'marionette': True}, 'log_path': '/tmp/pytest...test_filter_in_progress0/driver.log', 'options': <selenium.webdriver.firefox.options.Options object at 0x7fddd09da290>}
    @pytest.yield_fixture
    def driver(request, driver_class, driver_kwargs):
        """Returns a WebDriver instance based on options and capabilities"""
>       driver = driver_class(**driver_kwargs)
../../../venv/lib/python2.7/site-packages/pytest_selenium/pytest_selenium.py:130: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../venv/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py:162: in __init__
    keep_alive=True)
../../../venv/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:154: in __init__
    self.start_session(desired_capabilities, browser_profile)
../../../venv/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:243: in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
../../../venv/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:310: in execute
    response = self.command_executor.execute(driver_command, params)
../../../venv/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py:466: in execute
    return self._request(command_info[0], url, body=data)
../../../venv/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py:489: in _request
    self._conn.request(method, parsed_url.path, body, headers)
/opt/python/2.7.14/lib/python2.7/httplib.py:1042: in request
    self._send_request(method, url, body, headers)
/opt/python/2.7.14/lib/python2.7/httplib.py:1082: in _send_request
    self.endheaders(body)
/opt/python/2.7.14/lib/python2.7/httplib.py:1038: in endheaders
    self._send_output(message_body)
/opt/python/2.7.14/lib/python2.7/httplib.py:882: in _send_output
    self.send(msg)
/opt/python/2.7.14/lib/python2.7/httplib.py:844: in send
    self.connect()
/opt/python/2.7.14/lib/python2.7/httplib.py:821: in connect
    self.timeout, self.source_address)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
address = ('localhost', '39006'), timeout = <object object at 0x7fddddc50160>
source_address = None
    def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
                          source_address=None):
        """Connect to *address* and return the socket object.
    
        Convenience function.  Connect to *address* (a 2-tuple ``(host,
        port)``) and return the socket object.  Passing the optional
        *timeout* parameter will set the timeout on the socket instance
        before attempting to connect.  If no *timeout* is supplied, the
        global default timeout setting returned by :func:`getdefaulttimeout`
        is used.  If *source_address* is set it must be a tuple of (host, port)
        for the socket to bind as a source address before making the connection.
        A host of '' or port 0 tells the OS to use the default.
        """
    
        host, port = address
        err = None
        for res in getaddrinfo(host, port, 0, SOCK_STREAM):
            af, socktype, proto, canonname, sa = res
            sock = None
            try:
                sock = socket(af, socktype, proto)
                if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
                    sock.settimeout(timeout)
                if source_address:
                    sock.bind(source_address)
                sock.connect(sa)
                return sock
    
            except error as _:
                err = _
                if sock is not None:
                    sock.close()
    
        if err is not None:
>           raise err
E           error: [Errno 111] Connection refused
/opt/python/2.7.14/lib/python2.7/socket.py:575: error
"""
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Component: Treeherder: Docs & Development → TreeHerder
You need to log in before you can comment on or make changes to this bug.