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

Re: Unable to access route: 503



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 Created with docker id a968c519e3e1
2:56:13 PM wordpress Started with docker id a968c519e3e1
2:56:11 PM wordpress Container image "wordpress" already present on machine
2:55:42 PM wordpress Started with docker id 6d87ac125688
2:55:41 PM wordpress Created with docker id 6d87ac125688
2:55:40 PM wordpress 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


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