title: Protractor seleniumServerJar sets selenium address to http://192.168.0.20:<random-port>
body: <p>I'm trying to have Protractor start the standalone Selenium Server by setting the seleniumServerJar path according to <a href="https://github.com/angular/protractor/issues/116" rel="nofollow">this github issue</a>, but it starts the selenium server on a different address and port than if you start it with java -jar or with ./node_modules/protractor/bin/webdrivermanager start.</p>
  
  <p>Starting with java -jar /path/to/jar output:</p>
  
  <blockquote>
    <p>$ java -jar selenium-server-standalone-2.42.2.jar Jun 23, 2014
    10:28:25 PM org.openqa.grid.selenium.GridLauncher main INFO: Launching
    a standalone server 22:28:25.082 INFO - Java: Apple Inc. 20.65-b04-462
    22:28:25.082 INFO - OS: Mac OS X 10.9.3 x86_64 22:28:25.092 INFO -
    v2.42.2, with Core v2.42.2. Built from revision 6a6995d 22:28:25.146
    INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver
    registration is skipped: registration capabilities Capabilities
    [{platform=WINDOWS, ensureCleanSession=true, browserName=internet
    explorer, version=}] does not match with current platform: MAC
    22:28:25.197 INFO - RemoteWebDriver instances should connect to:
    <code>http://127.0.0.1:4444/wd/hub</code> 22:28:25.198 INFO - Version Jetty/5.1.x
    22:28:25.199 INFO - Started
    HttpContext[/selenium-server/driver,/selenium-server/driver]
    22:28:25.199 INFO - Started
    HttpContext[/selenium-server,/selenium-server] 22:28:25.199 INFO -
    Started HttpContext[/,/] 22:28:25.235 INFO - Started
    org.openqa.jetty.jetty.servlet.ServletHandler@7786df0f 22:28:25.235
    INFO - Started HttpContext[/wd,/wd] 22:28:25.240 INFO - Started
    SocketListener on 0.0.0.0:4444 22:28:25.240 INFO - Started
    org.openqa.jetty.jetty.Server@42698403</p>
  </blockquote>
  
  <p>Starting it with Protractor by specifying seleniumServerJar:</p>
  
  <blockquote>
    <p>$ ./node_modules/protractor/bin/protractor protractor_conf.js Starting
    selenium standalone server... Selenium standalone server started at
    <code>http://192.168.0.20:59959/wd/hub</code></p>
  </blockquote>
  
  <p>And then it hangs and times out.</p>
  
  <p>How does one properly start the standalone selenium server when specifying seleniumServerJar?</p>
  
  <p>Side note:  I have put the selenium-server.jar file in my project to make it easy to use relative paths according to aformentioned github issue.</p>
  
  <p>My protractor_conf.js:</p>
  
  <pre><code>    exports.config = {
      // Do not start a Selenium Standalone sever - only run this using chrome.
      //chromeOnly: true,
      //chromeDriver: '../node_modules/protractor/selenium/chromedriver',
  
      //we are using a standalone selenium server so give it the local address
      //seleniumAddress: 'http://0.0.0.0:4444/wd/hub',
      seleniumServerJar: './selenium-server-standalone-2.42.2.jar',
  
      // Capabilities to be passed to the webdriver instance.
      capabilities: {
          'browserName': 'phantomjs'
      },
  
      baseUrl: 'http://localhost:8000',
  
      onPrepare: function () {
          require('jasmine-reporters');
          var capsPromise = browser.getCapabilities();
          capsPromise.then(function (caps) {
              var browserName = caps.caps_.browserName.toUpperCase();
              var browserVersion = caps.caps_.version;
              var prePendStr = browserName + '-' + browserVersion + '-';
              jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter('test-results/protractor/', true, true, prePendStr));
          });
      },
  
      // Spec patterns are relative to the current working directly when
      // protractor is called.
      specs: ['test/protractor/**/*_spec.js'],
  
      // Options to be passed to Jasmine-node.
      jasmineNodeOpts: {
          showColors: true,
          isVerbose: true,
          defaultTimeoutInterval: 30000
      },
  
      params: {
          env: 'test'
      }
  };
  </code></pre>