Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
    • Tags

    OKD 3.10 Route issue

    Posted on

    I have created simple app in c/c++ and deployed in openshift. App is doing process count . I'm getting proper response using Cluster IP/Port. However when i expose this service i'm always getting 502 Bad Gateway response.

    -bash-4.2# oc get pod
    NAME                             READY     STATUS    RESTARTS   AGE
    temp-app-56bb4d4b4c-49bfw    1/1       Running   0          1d
    
    -bash-4.2# oc get route
    NAME                 HOST/PORT                                                         PATH      SERVICES       PORT      TERMINATION   WILDCARD
    temp-app-exposed-svc   temp-exposed-svc.router.default.svc.cluster.local             temp-app   1067                    None
    
    -bash-4.2# oc get svc
    NAME           TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)           AGE
    temp-app   ClusterIP   10.x.x.1             1067/TCP          1d
    
    --- CURL RESPONSE ---
    1) Using SVC Cluster IP/PORT
    
    -bash-4.2# curl -kv 10.x.x.1:1067
    * About to connect() to 10.x.x.1 port 1067 (#0)
    *   Trying 10.x.x.1...
    * Connected to 10.x.x.1 (10.x.x.1) port 1067 (#0)
    > GET / HTTP/1.1
    > User-Agent: curl/7.29.0
    > Host: 10.x.x.1:1067
    > Accept: */*
    >
    @RAMP: 1.x
    * Recv failure: Connection reset by peer
    * Closing connection 0
    curl: (56) Recv failure: Connection reset by peer
    
    2) Using Route/DNS Endpoint 
    -bash-4.2# curl -kv http://temp-exposed-svc.router.default.svc.cluster.local
    * About to connect() to temp-exposed-svc.router.default.svc.cluster.local port 80 (#0)
    *   Trying 10.x.x.x...
    * Connected to temp-exposed-svc.router.default.svc.cluster.local (10.x.x.x) port 80 (#0)
    > GET / HTTP/1.1
    > User-Agent: curl/7.29.0
    > Host: temp-exposed-svc.router.default.svc.cluster.local
    > Accept: */*
    >
    * HTTP 1.0, assume close after body
     HTTP/1.0 502 Bad Gateway
     Cache-Control: no-cache
     Connection: close
     Content-Type: text/html
    
    

    502 Bad Gateway

    The server returned an invalid or incomplete response. * Closing connection 0

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat