Python 网络驱动程序。在虚拟机上启动大量实例会产生WinError 10061

Python 网络驱动程序。在虚拟机上启动大量实例会产生WinError 10061,python,webdriver,celery,selenium-chromedriver,connection-refused,Python,Webdriver,Celery,Selenium Chromedriver,Connection Refused,我想同时运行许多Chrome实例(使用Chromedriver)。我用蟒蛇和芹菜。在本地计算机上,一切正常,但在服务器(Win7和Win10)上,只有7个Chrome实例打开,其余的在尝试运行下一个实例时崩溃: ConnectionRefusedError:[WinError 10061]无法建立连接,因为目标计算机主动拒绝了它 [2017-04-18 08:14:43,988: ERROR/MainProcess] Task bid[7fce5818-41b5-4ff5-9ae2-41913b

我想同时运行许多Chrome实例(使用Chromedriver)。我用蟒蛇和芹菜。在本地计算机上,一切正常,但在服务器(Win7和Win10)上,只有7个Chrome实例打开,其余的在尝试运行下一个实例时崩溃:

ConnectionRefusedError:[WinError 10061]无法建立连接,因为目标计算机主动拒绝了它

[2017-04-18 08:14:43,988: ERROR/MainProcess] Task bid[7fce5818-41b5-4ff5-9ae2-41913bd88f43] raised unexpected: ConnectionRefusedError(10061, 'No connection could be made because the target machine actively refused it', None, 10061, None)
Traceback (most recent call last):
  File "E:\env\bot\lib\site-packages\celery\app\trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "E:\env\bot\lib\site-packages\celery\app\trace.py", line 438, in _protected_call_
    return self.run(*args, **kwargs)
  File "E:\bot\app.py", line 100, in bid
    home_page.open()
  File "E:\env\bot\lib\site-packages\webium\base_page.py", line 57, in open
    self._driver.get(self.url)
  File "E:\env\bot\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 248, in get
    self.execute(Command.GET, {'url': url})
  File "E:\env\bot\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 234, in execute
    response = self.command_executor.execute(driver_command, params)
  File "E:\env\bot\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 407, in execute
    return self._request(command_info[0], url, body=data)
  File "E:\env\bot\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 438, in _request
    self._conn.request(method, parsed_url.path, body, headers)
  File "C:\Python35-32\Lib\http\client.py", line 1106, in request
    self._send_request(method, url, body, headers)
  File "C:\Python35-32\Lib\http\client.py", line 1151, in _send_request
    self.endheaders(body)
  File "C:\Python35-32\Lib\http\client.py", line 1102, in endheaders
    self._send_output(message_body)
  File "C:\Python35-32\Lib\http\client.py", line 934, in _send_output
    self.send(msg)
  File "C:\Python35-32\Lib\http\client.py", line 877, in send
    self.connect()
  File "C:\Python35-32\Lib\http\client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "C:\Python35-32\Lib\socket.py", line 711, in create_connection
    raise err
  File "C:\Python35-32\Lib\socket.py", line 702, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
我不使用Selenium网格,我使用下一个参数运行了很多实例:

def set_driver():
    chrome_options = Options()
    chrome_options.add_extension('extension_3_0_0_14.crx')
    return webdriver.Chrome(chrome_options=chrome_options)
有人遇到过这个问题吗?原因可能是什么?我怎样才能解决这个问题

PS Google表示套接字存在问题。但为什么在我的本地机器上一切都很好,而在虚拟机上却有问题呢