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

Re: Unable to access route: 503





On Nov 26, 2015, at 10:58 AM, Fernando Lozano <flozano redhat com> wrote:

Hi Den,

Moving the discussion back to the list so others can check if I am talking nonsense ;-)

AFAIK OpenShift (and Kubernetes) APIs are not yet stable, and you are using a community project, so "official" does not means "guaranteed to work with latest release". Even more when it is an example, not needed for the product to work. It's is just the way things are: you have to be prepared for some troubleshooting and maybe even find some real bugs.

A note here.

The APIs themselves are stable and backwards compatible.  However, like any big project occasionally documentation lags reality.

The v1 API schema and operations are backwards compatible and stable for the foreseeable future.  We will only make backwards incompatible changes at major releases, and only after significant deprecation periods.  It is likely we will introduce v2, stabilize it, and then mark v1 deprecated over several years.

However, there are occasionally bugs that cause problems - the two primary examples so far have been validation of service ports (leading to the migration warning in ansible) and the last minute rename just prior to Kube 1.0 of the serviceAccount field on pods.  In both cases we take pains to ensure old clients and users are not affected, but no release is perfect.


I visited the openshift wordpress example on github and it looks like the last update was before Origin 1.0.8 but I never tried this project and don't know its assumptions. Note that the example uses a public DockerHub image, not an image created for openshift. Sometimes openshift strictier security means docker images won't work unchanged. I don't know about this particular wordpress image assumptions.

I see the README asks you to do things like changing a security context. Those are things I expect to change between Origin releases and there is room for human error. It is not like you tried a single command exactly as on the README and it failed.


[]s, Fernando Lozano


Thanks, but it's a sample app for openshift. And it was working for me a couple of weeks ago on OpenShift Origin 1.0.6 but now I'm working on Origin 1.0.8 and it's failing the whole time.
So I thought the app would be right because it's an 'official' example.


Subject: Re: Unable to access route: 503
To: dencowboy hotmail com
CC: users lists openshift redhat com
From: flozano redhat com
Date: Thu, 26 Nov 2015 13:12:13 -0200

Hi Den,

Everything looks fine from the OSE side. It is starting the pod. But the application inside the pod is failing. I have no wordpress expertise, I cannot help you there.

OSE provides an oc exec command so you can have a shell inside the pod and inspect whats happening there. Problem is most container images lack basic troubleshooting Unix commands.

Review the wordpress image documentation, problaby it has some prereq you did not provided.


[]s, Fernando Lozano


I've recreated the application and the restarts are happening immedialty:
2:56:13 PM wordpress Pod Created Created with docker id a968c519e3e1
2:56:13 PM wordpress Pod Started Started with docker id a968c519e3e1
2:56:11 PM wordpress Pod Pulled Container image "wordpress" already present on machine
2:55:42 PM wordpress Pod Started Started with docker id 6d87ac125688
2:55:41 PM wordpress Pod Created Created with docker id 6d87ac125688
2:55:40 PM wordpress Pod Pulled Successfully pulled image "wordpress"

And after curling my wordpress service gave nothing.
Aslo the curl to the IP of my wordpress pod gave nothing.

oc describe pod wordpress
Name:                wordpress
Namespace:           wordpress
Image(s):            wordpress
Node:                ip-.compute.internal/10.0.0.248
Start Time:            Thu, 26 Nov 2015 14:21:33 +0000
Labels:                name=wordpress
Status:                Running
Reason:               
Message:           
IP:                10.1.1.35
Replication Controllers:    <none>
Containers:
  wordpress:
    Container ID:    docker://2914c5875be62b16cf0b9481dfec317bd40190d669584d0a61be191f2410f165
    Image:        wordpress
    Image ID:        docker://9909dec6d65fb11547bb365510e39b1f5949b496ec83e0d29eaf6877e2528c2c
    QoS Tier:
      cpu:            BestEffort
      memory:            BestEffort
    State:            Running
      Started:            Thu, 26 Nov 2015 14:23:23 +0000
    Last Termination State:    Terminated
      Reason:            Error

      Exit Code:        1
      Started:            Thu, 26 Nov 2015 14:23:03 +0000
      Finished:            Thu, 26 Nov 2015 14:23:04 +0000
    Ready:            True
    Restart Count:        2
    Environment Variables:
      WORDPRESS_DB_USER:    wp_user
      WORDPRESS_DB_PASSWORD:    wp_pass
      WORDPRESS_DB_NAME:    wp_db
      WORDPRESS_DB_HOST:    mysql.wordpress.svc.cluster.local
Conditions:
  Type        Status
  Ready     True
Volumes:
  wordpress-persistent-storage:
    Type:    PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:    claim-wp
    ReadOnly:    false
  default-token-yr78u:
    Type:    Secret (a secret that should populate this volume)
    SecretName:    default-token-yr78u
Events:
  FirstSeen    LastSeen    Count    From                            SubobjectPath                Reason        Message
  ─────────    ────────    ─────    ────                            ─────────────                ──────        ───────
  3m        3m        1    {kubelet ip.compute.internal}    implicitly required container POD    Pulled        Container image "openshift/origin-pod:v1.0.8" already present on machine
  3m        3m        1    {scheduler }                                            Scheduled    Successfully assigned wordpress to ip.compute.internal
  3m        3m        1    {kubelet ip.compute.internal}    implicitly required container POD    Created        Created with docker id cf41200c0842
  3m        3m        1    {kubelet ip.compute.internal}    implicitly required container POD    Started        Started with docker id cf41200c0842
  3m        3m        1    {kubelet ip.compute.internal}    spec.containers{wordpress}        Pulling        pulling image "wordpress"
  2m        2m        1    {kubelet ip.compute.internal}    spec.containers{wordpress}        Pulled        Successfully pulled image "wordpress"
  2m        2m        1    {kubelet ip.compute.internal}    spec.containers{wordpress}        Started        Started with docker id 5480cd8a7ebf
  2m        2m        1    {kubelet ip.compute.internal}    spec.containers{wordpress}        Created        Created with docker id 5480cd8a7ebf
  1m        1m        1    {kubelet ip.compute.internal}    spec.containers{wordpress}        Created        Created with docker id 06d240d9bb37
  1m        1m        1    {kubelet ip.compute.internal}    spec.containers{wordpress}        Started        Started with docker id 06d240d9bb37
  1m        1m        1    {kubelet ip.compute.internal}    spec.containers{wordpress}        Backoff        Back-off restarting failed docker container
  1m        1m        2    {kubelet ip.compute.internal}    spec.containers{wordpress}        Pulled        Container image "wordpress" already present on machine
  1m        1m        1    {kubelet ip.compute.internal}    spec.containers{wordpress}        Created        Created with docker id 2914c5875be6
  1m        1m        1    {kubelet ip.compute.internal}    spec.containers{wordpress}        Started        Started with docker id 2914c5875be6



Subject: Re: Unable to access route: 503
To: users lists openshift redhat com
From: flozano redhat com
Date: Thu, 26 Nov 2015 11:42:01 -0200

Hi Den,


Two restarts from the wordpress pod smells trouble with the app itself.

Anyway you can check the service definition is correct by oc get pod and them oc describe pod wordpress-xxxx (whatever you see in oc get pod). Check if the pod has a label name=wordpress. I guess it should be ok as the service as one Endpoint.

10.1.0.11 should be your wordpress-xxxx pod IP address (from oc describe pod). Try to connect directly to that pod address, instead of the route. This should work from any node or from the master. You can use curl or elinks if you do not have GUI on those hosts.

If connecting directly to the pod works, try connecting to the service ip address (172.30.117.249)

Sorry I am giving only general troubleshooring steps, and sorry if those are already known to you.


[]s, Fernando Lozano


[centos ip]$ oc get pods
NAME        READY     STATUS    RESTARTS   AGE
mysql       1/1       Running   0          1d
wordpress   1/1       Running   2          1d



[centos ip]$ oc describe service wpfrontend
Name:            wpfrontend
Namespace:        wordpress
Labels:            name=wpfrontend
Selector:        name=wordpress
Type:            LoadBalancer
IP:            172.30.117.249
Port:            <unnamed>    5055/TCP
NodePort:        <unnamed>    32200/TCP
Endpoints:        10.1.0.11:80
Session Affinity:    None
No events.


From: philippe lafoucriere tech-angels com
Date: Thu, 26 Nov 2015 08:30:46 -0500
Subject: Re: Unable to access route: 503
To: dencowboy hotmail com
CC: flozano redhat com; users lists openshift redhat com

"No server available to handle the request."

Could you show your associated service?
Are you sure the pod are in a running state, without restarting repeatedly?
Finally, do you use readiness/liveness probes? (if your pods are running, but not considered as "ready", the LB won't use them, and therefore, "No server available to handle the request." :))


_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


_______________________________________________ users mailing list users lists openshift redhat com http://lists.openshift.redhat.com/openshiftmm/listinfo/users


_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

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