...
Expand |
---|
Code Block |
---|
[root@localhost ~]# oc new-app magnolia-1 --name magnoliax
W0419 07:05:16.233491 28843 newapp.go:480] Could not find an image stream match for "magnolia-1:latest". Make sure that a Docker image with that tag is available on the node for the deployment to succeed.
--> Found Docker image bdd1731 (18 hours old) from for "magnolia-1:latest"
* This image will be deployed in deployment config "magnoliax"
* Port 8080/tcp will be load balanced by service "magnoliax"
* Other containers can access this service through the hostname "magnoliax"
* WARNING: Image "magnolia-1:latest" runs as the 'root' user which may not be permitted by your cluster administrator
--> Creating resources ...
deploymentconfig "magnoliax" created
service "magnoliax" created
--> Success
Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
'oc expose svc/magnoliax'
Run 'oc status' to view your app.
[root@localhost ~]# oc expose svc/magnoliax
route "magnoliax" exposed
[root@localhost ~]# oc get routes
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
magnoliaauthor magnoliaauthor-default.139.162.131.60.nip.io magnoliaauthor 8080-tcp None
magnoliax magnoliax-default.139.162.131.60.nip.io magnoliax 8080-tcp None
[root@localhost ~]# |
|
Troubleshooting
If for some reason your app is not running, you can check the logs, by pod name:
Expand |
---|
Code Block |
---|
[bandersen@li1397-60 docker]$ oc get pod --all-namespaces -o wide
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE
default docker-registry-1-p9fc8 1/1 Running 0 20h 172.17.0.5 localhost
default magnoliaauthor-1-build 0/1 Completed 0 19h 172.17.0.2 localhost
default magnoliaauthor-2-build 0/1 Completed 0 19h 172.17.0.2 localhost
default magnoliaauthor-2-djlpt 1/1 Running 0 19h 172.17.0.2 localhost
default magnoliax-1-deploy 0/1 Error 0 35m 172.17.0.3 localhost
default persistent-volume-setup-68t4w 0/1 Completed 0 20h 172.17.0.3 localhost
default router-1-hpvfq 1/1 Running 0 20h 139.162.131.60 localhost
openshift-web-console webconsole-7dfbffd44d-mfzt8 1/1 Running 0 20h 172.17.0.4 localhost
[bandersen@li1397-60 docker]$ oc logs magnoliax-1-deploy
--> Scaling magnoliax-1 to 1
error: update acceptor rejected magnoliax-1: pods for rc 'default/magnoliax-1' took longer than 600 seconds to become available
[bandersen@li1397-60 docker]$ |
|