[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Unable to access the app on All In one Vagrant for Openshift Origin



Hi All,

I am trying OpenShift Origin V3 "All in One Vagrant" and followed the document it refers.

The turbo app that comes along with it works fine from the browser on the host machine (using the browser addon).

Later, I created a simple C code which just listens on a port and reply Hello World. I deployed this app using a docker image and deployment is done fine. I am able to hit the URL of pod from within the Vagrant VM and am getting the reply to but I am not able to get the reply on the browser on the host machine. 

I added the route and also in the Vagrant file added the port forwarding statement (listening on port 15000).

Below is the describe of service and routes:

C:\openshift_paas\openshift-origin-v1.0.7-67bb208-windows-amd64>oc describe svc samplecserver
Name:                   samplecserver
Namespace:              samplecserver
Labels:                 app=samplecserver
Selector:               app=samplecserver,deploymentconfig=samplecserver
Type:                   ClusterIP
IP:                     172.30.15.137
Port:                   15000-tcp       15000/TCP
Endpoints:              172.17.0.10:15000
Session Affinity:       None
No events.


C:\openshift_paas\openshift-origin-v1.0.7-67bb208-windows-amd64>oc get routes
NAME            HOST/PORT         PATH      SERVICE         LABELS              TLS TERMINATION
samplecserver   www.example.com             samplecserver   app=samplecserver

Details of service

C:\openshift_paas\openshift-origin-v1.0.7-67bb208-windows-amd64> oc get svc samplecserver -o json
{
    "kind": "Service",
    "apiVersion": "v1",
    "metadata": {
        "name": "samplecserver",
        "namespace": "samplecserver",
        "selfLink": "/api/v1/namespaces/samplecserver/services/samplecserver",
        "uid": "2a35f5d2-925b-11e5-a55a-080027c5bfa9",
        "resourceVersion": "48715",
        "creationTimestamp": "2015-11-24T03:26:35Z",
        "labels": {
            "app": "samplecserver"
        },
        "annotations": {
            "openshift.io/generated-by": "OpenShiftNewApp"
        }
    },
    "spec": {
        "ports": [
            {
                "name": "15000-tcp",
                "protocol": "TCP",
                "port": 15000,
                "targetPort": 15000
            }
        ],
        "selector": {
            "app": "samplecserver",
            "deploymentconfig": "samplecserver"
        },
        "portalIP": "172.30.15.137",
        "clusterIP": "172.30.15.137",
        "type": "ClusterIP",
        "sessionAffinity": "None"
    },
    "status": {
        "loadBalancer": {}
    }
}

Routes:

C:\openshift_paas\openshift-origin-v1.0.7-67bb208-windows-amd64> oc get routes samplecserver -o json
{
    "kind": "Route",
    "apiVersion": "v1",
    "metadata": {
        "name": "samplecserver",
        "namespace": "samplecserver",
        "selfLink": "/oapi/v1/namespaces/samplecserver/routes/samplecserver",
        "uid": "a28bca94-925d-11e5-a55a-080027c5bfa9",
        "resourceVersion": "49013",
        "creationTimestamp": "2015-11-24T03:44:16Z",
        "labels": {
            "app": "samplecserver"
        }
    },
    "spec": {
        "host": "www.example.com",
        "to": {
            "kind": "Service",
            "name": "samplecserver"
        },
        "port": {
            "targetPort": "15000"
        }
    },
    "status": {}
}

I feel something very silly is missing somewhere but unable to find. Please help.

Thanks & Regards,
Suryaveer Singh Chauhan

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]