title: Facebook\WebDriver Curl error thrown for http POST to /session with params: {"desiredCapabilities"} error
body: <p>I try using Selenium and Chromewebdriver with PHP Facebooks Webdriver on a Debian Jessie. I dont know but the Session will not start. </p>
  
  <p>I Installed Java SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode) and Selenium version: '3.9.1', revision: '63f7b50' and ChromeDriver (v2.9.248304). </p>
  
  <p>I i start Selenium with the call <code>java -Dwebdriver.chrome.driver/srv/www/XXXX/build/chromedriver -jar selenium-server-standalone-3.9.1.jar</code></p>
  
  <p>the result seems to be ok for me.</p>
  
  <blockquote>
    <p>06:42:17.240 INFO - Selenium build info: version: '3.9.1', revision:
    '63f7b50' 06:42:17.241 INFO - Launching a standalone Selenium Server
    on port 4444 2018-02-09 06:42:17.378:INFO::main: Logging initialized
    @498ms to org.seleniumhq.jetty9.util.log.StdErrLog 2018-02-09
    06:42:17.536:INFO:osjs.Server:main: jetty-9.4.7.v20170914, build
    timestamp: 2017-11-21T12:27:37-09:00, git hash:
    82b8fb23f757335bb3329d540ce37a2a2615f0a8 2018-02-09
    06:42:17.585:WARN:osjs.SecurityHandler:main:
    ServletContext@o.s.j.s.ServletContextHandler@3b0143d3{/,null,STARTING}
    has uncovered http methods for path: / 2018-02-09
    06:42:17.596:INFO:osjsh.ContextHandler:main: Started
    o.s.j.s.ServletContextHandler@3b0143d3{/,null,AVAILABLE} 2018-02-09
    06:42:17.642:INFO:osjs.AbstractConnector:main: Started
    ServerConnector@596c6acf{HTTP/1.1,[http/1.1]}{0.0.0.0:4444} 2018-02-09
    06:42:17.643:INFO:osjs.Server:main: Started @763ms 06:42:17.643 INFO -
    Selenium Server is up and running on port 4444</p>
  </blockquote>
  
  <p>If I run following PHP Code</p>
  
  <pre><code>try{
              $options = new ChromeOptions();
              $options-&gt;setBinary("/srv/www/XXXX/build/chromedriver");
              //$options-&gt;addArguments(["--headless", "--window-size=571,42"]);
  
                  /*webdriver.chrome.verboseLogging*/
  
              $caps = DesiredCapabilities::chrome();
              $caps-&gt;setCapability(ChromeOptions::CAPABILITY, $options);
              $caps-&gt;setPlatform("Linux");
              $host = 'http://localhost:4444/wd/hub/';
  
              $driver = RemoteWebDriver::create($host, $caps);
  
              $driver-&gt;get('http://www.ende.de/');
              $driver-&gt;quit();
  
          } catch (\Exception $e){
              echo $e-&gt;getMessage();
          }
  </code></pre>
  
  <p>As result i get</p>
  
  <blockquote>
    <p>Curl error thrown for http POST to /session with params:
    {"desiredCapabilities":{"browserName":"chrome","platform":"Linux","chromeOptions":{"binary":"/srv/www/XXXX/build/chromedriver","args":["--headless","--window-size=571,42"]}}}</p>
    
    <p>Operation timed out after 30001 milliseconds with 0 bytes received</p>
  </blockquote>
  
  <p>The Server Logs this</p>
  
  <blockquote>
    <p>2018-02-09 06:43:57.988:INFO:osjshC.ROOT:qtp1712536284-9:
    org.openqa.selenium.remote.server.WebDriverServlet-4501b7af:
    Initialising WebDriverServlet 06:43:58.109 INFO - Found handler:
    org.openqa.selenium.remote.server.commandhandler.BeginSession@5d018ae5
    06:43:58.117 INFO - /session: Executing POST on /session (handler:
    BeginSession) 06:43:58.247 INFO - Capabilities are: Capabilities
    {browserName: chrome, chromeOptions: {args: [--headless,
    --window-size=571,42], binary: /srv/www/XXXX/buil...}, platform: LINUX} 06:43:58.250 INFO - Capabilities {browserName:
    chrome, chromeOptions: {args: [--headless, --window-size=571,42],
    binary: /srv/www/XXXX/buil...}, platform: LINUX} matched
    class org.openqa.selenium.remote.server.ServicedSession$Factory
    (provider: org.openqa.selenium.chrome.ChromeDriverService) Starting
    ChromeDriver (v2.9.248304) on port 29459 [0.589][WARNING]: PAC support
    disabled because there is no system implementation Starting
    ChromeDriver (v2.9.248304) on port 9515 2018-02-09
    06:44:58.965:WARN:osjs.HttpChannel:qtp1712536284-9: /wd/hub/session
    java.lang.RuntimeException: org.seleniumhq.jetty9.io.EofException     at
    org.openqa.selenium.remote.server.ServletResponseWrappingHttpResponse.setContent(ServletResponseWrappingHttpResponse.java:91)
      at
    org.openqa.selenium.remote.server.ServletResponseWrappingHttpResponse.setContent(ServletResponseWrappingHttpResponse.java:83)
      at
    org.openqa.selenium.remote.server.commandhandler.ExceptionHandler.execute(ExceptionHandler.java:96)
      at
    org.openqa.selenium.remote.server.WebDriverServlet.handle(WebDriverServlet.java:258)
      at
    org.openqa.selenium.remote.server.WebDriverServlet.doPost(WebDriverServlet.java:161)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)     at
    org.openqa.selenium.remote.server.WebDriverServlet.service(WebDriverServlet.java:121)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)     at
    org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:860)
      at
    org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at
    org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)
      at
    org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
      at
    org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
      at
    org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
      at
    org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at
    org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at org.seleniumhq.jetty9.server.Server.handle(Server.java:530)  at
    org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:347)
      at
    org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:256)
      at
    org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
      at
    org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:102)
      at
    org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
      at
    org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
      at
    org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)    at
    org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
      at
    org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
      at java.lang.Thread.run(Thread.java:748) Caused by:
    org.seleniumhq.jetty9.io.EofException     at
    org.seleniumhq.jetty9.io.ChannelEndPoint.flush(ChannelEndPoint.java:292)
      at org.seleniumhq.jetty9.io.WriteFlusher.flush(WriteFlusher.java:429)
      at org.seleniumhq.jetty9.io.WriteFlusher.write(WriteFlusher.java:322)
      at
    org.seleniumhq.jetty9.io.AbstractEndPoint.write(AbstractEndPoint.java:372)
      at
    org.seleniumhq.jetty9.server.HttpConnection$SendCallback.process(HttpConnection.java:800)
      at
    org.seleniumhq.jetty9.util.IteratingCallback.processing(IteratingCallback.java:241)
      at
    org.seleniumhq.jetty9.util.IteratingCallback.iterate(IteratingCallback.java:224)
      at
    org.seleniumhq.jetty9.server.HttpConnection.send(HttpConnection.java:528)
      at
    org.seleniumhq.jetty9.server.HttpChannel.sendResponse(HttpChannel.java:783)
      at
    org.seleniumhq.jetty9.server.HttpChannel.write(HttpChannel.java:834)
      at org.seleniumhq.jetty9.server.HttpOutput.write(HttpOutput.java:234)
      at org.seleniumhq.jetty9.server.HttpOutput.write(HttpOutput.java:218)
      at org.seleniumhq.jetty9.server.HttpOutput.write(HttpOutput.java:535)
      at com.google.common.io.ByteStreams.copy(ByteStreams.java:108)  at
    org.openqa.selenium.remote.server.ServletResponseWrappingHttpResponse.setContent(ServletResponseWrappingHttpResponse.java:89)
      at
    org.openqa.selenium.remote.server.ServletResponseWrappingHttpResponse.setContent(ServletResponseWrappingHttpResponse.java:83)
      at
    org.openqa.selenium.remote.server.commandhandler.ExceptionHandler.execute(ExceptionHandler.java:96)
      at
    org.openqa.selenium.remote.server.WebDriverServlet.handle(WebDriverServlet.java:258)
      at
    org.openqa.selenium.remote.server.WebDriverServlet.doPost(WebDriverServlet.java:161)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)     at
    org.openqa.selenium.remote.server.WebDriverServlet.service(WebDriverServlet.java:121)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)     at
    org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:860)
      at
    org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at
    org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)
      at
    org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
      at
    org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
      at
    org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
      at
    org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at
    org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at org.seleniumhq.jetty9.server.Server.handle(Server.java:530)  at
    org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:347)
      at
    org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:256)
      at
    org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
      at
    org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:102)
      at
    org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
      at
    org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
      at
    org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)    at
    org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
      at
    org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
      at java.lang.Thread.run(Thread.java:748) Caused by:
    java.io.IOException: Broken pipe  at
    sun.nio.ch.FileDispatcherImpl.write0(Native Method)   at
    sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)   at
    sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)   at
    sun.nio.ch.IOUtil.write(IOUtil.java:65)   at
    sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)    at
    org.seleniumhq.jetty9.io.ChannelEndPoint.flush(ChannelEndPoint.java:270)
      at org.seleniumhq.jetty9.io.WriteFlusher.flush(WriteFlusher.java:429)
      at org.seleniumhq.jetty9.io.WriteFlusher.write(WriteFlusher.java:322)
      at
    org.seleniumhq.jetty9.io.AbstractEndPoint.write(AbstractEndPoint.java:372)
      at
    org.seleniumhq.jetty9.server.HttpConnection$SendCallback.process(HttpConnection.java:800)
      at
    org.seleniumhq.jetty9.util.IteratingCallback.processing(IteratingCallback.java:241)
      at
    org.seleniumhq.jetty9.util.IteratingCallback.iterate(IteratingCallback.java:224)
      at
    org.seleniumhq.jetty9.server.HttpConnection.send(HttpConnection.java:528)
      at
    org.seleniumhq.jetty9.server.HttpChannel.sendResponse(HttpChannel.java:783)
      at
    org.seleniumhq.jetty9.server.HttpChannel.write(HttpChannel.java:834)
      at org.seleniumhq.jetty9.server.HttpOutput.write(HttpOutput.java:234)
      at org.seleniumhq.jetty9.server.HttpOutput.write(HttpOutput.java:218)
      at org.seleniumhq.jetty9.server.HttpOutput.write(HttpOutput.java:535)
      at com.google.common.io.ByteStreams.copy(ByteStreams.java:108)  at
    org.openqa.selenium.remote.server.ServletResponseWrappingHttpResponse.setContent(ServletResponseWrappingHttpResponse.java:89)
      at
    org.openqa.selenium.remote.server.ServletResponseWrappingHttpResponse.setContent(ServletResponseWrappingHttpResponse.java:83)
      at
    org.openqa.selenium.remote.server.commandhandler.ExceptionHandler.execute(ExceptionHandler.java:96)
      at
    org.openqa.selenium.remote.server.WebDriverServlet.handle(WebDriverServlet.java:258)
      at
    org.openqa.selenium.remote.server.WebDriverServlet.doPost(WebDriverServlet.java:161)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)     at
    org.openqa.selenium.remote.server.WebDriverServlet.service(WebDriverServlet.java:121)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)     at
    org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:860)
      at
    org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at
    org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)
      at
    org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
      at
    org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
      at
    org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
      at
    org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
      at
    org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at
    org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at org.seleniumhq.jetty9.server.Server.handle(Server.java:530)  at
    org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:347)
      at
    org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:256)
      at
    org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
      at
    org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:102)
      at
    org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
      at
    org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
      at
    org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)    at
    org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
      at
    org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
      at java.lang.Thread.run(Thread.java:748)</p>
  </blockquote>
  
  <p>I don`t know whats wrong. I tried to install chrome but no effect. It is also not possible to start a chrome session though the Webinterface. I tried different Versions of Chromewebdriver and Selenium as well. Has anybody an idea what I am missing?</p>