## Meta -
OS:  Linux
Selenium Version:  Selenium Grid Hub v.3.12.0

## Expected Behavior -
When I make a GET /wd/hub/sessions request on a node I get the following response:
```json
{"status":0,"value":[]}
```
If i would make this request to a hub I would expect a similar response.

## Actual Behavior -
When I make that same request to a hub I get the following error:
```json
{
    "sessionId": null,
    "status": 13,
    "value": {
        "class": "org.openqa.grid.common.exception.GridException",
        "error": "unknown error",
        "message": "Session [(null externalkey)] not available and is not among the last 1000 terminated sessions.\nActive sessions are[]",
        "stackTrace": [
            {
                "className": "org.openqa.grid.internal.ActiveTestSessions",
                "fileName": "ActiveTestSessions.java",
                "lineNumber": 120,
                "methodName": "getExistingSession"
            },
            {
                "className": "org.openqa.grid.internal.DefaultGridRegistry",
                "fileName": "DefaultGridRegistry.java",
                "lineNumber": 380,
                "methodName": "getExistingSession"
            },
            {
                "className": "org.openqa.grid.web.servlet.handler.RequestHandler",
                "fileName": "RequestHandler.java",
                "lineNumber": 241,
                "methodName": "getSession"
            },
            {
                "className": "org.openqa.grid.web.servlet.handler.RequestHandler",
                "fileName": "RequestHandler.java",
                "lineNumber": 123,
                "methodName": "process"
            },
            {
                "className": "org.openqa.grid.web.servlet.DriverServlet",
                "fileName": "DriverServlet.java",
                "lineNumber": 86,
                "methodName": "process"
            },
            {
                "className": "org.openqa.grid.web.servlet.DriverServlet",
                "fileName": "DriverServlet.java",
                "lineNumber": 64,
                "methodName": "doGet"
            },
            {
                "className": "javax.servlet.http.HttpServlet",
                "fileName": "HttpServlet.java",
                "lineNumber": 687,
                "methodName": "service"
            },
            {
                "className": "javax.servlet.http.HttpServlet",
                "fileName": "HttpServlet.java",
                "lineNumber": 790,
                "methodName": "service"
            },
            {
                "className": "org.seleniumhq.jetty9.servlet.ServletHolder",
                "fileName": "ServletHolder.java",
                "lineNumber": 860,
                "methodName": "handle"
            },
            {
                "className": "org.seleniumhq.jetty9.servlet.ServletHandler",
                "fileName": "ServletHandler.java",
                "lineNumber": 535,
                "methodName": "doHandle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.handler.ScopedHandler",
                "fileName": "ScopedHandler.java",
                "lineNumber": 143,
                "methodName": "handle"
            },
            {
                "className": "org.seleniumhq.jetty9.security.SecurityHandler",
                "fileName": "SecurityHandler.java",
                "lineNumber": 548,
                "methodName": "handle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.handler.HandlerWrapper",
                "fileName": "HandlerWrapper.java",
                "lineNumber": 132,
                "methodName": "handle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.handler.ScopedHandler",
                "fileName": "ScopedHandler.java",
                "lineNumber": 190,
                "methodName": "nextHandle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.session.SessionHandler",
                "fileName": "SessionHandler.java",
                "lineNumber": 1595,
                "methodName": "doHandle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.handler.ScopedHandler",
                "fileName": "ScopedHandler.java",
                "lineNumber": 188,
                "methodName": "nextHandle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.handler.ContextHandler",
                "fileName": "ContextHandler.java",
                "lineNumber": 1253,
                "methodName": "doHandle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.handler.ScopedHandler",
                "fileName": "ScopedHandler.java",
                "lineNumber": 168,
                "methodName": "nextScope"
            },
            {
                "className": "org.seleniumhq.jetty9.servlet.ServletHandler",
                "fileName": "ServletHandler.java",
                "lineNumber": 473,
                "methodName": "doScope"
            },
            {
                "className": "org.seleniumhq.jetty9.server.session.SessionHandler",
                "fileName": "SessionHandler.java",
                "lineNumber": 1564,
                "methodName": "doScope"
            },
            {
                "className": "org.seleniumhq.jetty9.server.handler.ScopedHandler",
                "fileName": "ScopedHandler.java",
                "lineNumber": 166,
                "methodName": "nextScope"
            },
            {
                "className": "org.seleniumhq.jetty9.server.handler.ContextHandler",
                "fileName": "ContextHandler.java",
                "lineNumber": 1155,
                "methodName": "doScope"
            },
            {
                "className": "org.seleniumhq.jetty9.server.handler.ScopedHandler",
                "fileName": "ScopedHandler.java",
                "lineNumber": 141,
                "methodName": "handle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.handler.HandlerWrapper",
                "fileName": "HandlerWrapper.java",
                "lineNumber": 132,
                "methodName": "handle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.Server",
                "fileName": "Server.java",
                "lineNumber": 530,
                "methodName": "handle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.HttpChannel",
                "fileName": "HttpChannel.java",
                "lineNumber": 347,
                "methodName": "handle"
            },
            {
                "className": "org.seleniumhq.jetty9.server.HttpConnection",
                "fileName": "HttpConnection.java",
                "lineNumber": 256,
                "methodName": "onFillable"
            },
            {
                "className": "org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback",
                "fileName": "AbstractConnection.java",
                "lineNumber": 279,
                "methodName": "succeeded"
            },
            {
                "className": "org.seleniumhq.jetty9.io.FillInterest",
                "fileName": "FillInterest.java",
                "lineNumber": 102,
                "methodName": "fillable"
            },
            {
                "className": "org.seleniumhq.jetty9.io.ChannelEndPoint$2",
                "fileName": "ChannelEndPoint.java",
                "lineNumber": 124,
                "methodName": "run"
            },
            {
                "className": "org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill",
                "fileName": "EatWhatYouKill.java",
                "lineNumber": 247,
                "methodName": "doProduce"
            },
            {
                "className": "org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill",
                "fileName": "EatWhatYouKill.java",
                "lineNumber": 140,
                "methodName": "produce"
            },
            {
                "className": "org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill",
                "fileName": "EatWhatYouKill.java",
                "lineNumber": 131,
                "methodName": "run"
            },
            {
                "className": "org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread",
                "fileName": "ReservedThreadExecutor.java",
                "lineNumber": 382,
                "methodName": "run"
            },
            {
                "className": "org.seleniumhq.jetty9.util.thread.QueuedThreadPool",
                "fileName": "QueuedThreadPool.java",
                "lineNumber": 708,
                "methodName": "runJob"
            },
            {
                "className": "org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2",
                "fileName": "QueuedThreadPool.java",
                "lineNumber": 626,
                "methodName": "run"
            },
            {
                "className": "java.lang.Thread",
                "fileName": "Thread.java",
                "lineNumber": 748,
                "methodName": "run"
            }
        ],
        "stacktrace": "org.openqa.grid.common.exception.GridException: Session [(null externalkey)] not available and is not among the last 1000 terminated sessions.\nActive sessions are[]\n\tat org.openqa.grid.internal.ActiveTestSessions.getExistingSession(ActiveTestSessions.java:120)\n\tat org.openqa.grid.internal.DefaultGridRegistry.getExistingSession(DefaultGridRegistry.java:380)\n\tat org.openqa.grid.web.servlet.handler.RequestHandler.getSession(RequestHandler.java:241)\n\tat org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:123)\n\tat org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:86)\n\tat org.openqa.grid.web.servlet.DriverServlet.doGet(DriverServlet.java:64)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:687)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:860)\n\tat org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)\n\tat org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595)\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)\n\tat org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)\n\tat org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)\n\tat org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564)\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)\n\tat org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1155)\n\tat org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.seleniumhq.jetty9.server.Server.handle(Server.java:530)\n\tat org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:347)\n\tat org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:256)\n\tat org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)\n\tat org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:102)\n\tat org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)\n\tat org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)\n\tat org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)\n\tat org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)\n\tat org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)\n\tat org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)\n\tat org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)\n\tat java.lang.Thread.run(Thread.java:748)\n"
    }
}
```

remote.addBrowser(GridTestHelper.getDefaultBrowserCapability(), 1);
    DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit();
    capabilities.setCapability(RegistrationRequest.SELENIUM_PROTOCOL,SeleniumProtocol.WebDriver);
    remote.addBrowser(capabilities, 1);
    remote.setRemoteServer(new SeleniumServer(remote.getConfiguration()));
    remote.startRemoteServer();
    remote.getConfiguration().timeout = -1;
    remote.sendRegistrationRequest();
    RegistryTestHelper.waitForNode(hub.getRegistry(), 1);
  }
  @Test
  public void browserOnWebDriver() {
    WebDriver driver = null;
    try {
      DesiredCapabilities caps = DesiredCapabilities.htmlUnit();
      driver = new RemoteWebDriver(hub.getWebDriverHubRequestURL(), caps);
      driver.get(hub.getConsoleURL().toString());
      assertEquals(driver.getTitle(), "Grid Console");
    } finally {
      if (driver != null) {
        driver.quit();
      }
    }
  }
  @After
  public void stop() {
    hub.stop();
  }
}