title: Creating a connection using grpc between a python server and an android(java) client
body: <p>I am running a simple GRPC server on python on my local machine.
  When I'm trying to connect to it, using java, from my android device, i keep getting the <code>Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE</code> error.
  Note that i tried to connect to the server, via a python client and it worked as expected.
  The problem only stands when using a java client.</p>
  
  <p>I have tried to use a client in python to check whether the proto files where the problem, and it worked correctly, so i believe the problem is with the connection between the <em>python</em> server and <em>java</em> client combination.</p>
  
  <pre class="lang-java prettyprint-override"><code>    private ManagedChannel mChannel;
      private TestGrpc.TestBlockingStub blockingStub;
      private TestGrpc.TestStub asyncStub;
  
      mChannel = ManagedChannelBuilder.forAddress("10.0.0.17", 50051).build();
      blockingStub = TestGrpc.newBlockingStub(mChannel);
      helloMessage testMessage = helloMessage.newBuilder()
      .setMessageContent("NAME")
      .build();
      helloMessage msg= blockingStub.sayHello(testMessage);
  
  </code></pre>
  
  <p>proto file:</p>
  
  <pre><code>syntax="proto3";
  option java_package = "io.grpc.testing";
  option java_multiple_files = true;
  option java_outer_classname = "TestClass";
  option objc_class_prefix = "TST ";
  
  package TestCode;
  
  service Test{
      rpc sayHello(helloMessage) returns (helloMessage) {}
      rpc streamTest(helloMessage) returns (stream helloMessage) {}
  }
  
  message helloMessage{
      string messageContent = 1;
  }
  </code></pre>
  
  <p>python server</p>
  
  <pre class="lang-py prettyprint-override"><code>import protofile_pb2
  import protofile_pb2_grpc
  
  
  # create a class to define the server functions, derived from
  # calculator_pb2_grpc.CalculatorServicer
  class TestService(protofile_pb2_grpc.TestServicer):
  
      # calculator.square_root is exposed here
      # the request and response are of the data type
      # calculator_pb2.Number
      def sayHello(self, request, context):
          response = protofile_pb2.helloMessage()
          response.messageContent = "hello mister "+request.messageContent
          return response
  # create a gRPC server
  server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
  
  # use the generated function `add_CalculatorServicer_to_server`
  # to add the defined class to the server
  protofile_pb2_grpc.add_TestServicer_to_server(
          TestService(), server)
  
  # listen on port 50051
  print('Starting server. Listening on port 50051.')
  server.add_insecure_port('[::]:50051')
  server.start()
  
  # since server.start() will not block,
  # a sleep-loop is added to keep alive
  try:
      while True:
          time.sleep(86400)
  except KeyboardInterrupt:
      server.stop(0)
  </code></pre>
  
  <p>This should return an iterator with one value, being the string:
  "hello mister NAME".
  actual result:
    <code>Caused by:io.grpc.StatusRuntimeException: UNAVAILABLE</code></p>