geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Galen O'Sullivan (JIRA)" <>
Subject [jira] [Created] (GEODE-3555) Protobuf clients are rejected with an old-client-specific message.
Date Fri, 01 Sep 2017 20:53:00 GMT
Galen O'Sullivan created GEODE-3555:

             Summary: Protobuf clients are rejected with an old-client-specific message.
                 Key: GEODE-3555
             Project: Geode
          Issue Type: Bug
          Components: messaging
            Reporter: Galen O'Sullivan
             Fix For: 1.3.0

If the number of client connections is above the configured maximum, new client connections
will be rejected with a message that is meant for old clients and, to them, is unintelligible.

This can be seen with the following test added to {{RoundTripCacheConnectionJUnitTest}}:
  public void testNewProtocolRespectsMaxConnectionLimit()
      throws IOException, InterruptedException {

    CacheFactory cacheFactory = new CacheFactory();
    Cache cache = cacheFactory.create();

    CacheServer cacheServer = cache.addCacheServer();
    final int cacheServerPort = AvailablePortHelper.getRandomAvailableTCPPort();

    AcceptorImpl acceptor = ((CacheServerImpl) cacheServer).getAcceptor();

    Socket[] sockets = new Socket[16];

    for (int i = 0; i < 16; i++) {
      Socket socket = new Socket("localhost", cacheServerPort);
      sockets[i] = socket;
      Awaitility.await().atMost(5, TimeUnit.SECONDS).until(socket::isConnected);

     try (Socket socket = new Socket("localhost", cacheServerPort)) {
       Awaitility.await().atMost(5, TimeUnit.SECONDS).until(socket::isConnected);
       OutputStream outputStream = socket.getOutputStream();
       assertEquals(-1, socket.getInputStream().read());

This can be traced to a call to {{          ServerHandShakeProcessor.refuse(socket.getOutputStream(),

This message was sent by Atlassian JIRA

View raw message