Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run my web service #15

Closed
aeneasr opened this issue Feb 2, 2015 · 2 comments
Closed

Can't run my web service #15

aeneasr opened this issue Feb 2, 2015 · 2 comments

Comments

@aeneasr
Copy link

aeneasr commented Feb 2, 2015

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

@aeneasr
Copy link
Author

aeneasr commented Feb 2, 2015

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

@aeneasr
Copy link
Author

aeneasr commented Feb 2, 2015

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

@aeneasr aeneasr closed this as completed Feb 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant