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

Re: OpenShift 3 Application Lifecycle Sample: Build of frontend fails



​Seems like the registry logs would in fact be useful since you're getting a 400 response on the push to the registry.​  I'm a bit puzzled as to why oc build-logs isn't working to view the logs, also, but that's (hopefully) a separate issue.

(I've added the mailing list back to this thread, please keep the thread public as other people may have suggestions, or may benefit from seeing the resolution)


On Thu, Oct 15, 2015 at 4:46 PM, Lorenz Vanthillo <lorenz vanthillo outlook com> wrote:
Thanks for the fast reply.
"When I'm trying a docker build (from s2I) it also fails with the same error." = doing: oc new-app github-url (source) (this github-url contains a dockerfile, so a docker build will take place).

This is the output of the docker logs:
[root ip-10-0-0-145 centos]# docker logs 605e217f9427
I1015 11:20:11.404620       1 sti.go:74] The value of ALLOWED_UIDS is [1-]
I1015 11:20:11.428244       1 docker.go:211] Image openshift/ruby-20-centos7 sha256:22b9a52f79a814145fa6b2e88f2e9dc6b013c88620cb46433a8bcf41c1f1e038 available locally
I1015 11:20:11.428307       1 sti.go:96] Creating a new S2I builder with build config: "Builder Name:\t\tRuby 2.0\nBuilder Image:\t\topenshift/ruby-20-centos7 sha256:22b9a52f79a814145fa6b2e88f2e9dc6b013c88620cb46433a8bcf41c1f1e038\nBuilder Image Version:\t004e164\nBuilder Base Version:\t71a650e\nSource:\t\t\thttps://github.com/openshift/ruby-hello-world.git\nOutput Image Tag:\t172.30.153.158:5000/test/origin-ruby-sample:latest\nEnvironment:\t\tOPENSHIFT_BUILD_NAME=ruby-sample-build-2,OPENSHIFT_BUILD_NAMESPACE=test,OPENSHIFT_BUILD_SOURCE=https://github.com/openshift/ruby-hello-world.git\nIncremental Build:\tdisabled\nRemove Old Build:\tdisabled\nForce Pull:\t\tdisabled\nQuiet:\t\t\tdisabled\nLayered Build:\t\tdisabled\nDocker Endpoint:\tunix:///var/run/docker.sock\n"
I1015 11:20:11.431135       1 docker.go:211] Image openshift/ruby-20-centos7 sha256:22b9a52f79a814145fa6b2e88f2e9dc6b013c88620cb46433a8bcf41c1f1e038 available locally
I1015 11:20:11.436296       1 sti.go:124] Preparing to build 172.30.153.158:5000/test/origin-ruby-sample:latest
I1015 11:20:11.461250       1 clone.go:30] Cloning sources and all GIT submodules into "/tmp/sti354233669/upload/src"
I1015 11:20:13.645668       1 docker.go:211] Image openshift/ruby-20-centos7 sha256:22b9a52f79a814145fa6b2e88f2e9dc6b013c88620cb46433a8bcf41c1f1e038 available locally
I1015 11:20:13.645695       1 docker.go:317] Image contains io.openshift.s2i.scripts-url set to 'image:///usr/libexec/s2i'
I1015 11:20:13.645714       1 download.go:57] Using image internal scripts from: image:///usr/libexec/s2i/assemble
I1015 11:20:13.645722       1 download.go:57] Using image internal scripts from: image:///usr/libexec/s2i/run
I1015 11:20:13.648478       1 docker.go:211] Image openshift/ruby-20-centos7 sha256:22b9a52f79a814145fa6b2e88f2e9dc6b013c88620cb46433a8bcf41c1f1e038 available locally
I1015 11:20:13.648498       1 docker.go:317] Image contains io.openshift.s2i.scripts-url set to 'image:///usr/libexec/s2i'
I1015 11:20:13.648514       1 download.go:57] Using image internal scripts from: image:///usr/libexec/s2i/save-artifacts
I1015 11:20:13.648522       1 sti.go:199] Using assemble from image:///usr/libexec/s2i
I1015 11:20:13.648530       1 sti.go:199] Using run from image:///usr/libexec/s2i
I1015 11:20:13.648534       1 sti.go:199] Using save-artifacts from image:///usr/libexec/s2i
I1015 11:20:13.648556       1 sti.go:132] Clean build will be performed
I1015 11:20:13.648560       1 sti.go:135] Performing source build from https://github.com/openshift/ruby-hello-world.git
I1015 11:20:13.648564       1 sti.go:145] Running S2I script in 172.30.153.158:5000/test/origin-ruby-sample:latest
I1015 11:20:13.648570       1 sti.go:345] Using image name openshift/ruby-20-centos7 sha256:22b9a52f79a814145fa6b2e88f2e9dc6b013c88620cb46433a8bcf41c1f1e038
I1015 11:20:13.648596       1 environment.go:52] Setting 'RACK_ENV' to 'production'
I1015 11:20:13.652431       1 docker.go:317] Image contains io.openshift.s2i.scripts-url set to 'image:///usr/libexec/s2i'
I1015 11:20:13.652449       1 docker.go:370] Base directory for STI scripts is '/usr/libexec/s2i'. Untarring destination is '/tmp'.
I1015 11:20:13.652458       1 docker.go:497] Creating container using config: {Hostname: Domainname: User: Memory:0 MemorySwap:0 CPUShares:0 CPUSet: AttachStdin:false AttachStdout:true AttachStderr:false PortSpecs:[] ExposedPorts:map[] Tty:false OpenStdin:true StdinOnce:true Env:[RACK_ENV=production OPENSHIFT_BUILD_NAME=ruby-sample-build-2 OPENSHIFT_BUILD_NAMESPACE=test OPENSHIFT_BUILD_SOURCE=https://github.com/openshift/ruby-hello-world.git] Cmd:[/bin/sh -c tar -C /tmp -xf - && /usr/libexec/s2i/assemble] DNS:[] Image:openshift/ruby-20-centos7 sha256:22b9a52f79a814145fa6b2e88f2e9dc6b013c88620cb46433a8bcf41c1f1e038 Volumes:map[] VolumesFrom: WorkingDir: MacAddress: Entrypoint:[] NetworkDisabled:false SecurityOpts:[] OnBuild:[] Mounts:[] Labels:map[]}
I1015 11:20:14.860316       1 docker.go:508] Attaching to container
I1015 11:20:14.862692       1 docker.go:514] Starting container
I1015 11:20:15.262985       1 docker.go:448] Waiting for container
I1015 11:20:16.068562       1 sti.go:407] ---> Installing application source ...
I1015 11:20:16.118354       1 sti.go:407] ---> Building your Ruby application from source ...
I1015 11:20:16.118377       1 sti.go:407] ---> Running 'bundle install --deployment' ...
I1015 11:20:21.188591       1 sti.go:407] Fetching gem metadata from https://rubygems.org/..........
I1015 11:20:23.129084       1 sti.go:407] Installing rake (10.3.2)
I1015 11:20:23.358571       1 sti.go:407] Installing i18n (0.6.11)
I1015 11:20:25.891156       1 sti.go:407] Installing json (1.8.3)
I1015 11:20:26.637388       1 sti.go:407] Installing minitest (5.4.2)
I1015 11:20:26.858672       1 sti.go:407] Installing thread_safe (0.3.4)
I1015 11:20:27.091648       1 sti.go:407] Installing tzinfo (1.2.2)
I1015 11:20:27.579563       1 sti.go:407] Installing activesupport (4.1.7)
I1015 11:20:27.766751       1 sti.go:407] Installing builder (3.2.2)
I1015 11:20:27.948786       1 sti.go:407] Installing activemodel (4.1.7)
I1015 11:20:28.164899       1 sti.go:407] Installing arel (5.0.1.20140414130214)
I1015 11:20:28.461737       1 sti.go:407] Installing activerecord (4.1.7)
I1015 11:20:31.130537       1 sti.go:407] Installing mysql2 (0.3.16)
I1015 11:20:31.989653       1 sti.go:407] Installing rack (1.5.2)
I1015 11:20:32.253175       1 sti.go:407] Installing rack-protection (1.5.3)
I1015 11:20:32.462309       1 sti.go:407] Installing tilt (1.4.1)
I1015 11:20:32.745830       1 sti.go:407] Installing sinatra (1.4.5)
I1015 11:20:33.061490       1 sti.go:407] Installing sinatra-activerecord (2.0.3)
I1015 11:20:33.061678       1 sti.go:407] Using bundler (1.3.5)
I1015 11:20:33.062451       1 sti.go:407] Your bundle is complete!
I1015 11:20:33.062463       1 sti.go:407] It was installed into ./bundle
I1015 11:20:33.080006       1 sti.go:407] ---> Cleaning up unused ruby gems ...
I1015 11:20:35.802295       1 docker.go:450] Container wait returns with 0 and <nil>
I1015 11:20:35.802324       1 docker.go:457] Container exited
I1015 11:20:35.802330       1 docker.go:536] Invoking postExecution function
I1015 11:20:35.802364       1 environment.go:52] Setting 'RACK_ENV' to 'production'
I1015 11:20:35.802392       1 docker.go:570] Committing container with config: {Hostname: Domainname: User: Memory:0 MemorySwap:0 CPUShares:0 CPUSet: AttachStdin:false AttachStdout:false AttachStderr:false PortSpecs:[] ExposedPorts:map[] Tty:false OpenStdin:false StdinOnce:false Env:[RACK_ENV=production OPENSHIFT_BUILD_NAMESPACE=test OPENSHIFT_BUILD_SOURCE=https://github.com/openshift/ruby-hello-world.git OPENSHIFT_BUILD_NAME=ruby-sample-build-2] Cmd:[/usr/libexec/s2i/run] DNS:[] Image: Volumes:map[] VolumesFrom: WorkingDir: MacAddress: Entrypoint:[] NetworkDisabled:false SecurityOpts:[] OnBuild:[] Mounts:[] Labels:map[io.openshift.build.commit.date:Wed Jul 29 14:28:21 2015 +0200 io.openshift.build.commit.id:65b3d6b io.openshift.build.commit.ref:master io.openshift.build.commit.message:Merge pull request #47 from voxik/patch-1 io.openshift.build.source-location:https://github.com/openshift/ruby-hello-world.git io.k8s.display-name:172.30.153.158:5000/test/origin-ruby-sample:latest io.openshift.build.image:openshift/ruby-20-centos7 sha256:22b9a52f79a814145fa6b2e88f2e9dc6b013c88620cb46433a8bcf41c1f1e038 io.openshift.build.commit.author:Jakub Hadvig <jhadvig redhat com>]}
I1015 11:20:56.802192       1 sti.go:265] Successfully built 172.30.153.158:5000/test/origin-ruby-sample:latest
I1015 11:20:56.832900       1 cleanup.go:23] Removing temporary directory /tmp/sti354233669
I1015 11:20:56.832916       1 fs.go:99] Removing directory '/tmp/sti354233669'
I1015 11:20:56.834902       1 sti.go:149] Using provided push secret for pushing 172.30.153.158:5000/test/origin-ruby-sample:latest image
I1015 11:20:56.834919       1 sti.go:151] Pushing 172.30.153.158:5000/test/origin-ruby-sample:latest image ...
F1015 11:21:19.507067       1 builder.go:54] Build error: Failed to push image: Error pushing to registry: Server error: unexpected 400 response status trying to initiate upload of test/origin-ruby-sample
[root ip-10-0-0-145 centos]#



From: bparees redhat com
Date: Thu, 15 Oct 2015 16:31:58 -0400
Subject: Re: OpenShift 3 Application Lifecycle Sample: Build of frontend fails
To: lorenz vanthillo outlook com
CC: users lists openshift redhat com


can you track down the builder container ("docker ps -a | grep origin-sti-builder") and see if you can run a "docker logs <containerid>" to get some details?

Also i'm not sure what you mean by this "When I'm trying a docker build (from s2I) it also fails with the same error.", s2i builds and docker builds are mutually exclusive (without getting into internal details and edge cases, anyway)

On Thu, Oct 15, 2015 at 3:59 PM, Lorenz Vanthillo <lorenz vanthillo outlook com> wrote:
I have OpenShift V3 installed with ansible. I have master with 2 nodes. I tried to create the 'OpenShift 3 Application Lifecycle Sample'. (I already did it on a project where OpenShift was running in a Docker container and it worked fine). Now it fails with the following error:
Couldn't create initial deployment: DeploymentConfig "frontend" is invalid: triggers[0].imageChange.tag: invalid value 'latest', Details: no image recorded for test/origin-ruby-sample:latest
The build fails so there isn't a deployment. There aren't build-logs because it looks there was no build. I thought the problem was accessing Docker Hub to get the image but I'm able to login on Docker from my console + I can pull the ruby-20-centos7-image manually.
The build+deploy of the database works fine. I have just the same problem with my cake-php-mysql-example. The database is also fine but the frontend fails with the same error. Even the cake-php example without database is failing. But it all works fine when I'm doing a s2i-build of a php-project in a gitrepo.
When I'm trying a docker build (from s2I) it also fails with the same error. So when I'm trying to create a docker image from a docker file (nginx in my case).
I don't know if it's useful to show the logs of the docker registry because I would think it wouldn't go till the docker registry because the error is much earlier. When I'm searching on appnames in the registry I don't find them so no logs.

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




--
Ben Parees | OpenShift




--
Ben Parees | OpenShift


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