smarterclayton / openshift-go-cart

Go cartridge for OpenShift Origin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't run my web service

aeneasr opened this issue · comments

First of all, thank you for the great work :)

I'm trying to run a go web service on Openshift Origin (local environment). When creating the application, I always receive an error:

The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 54cf69e6653e8ab21500005f -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c5,c114' /bin/sh -c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255 .Last 10 kB of build output: Warning: Application 'web' server exists without a pid file. Use force-stop to kill. Repairing links for 1 deployments Building git ref 'master', commit 96532e0 First download, may take several minutes -----> Installing Go 1.4.1... done Installing Virtualenv... done Installing Mercurial... done Installing Bazaar... done -----> Running: go get -tags openshift ./... # github.com/ory-platform/uuid-server ./server.go:6: imported and not used: "flag" An error occurred executing 'gear postreceive' (exit code: 2) Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/openshift/54cf69e6653e8ab21500005f/go For more details about the problem, try running the command again with the '--trace' option.

Here are my settings:

goerror

The repository I'm using is: https://github.com/ory-platform/uuid-server.git

I have added the go cartridge to origin (I want every user to see the go cartridge when creating an application!) by doing:

> oo-admin-ctl-cartridge -c import -u https://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-go-cart
> oo-admin-ctl-cartridge -c import-node -u https://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-go-cart
> oo-admin-ctl-cartridge -c activate --ids smarterclayton-go-1.4.1

I've used both import and import-node, because I was unsure which of those is the right one for this task.

When I leave the repository field empty, the application gets created, but I don't understand how I can get my application running.

ping @tacurran

I've also tried to add the origin git repository as a remote to my local git repository of uuid-server by doing:

> git remote add openshift ssh://....openshift.local

After resolving merge issues I was able to push the codebase to the repository, but I only got "Hello world, ...". After removing web.go I got 503 Service Unavailable

My bad, unit tests didn't pass but I did not see that. Now everything works! :)