Hi,
I have been trying to deploy a simple go web app to bluemix. I noticed that the cf golang buildpack uses godeps to handle dependencies on push. To simplify things I took the go starter code and moved it into my GOPATH and called cf push
. it worked and ran on bluemix. Then I ran godep save
and tried another cf push
. the buildpack compiled and ran but failed to stage. Logs only tell me this: ERR Instance (index 0) failed to start accepting connections
Can anyone replicate this issue?
Gist of deploy steps: https://gist.github.com/clement360/f72354d9f9bad9a0ef24
Your unsuccessful push uses go 1.4.2 while the successful one uses go 1.3.3. Can you try again using "godep save" but with go 1.3.3 to rule out an go version issues?
good catch, it seems that godep save will update the Godep.json file to use 1.4.2, I ran Godep save and manually returned the version string to 1.3.3 and pushed again
`➜ laravelTester2 git:(master) ✗ cf push
Starting app laravelTester in org jstart / space MFCdev as mfclemen@us.ibm.com...
-----> Downloaded app package (20K)
Cloning into '/tmp/buildpacks/go-buildpack'...
Submodule 'compile-extensions' (https://github.com/cloudfoundry-incubator/compile-extensions.git) registered for path 'compile-extensions'
Cloning into 'compile-extensions'...
Submodule path 'compile-extensions': checked out '9f02e38433ca08c2e82cfec8844db9dd26acb336'
-------> Buildpack version 1.3.1
-----> Installing go1.3.3... done
-----> Running: godep go install -tags cloudfoundry ./...
-----> Uploading droplet (1.9M)
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down .......
Same result.
I tried it this morning can push the starter app after a godep save. Thinking of other suggestions, but nothing yet.
Answer by MichaelPeters (466) | Jun 24, 2015 at 10:57 AM
When you run "godep save" it's changing the ImportPath in Godeps.json because you put the app in a directory not named gohelloworld. The Procfile contains "web: gohelloworld" so there is a mismatch. You need to update Procfile with your directory name.
Thanks!! that solved it, is this documented somewhere? I would have never figured that out
About using GO with BlueMix 5 Answers
Do you function as the Go environment locally? 1 Answer
What else do I have to do to fix the "BuildpackCompileFailed" error? 1 Answer
Go app won't launch ("Failed to accept connections.") 1 Answer
How can I run applications written in Go Programming language in bluemix? 1 Answer