origin: examples/sample-app fails to deploy

Hi,

I appear to be having the same issue as #3177 (which was closed, but I don’t see a concrete solution there).

I’ve gotten to step 12 in the README.md for the sample app:

[vagrant@ose1 sample-app]$ oc new-app application-template-stibuild.json
services/frontend
routes/route-edge
imagestreams/origin-ruby-sample
imagestreams/ruby-20-centos7
buildconfigs/ruby-sample-build
deploymentconfigs/frontend
services/database
deploymentconfigs/database
Service "frontend" created at 172.30.38.159 with port mappings 5432->8080.
A build was created - you can run `oc start-build ruby-sample-build` to start it.
Service "database" created at 172.30.204.146 with port mappings 5434->3306.
Run 'oc status' to view your app.

When I look in the web dashboard, I see that in ‘Browse’->‘events’, that there’s a ‘failedCreate’ on ‘deploymentConfig’ for the ‘frontend’. Here’s what oc describe dc frontend gives me:

[vagrant@ose1 sample-app]$ oc describe dc frontend
Name:       frontend
Created:    25 minutes ago
Labels:     template=application-template-stibuild
Latest Version: Not deployed
Triggers:   Image(origin-ruby-sample@latest, auto=true), Config
Strategy:   Rolling
          Pre-deployment hook (pod type, failure policy: Abort)
            Container:  ruby-helloworld
            Command:    /bin/true
            Env:    CUSTOM_VAR1=custom_value1
          Post-deployment hook (pod type, failure policy: Ignore)
            Container:  ruby-helloworld
            Command:    /bin/false
            Env:    CUSTOM_VAR2=custom_value2
Template:
            Selector:   name=frontend
            Replicas:   2
            Containers:
                NAME        IMAGE           ENV
                ruby-helloworld origin-ruby-sample  ADMIN_PASSWORD=k5DUMHrc,ADMIN_USERNAME=adminKYY,MYSQL_DATABASE=root,MYSQL_PASSWORD=srOM0GHr,MYSQL_USER=userBU3
Latest Deployment:  <none>
Events:
  FirstSeen             LastSeen            Count   From        SubobjectPath   Reason      Message
  Wed, 22 Jul 2015 09:08:43 +0000   Wed, 22 Jul 2015 09:33:28 +0000 14  {deployer }         failedCreate    Couldn't create initial deployment: DeploymentConfig "frontend" is invalid: triggers[0].imageChange.tag: invalid value 'latest': no image recorded for test/origin-ruby-sample:latest

I’m running the latest all-in-one release from here, in a CentOS7 virtual machine, with docker-1.6.2-14.el7.centos.x86_64.

I’m not sure if it’s relevant, but I’ve cloned the origin repo, and I’m dealing with the examples/sample-app directory at commit 6ce414638e372cf38fb82e95b327afcb989cc9d4.

Does anyone have any idea what could be wrong here? Thanks in advance.

Semi-related, in the same VM I’ve also run the openshift docker image instead of the all-in-one bundle, but the sample app fails for me at a different point there. From what I remember it was complaining that it was getting a ‘connection refused’ from github.com for the ruby-hello-world repo or something. I have a feeling that for some reason inside the container that was attempting this, github.com was resolving to 127.0.0.1 or something. I could be wildly wrong on this.

Edit: for this second issue with the origin docker image scenario, I believe I’ve managed to get this to work once, but I’m not able to get back to that state. Here’s the error that I usually hit:

[vagrant@ose3 ~]$ oc build-logs ruby-sample-build-1
E0722 16:36:20.196340       1 git.go:127] fatal: unable to connect to github.com:
E0722 16:36:20.197359       1 git.go:127] github.com[0: 127.0.0.1]: errno=Connection refused
E0722 16:36:20.197369       1 git.go:127] 
F0722 16:36:20.199618       1 builder.go:65] Build error: exit status 128

Doing a docker inspect on the failed build container shows the following under HostConfig:

"Dns": [
            "10.0.2.15",
            "8.8.8.8"
        ],

Again, I’m not sure if this is a dns issue.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 32 (28 by maintainers)

Most upvoted comments

@ibotty

The solution is setup of DNS.

If your OpenShift host is xxx.example.com, then setup DNS as

*.clooudapps.example.com 192.168.133.10

Do _NOT_ set as

*.example.com 192.168.133.10

Also, Do _NOT_ add search path clooudapps.example.com in your /etc/resolv.conf.

search example.com clooudapps.example.com

The doc of this part might help you - https://docs.openshift.org/latest/admin_guide/sdn_troubleshooting.html#debugging-pod-egress