title: "Bad request" on creating new session under CentOS, Firefox and Xvfb
body: <p>When on <code>Mac OS X 10.10</code>, <code>Mozilla Firefox 38.3.0</code> and <code>java version &quot;1.7.0_79&quot;</code> I start Selenium hub and node:</p>
  <blockquote>
  <p>java -jar selenium-2.47.1.jar -role hub</p>
  <p>java -jar selenium-2.47.1.jar -role webdriver -hubHost 127.0.0.1</p>
  </blockquote>
  <p>and run this test:</p>
  <pre><code>require &quot;rspec&quot;
  require &quot;capybara/rspec&quot;
  
  Capybara.app_host = &quot;https://fb.*****.com/&quot;
  
  require &quot;selenium/webdriver&quot;
  
  Capybara.register_driver :my_driver do |app|
    profile = Selenium::WebDriver::Firefox::Profile.new
    desired_capabilities = Selenium::WebDriver::Remote::Capabilities.firefox firefox_profile: profile
    Capybara::Selenium::Driver.new(app,
      desired_capabilities: desired_capabilities,
      browser: :remote,
      url: &quot;http://#{ENV[&quot;HUB_ADDRESS&quot;]}:4444/wd/hub&quot;,
    )
  end
  
  Capybara.default_driver = :my_driver
  
  
  feature &quot;my feature&quot; do
  
    scenario &quot;my scenario&quot; do
      visit &quot;&quot;
    end
  
  end
  </code></pre>
  <p>it goes fine with:</p>
  <blockquote>
  <p>HUB_ADDRESS=127.0.0.1 rspec test.rb</p>
  </blockquote>
  <hr />
  <p>When I run it on <code>CentOS release 6.7 (Final)</code>, <code>Mozilla Firefox 38.3.0</code> and <code>openjdk version &quot;1.8.0_51&quot;</code> with:</p>
  <blockquote>
  <p>java -jar selenium-2.47.1.jar -role hub</p>
  <p>DISPLAY=:1 java -jar selenium-2.47.1.jar -role webdriver -hubHost 127.0.0.1</p>
  </blockquote>
  <p>and Xvfb:</p>
  <blockquote>
  <p>Xvfb :1 -ac -screen 0 1280x1024x24</p>
  </blockquote>
  <p>it fails with this test log:</p>
  <pre><code>  1) my feature my scenario
       Failure/Error: visit &quot;&quot;
       Selenium::WebDriver::Error::UnknownError:
         Bad request
         Command duration or timeout: 199 milliseconds
         Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
         System info: host: 'vs01.*****.me', ip: '*****', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-042stab108.1', java.version: '1.8.0_51'
         Driver info: org.openqa.selenium.firefox.FirefoxDriver (org.openqa.selenium.UnsupportedCommandException)
       # [remote server] sun.reflect.NativeConstructorAccessorImpl(NativeConstructorAccessorImpl.java):-2:in `newInstance0'
       # [remote server] sun.reflect.NativeConstructorAccessorImpl(NativeConstructorAccessorImpl.java):62:in `newInstance'
       # [remote server] sun.reflect.DelegatingConstructorAccessorImpl(DelegatingConstructorAccessorImpl.java):45:in `newInstance'
       # [remote server] java.lang.reflect.Constructor(Constructor.java):422:in `newInstance'
       # [remote server] org.openqa.selenium.remote.ErrorHandler(ErrorHandler.java):206:in `createThrowable'
       # [remote server] org.openqa.selenium.remote.ErrorHandler(ErrorHandler.java):158:in `throwIfResponseFailed'
       # [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):595:in `execute'
       # [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):242:in `startSession'
       # [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):128:in `&lt;init&gt;'
       # [remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):223:in `&lt;init&gt;'
       # [remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):216:in `&lt;init&gt;'
       # [remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):134:in `&lt;init&gt;'
       # [remote server] sun.reflect.NativeConstructorAccessorImpl(NativeConstructorAccessorImpl.java):-2:in `newInstance0'
       # [remote server] sun.reflect.NativeConstructorAccessorImpl(NativeConstructorAccessorImpl.java):62:in `newInstance'
       # [remote server] sun.reflect.DelegatingConstructorAccessorImpl(DelegatingConstructorAccessorImpl.java):45:in `newInstance'
       # [remote server] java.lang.reflect.Constructor(Constructor.java):422:in `newInstance'
       # [remote server] org.openqa.selenium.remote.server.DefaultDriverProvider(DefaultDriverProvider.java):103:in `callConstructor'
       # [remote server] org.openqa.selenium.remote.server.DefaultDriverProvider(DefaultDriverProvider.java):97:in `newInstance'
       # [remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):60:in `newInstance'
       # [remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):222:in `call'
       # [remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):1:in `call'
       # [remote server] java.util.concurrent.FutureTask(FutureTask.java):266:in `run'
       # [remote server] org.openqa.selenium.remote.server.DefaultSession$1(DefaultSession.java):176:in `run'
       # [remote server] java.util.concurrent.ThreadPoolExecutor(ThreadPoolExecutor.java):1142:in `runWorker'
       # [remote server] java.util.concurrent.ThreadPoolExecutor$Worker(ThreadPoolExecutor.java):617:in `run'
       # [remote server] java.lang.Thread(Thread.java):745:in `run'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/response.rb:71:in `assert_ok'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/response.rb:34:in `initialize'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/common.rb:78:in `new'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/common.rb:78:in `create_response'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/default.rb:90:in `request'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/bridge.rb:657:in `raw_execute'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/bridge.rb:122:in `create_session'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/remote/bridge.rb:87:in `initialize'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/common/driver.rb:52:in `new'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver/common/driver.rb:52:in `for'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/selenium-webdriver-2.47.1/lib/selenium/webdriver.rb:86:in `for'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/capybara-2.5.0/lib/capybara/selenium/driver.rb:13:in `browser'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/capybara-2.5.0/lib/capybara/selenium/driver.rb:45:in `visit'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/capybara-2.5.0/lib/capybara/session.rb:232:in `visit'
       # /Users/nakilon/.gem/ruby/2.0.0/gems/capybara-2.5.0/lib/capybara/dsl.rb:51:in `block (2 levels) in &lt;module:DSL&gt;'
       # ./test_min.rb:6:in `block (2 levels) in &lt;top (required)&gt;'
  </code></pre>
  <p>hub log:</p>
  <pre><code>18:20:59.994 INFO - Got a request to create a new session: Capabilities [{rotatable=false, nativeEvents=false, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, version=, platform=ANY, cssSelectorsEnabled=true, firefox_profile=UEsDBBQAAAAIAJ2SOEcGjvwlZwMAA...}]
  18:20:59.994 INFO - Available nodes: [http://*****:5555]
  18:20:59.995 INFO - Trying to create a new session on node http://*****:5555
  18:20:59.995 INFO - Trying to create a new session on test slot {seleniumProtocol=WebDriver, browserName=firefox, maxInstances=5, platform=LINUX}
  </code></pre>
  <p>and node log:</p>
  <pre><code>18:21:00.008 INFO - Executing: [new session: Capabilities [{rotatable=false, nativeEvents=false, browserName=firefo
  x, takesScreenshot=true, javascriptEnabled=true, version=, platform=ANY, cssSelectorsEnabled=true, firefox_profile=
  UEsDBBQAAAAIAJ2SOEcGjvwlZwMAA...}]])
  18:21:00.018 INFO - Creating a new session for Capabilities [{rotatable=false, nativeEvents=false, browserName=fire
  fox, takesScreenshot=true, javascriptEnabled=true, version=, platform=ANY, cssSelectorsEnabled=true, firefox_profil
  e=UEsDBBQAAAAIAJ2SOEcGjvwlZwMAA...}]
  18:21:02.219 WARN - Exception thrown
  java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
  Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
  System info: host: 'vs01.*****.me', ip: '*****', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-042stab108.1', java.version: '1.8.0_51'
  Driver info: driver.version: unknown
          at java.util.concurrent.FutureTask.report(FutureTask.java:122)
          at java.util.concurrent.FutureTask.get(FutureTask.java:192)
          at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)
          at org.openqa.selenium.remote.server.DefaultSession.&lt;init&gt;(DefaultSession.java:119)
          at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)
          at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:125)
          at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:58)
          at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
          at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)
          at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:175)
          at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:202)
          at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:164)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
          at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:130)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
          at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
          at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
          at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
          at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
          at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
          at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
          at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
          at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
          at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
          at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
          at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
          at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
  Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
  Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
  System info: host: 'vs01.*****.me', ip: '*****', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-042stab108.1', java.version: '1.8.0_51'
  Driver info: driver.version: unknown
          at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:113)
          at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97)
          at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
          at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
          at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
          at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103)
          ... 9 more
  Caused by: org.openqa.selenium.UnsupportedCommandException: Bad request
  Command duration or timeout: 199 milliseconds
  Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
  System info: host: 'vs01.*****.me', ip: '*****', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-042stab108.1', java.version: '1.8.0_51'
  Driver info: org.openqa.selenium.firefox.FirefoxDriver
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
          at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
          at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
          at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
          at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
          at org.openqa.selenium.remote.RemoteWebDriver.&lt;init&gt;(RemoteWebDriver.java:128)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:223)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:216)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:134)
          ... 14 more
  18:21:02.224 WARN - Exception: Bad request
  Command duration or timeout: 199 milliseconds
  Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
  System info: host: 'vs01.*****.me', ip: '*****', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-042stab108.1', java.version: '1.8.0_51'
  Driver info: org.openqa.selenium.firefox.FirefoxDriver
  </code></pre>
  <p>I've tried to mock capabilities with json obtained from Mac OS test run logging, but it didn't help.</p>
  <p>UPD: found stack trace at <code>http://vs01.*****.me:4444/wd/hub/static/resource/hub.html</code>:</p>
  <pre><code>{
    &quot;status&quot;: 13,
    &quot;value&quot;: {
      &quot;message&quot;: &quot;Session [(null externalkey)] not available and is not among the last 1000 terminated sessions.\nActive sessions are[]&quot;,
      &quot;class&quot;: &quot;org.openqa.grid.common.exception.GridException&quot;,
      &quot;stackTrace&quot;: [
        {
          &quot;fileName&quot;: &quot;ActiveTestSessions.java&quot;,
          &quot;className&quot;: &quot;org.openqa.grid.internal.ActiveTestSessions&quot;,
          &quot;methodName&quot;: &quot;getExistingSession&quot;,
          &quot;lineNumber&quot;: 110
        },
        {
          &quot;fileName&quot;: &quot;Registry.java&quot;,
          &quot;className&quot;: &quot;org.openqa.grid.internal.Registry&quot;,
          &quot;methodName&quot;: &quot;getExistingSession&quot;,
          &quot;lineNumber&quot;: 423
        },
        {
          &quot;fileName&quot;: &quot;RequestHandler.java&quot;,
          &quot;className&quot;: &quot;org.openqa.grid.web.servlet.handler.RequestHandler&quot;,
          &quot;methodName&quot;: &quot;getSession&quot;,
          &quot;lineNumber&quot;: 238
        },
        {
          &quot;fileName&quot;: &quot;RequestHandler.java&quot;,
          &quot;className&quot;: &quot;org.openqa.grid.web.servlet.handler.RequestHandler&quot;,
          &quot;methodName&quot;: &quot;process&quot;,
          &quot;lineNumber&quot;: 119
        },
        {
          &quot;fileName&quot;: &quot;DriverServlet.java&quot;,
          &quot;className&quot;: &quot;org.openqa.grid.web.servlet.DriverServlet&quot;,
          &quot;methodName&quot;: &quot;process&quot;,
          &quot;lineNumber&quot;: 83
        },
        {
          &quot;fileName&quot;: &quot;DriverServlet.java&quot;,
          &quot;className&quot;: &quot;org.openqa.grid.web.servlet.DriverServlet&quot;,
          &quot;methodName&quot;: &quot;doGet&quot;,
          &quot;lineNumber&quot;: 61
        },
        {
          &quot;fileName&quot;: &quot;HttpServlet.java&quot;,
          &quot;className&quot;: &quot;javax.servlet.http.HttpServlet&quot;,
          &quot;methodName&quot;: &quot;service&quot;,
          &quot;lineNumber&quot;: 707
        },
        {
          &quot;fileName&quot;: &quot;HttpServlet.java&quot;,
          &quot;className&quot;: &quot;javax.servlet.http.HttpServlet&quot;,
          &quot;methodName&quot;: &quot;service&quot;,
          &quot;lineNumber&quot;: 820
        },
        {
          &quot;fileName&quot;: &quot;ServletHolder.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.servlet.ServletHolder&quot;,
          &quot;methodName&quot;: &quot;handle&quot;,
          &quot;lineNumber&quot;: 565
        },
        {
          &quot;fileName&quot;: &quot;ServletHandler.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.servlet.ServletHandler&quot;,
          &quot;methodName&quot;: &quot;doHandle&quot;,
          &quot;lineNumber&quot;: 479
        },
        {
          &quot;fileName&quot;: &quot;SessionHandler.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.session.SessionHandler&quot;,
          &quot;methodName&quot;: &quot;doHandle&quot;,
          &quot;lineNumber&quot;: 225
        },
        {
          &quot;fileName&quot;: &quot;ContextHandler.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.handler.ContextHandler&quot;,
          &quot;methodName&quot;: &quot;doHandle&quot;,
          &quot;lineNumber&quot;: 1031
        },
        {
          &quot;fileName&quot;: &quot;ServletHandler.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.servlet.ServletHandler&quot;,
          &quot;methodName&quot;: &quot;doScope&quot;,
          &quot;lineNumber&quot;: 406
        },
        {
          &quot;fileName&quot;: &quot;SessionHandler.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.session.SessionHandler&quot;,
          &quot;methodName&quot;: &quot;doScope&quot;,
          &quot;lineNumber&quot;: 186
        },
        {
          &quot;fileName&quot;: &quot;ContextHandler.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.handler.ContextHandler&quot;,
          &quot;methodName&quot;: &quot;doScope&quot;,
          &quot;lineNumber&quot;: 965
        },
        {
          &quot;fileName&quot;: &quot;ScopedHandler.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.handler.ScopedHandler&quot;,
          &quot;methodName&quot;: &quot;handle&quot;,
          &quot;lineNumber&quot;: 117
        },
        {
          &quot;fileName&quot;: &quot;HandlerWrapper.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.handler.HandlerWrapper&quot;,
          &quot;methodName&quot;: &quot;handle&quot;,
          &quot;lineNumber&quot;: 111
        },
        {
          &quot;fileName&quot;: &quot;Server.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.Server&quot;,
          &quot;methodName&quot;: &quot;handle&quot;,
          &quot;lineNumber&quot;: 349
        },
        {
          &quot;fileName&quot;: &quot;AbstractHttpConnection.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.AbstractHttpConnection&quot;,
          &quot;methodName&quot;: &quot;handleRequest&quot;,
          &quot;lineNumber&quot;: 452
        },
        {
          &quot;fileName&quot;: &quot;BlockingHttpConnection.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.BlockingHttpConnection&quot;,
          &quot;methodName&quot;: &quot;handleRequest&quot;,
          &quot;lineNumber&quot;: 47
        },
        {
          &quot;fileName&quot;: &quot;AbstractHttpConnection.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.AbstractHttpConnection&quot;,
          &quot;methodName&quot;: &quot;headerComplete&quot;,
          &quot;lineNumber&quot;: 884
        },
        {
          &quot;fileName&quot;: &quot;AbstractHttpConnection.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.AbstractHttpConnection$RequestHandler&quot;,
          &quot;methodName&quot;: &quot;headerComplete&quot;,
          &quot;lineNumber&quot;: 938
        },
        {
          &quot;fileName&quot;: &quot;HttpParser.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.http.HttpParser&quot;,
          &quot;methodName&quot;: &quot;parseNext&quot;,
          &quot;lineNumber&quot;: 634
        },
        {
          &quot;fileName&quot;: &quot;HttpParser.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.http.HttpParser&quot;,
          &quot;methodName&quot;: &quot;parseAvailable&quot;,
          &quot;lineNumber&quot;: 230
        },
        {
          &quot;fileName&quot;: &quot;BlockingHttpConnection.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.BlockingHttpConnection&quot;,
          &quot;methodName&quot;: &quot;handle&quot;,
          &quot;lineNumber&quot;: 66
        },
        {
          &quot;fileName&quot;: &quot;SocketConnector.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.server.bio.SocketConnector$ConnectorEndPoint&quot;,
          &quot;methodName&quot;: &quot;run&quot;,
          &quot;lineNumber&quot;: 254
        },
        {
          &quot;fileName&quot;: &quot;QueuedThreadPool.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.util.thread.QueuedThreadPool&quot;,
          &quot;methodName&quot;: &quot;runJob&quot;,
          &quot;lineNumber&quot;: 599
        },
        {
          &quot;fileName&quot;: &quot;QueuedThreadPool.java&quot;,
          &quot;className&quot;: &quot;org.seleniumhq.jetty7.util.thread.QueuedThreadPool$3&quot;,
          &quot;methodName&quot;: &quot;run&quot;,
          &quot;lineNumber&quot;: 534
        },
        {
          &quot;fileName&quot;: &quot;Thread.java&quot;,
          &quot;className&quot;: &quot;java.lang.Thread&quot;,
          &quot;methodName&quot;: &quot;run&quot;,
          &quot;lineNumber&quot;: 745
        }
      ]
    }
  }
  </code></pre>
  <p>UPD: tried also selenium 2.47.0 and 2.46.0 (with gem 2.46.1) -- can't degrade further, because don't know how to degrade Firefox on CentOS.</p>
  <p>UPD: added logging remote http requests and omitted custom profile creation -- still fails right after this:</p>
  <pre><code>12:37:25.906    post        {&quot;desiredCapabilities&quot;:{&quot;browserName&quot;:&quot;firefox&quot;,&quot;version&quot;:&quot;&quot;,&quot;platform&quot;:&quot;ANY&quot;,&quot;javascriptEnabled&quot;:true,&quot;cssSelectorsEnabled&quot;:true,&quot;takesScreenshot&quot;:true,&quot;nativeEvents&quot;:false,&quot;rotatable&quot;:false}}
  </code></pre>