<p>I have deployed a grpc service running on OpenShift Origin. And this backed by a OpenShift service. And the service is exposed with an OpenShift route. I am trying to make this pod available via a service and route that maps the container port (50051) to outside world on port 8080.</p>

<p>The image that the service is trying to expose has, in its Dockerfile:</p>

<pre><code>EXPOSE 50051
</code></pre>

<p>The route has the following:</p>

<ul>
<li>Service Port: 8080/TCP   </li>
<li>Target Port: 50051</li>
</ul>

<p>In the DeploymentConfig I specify the port with:</p>

<pre><code>ports:
 - containerPort: 50051
   protocol: TCP
</code></pre>

<p>However, when I try to access the application via the route and port, I get (from Java)</p>

<pre><code>java.net.NoRouteToHostException: No route to host
</code></pre>

<p>And when I try to telnet the service IP:</p>

<pre><code>telnet 172.30.197.247 8080
</code></pre>

<p>I am able to connect.</p>

<p>However, when I try to connect via the route it doesnt work:</p>

<pre><code>telnet my.route.com 8080
</code></pre>

<p>Trying ...
telnet: connect to address : Connection refused</p>

<p>When I use:</p>

<pre><code>curl -kv my-svc.myproject.svc.cluster.local:8080
</code></pre>

<p>I can connect.</p>

<p>So it seems the service is working but the route is not.</p>

<p>I have been going through the troubleshooting guide on <a href="https://docs.openshift.org/3.6/admin_guide/sdn_troubleshooting.html#debugging-the-router" rel="nofollow noreferrer">https://docs.openshift.org/3.6/admin_guide/sdn_troubleshooting.html#debugging-the-router</a></p>

<p>The router setups in OpenShift focus on <a href="https://docs.openshift.org/3.6/dev_guide/getting_traffic_into_cluster.html#using-a-router" rel="nofollow noreferrer">HTTP/HTTPS(SNI)/TLS(SNI)</a>. However it appears that you can use an <a href="https://docs.openshift.org/3.6/dev_guide/getting_traffic_into_cluster.html#using-externalIP" rel="nofollow noreferrer">externalIP</a> to expose non-web application ports from the cluster.  Because gRPC is an over the wire protocol, you might need to go this path.</p>
