Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

"Failed to create hook" Exception #12

Closed
jsmestad opened this issue Dec 23, 2011 · 8 comments
Closed

"Failed to create hook" Exception #12

jsmestad opened this issue Dec 23, 2011 · 8 comments

Comments

@jsmestad
Copy link
Contributor

2011-12-23T22:28:50+00:00 heroku[router]: Error H13 (Connection closed without response) -> POST simple-stream-7761.herokuapp.com/_hubot/setup dyno=web.1 queue= wait= service= status=503 bytes=
2011-12-23T22:28:50+00:00 app[web.1]: ERROR: Janky::Error - Failed to create hook
2011-12-23T22:28:50+00:00 app[web.1]:          app janky
2011-12-23T22:28:50+00:00 app[web.1]:       method POST
2011-12-23T22:28:50+00:00 app[web.1]:   user_agent     
2011-12-23T22:28:50+00:00 app[web.1]:       params {"nwo"=>"veevachi/api", "{}"=>nil}
2011-12-23T22:28:50+00:00 app[web.1]:      session   {}
2011-12-23T22:28:50+00:00 app[web.1]:     referrer     
2011-12-23T22:28:50+00:00 app[web.1]:    remote_ip 50.16.26.166
2011-12-23T22:28:50+00:00 app[web.1]:   server_url #<URI::HTTP:0x00000003771ae8 URL:http://ci.veevachi.net/>
2011-12-23T22:28:50+00:00 app[web.1]: callback_url #<URI::HTTP:0x00000003771700 URL:http://simple-stream-7761.herokuapp.com/_builder>
2011-12-23T22:28:50+00:00 app[web.1]:       config "<?xml version='1.0' encoding='UTF-8'?>\n<project>\n  <actions/>\n  <name>430e2855fcb6aab5ed03eceff55916bd</name>\n  <logRotator>\n    <daysToKeep>-1</daysToKeep>\n    <numToKeep>-1</numToKeep>\n    <artifactDaysToKeep>-1</artifactDaysToKeep>\n    <artifactNumToKeep>-1</artifactNumToKeep>\n  </logRotator>\n  <keepDependencies>false</keepDependencies>\n  <properties>\n    <hudson.model.ParametersDefinitionProperty>\n      <parameterDefinitions>\n        <hudson.model.StringParameterDefinition>\n          <name>JANKY_SHA1</name>\n          <description></description>\n          <defaultValue></defaultValue>\n        </hudson.model.StringParameterDefinition>\n        <hudson.model.StringParameterDefinition>\n          <name>JANKY_ID</name>\n          <description></description>\n          <defaultValue></defaultValue>\n        </hudson.model.StringParameterDefinition>\n      </parameterDefinitions>\n    </hudson.model.ParametersDefinitionProperty>\n    <com.tikal.hudson.plugins.notification.HudsonN
2011-12-23T22:28:50+00:00 app[web.1]:          url http://simple-stream-7761.herokuapp.com/_hubot/setup?nwo=veevachi/api
2011-12-23T22:28:50+00:00 app[web.1]:      adapter Janky::JobCreator::HTTP
2011-12-23T22:28:50+00:00 app[web.1]: otificationProperty>\n      <endpoints>\n        <com.tikal.hudson.plugins.notification.Endpoint>\n          <protocol>HTTP</protocol>\n          <url>http://simple-stream-7761.herokuapp.com/_builder</url>\n        </com.tikal.hudson.plugins.notification.Endpoint>\n      </endpoints>\n    </com.tikal.hudson.plugins.notification.HudsonNotificationProperty>\n  </properties>\n  <scm class=\"hudson.scm.NullSCM\"/>\n  <assignedNode>master</assignedNode>\n  <canRoam>false</canRoam>\n  <disabled>false</disabled>\n  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>\n  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>\n  <triggers class=\"vector\"/>\n  <concurrentBuild>false</concurrentBuild>\n  <builders>\n    <hudson.tasks.Shell>\n      <command>\nif [ ! -d &quot;./.git&quot; ]; then\n  git init\n  git remote add origin git@github.com:veevachi/api\nfi\ngit fetch -q origin\ngit reset -q --hard $JANKY_SHA1\nif [ -f script/cibuild ]; then\n  script/cibuild\nelse\n  bundle in
2011-12-23T22:28:50+00:00 app[web.1]: stall --path vendor/gems --binstubs\n  bundle exec rake\nfi</command>\n    </hudson.tasks.Shell>\n  </builders>\n  <publishers/>\n  <buildWrappers/>\n</project>\n"
2011-12-23T22:28:50+00:00 app[web.1]:         name "430e2855fcb6aab5ed03eceff55916bd"
2011-12-23T22:28:50+00:00 app[web.1]:         repo "git@github.com:veevachi/api"
2011-12-23T22:28:50+00:00 app[web.1]: response_code "404"
2011-12-23T22:28:50+00:00 app[web.1]: 
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-9ba5f5057462/lib/janky/github.rb:55:in `hook_create'
2011-12-23T22:28:50+00:00 app[web.1]: response_body "{\"message\":\"Not Found\"}"
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-9ba5f5057462/lib/janky/repository.rb:125:in `setup_hook'
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-9ba5f5057462/lib/janky/repository.rb:117:in `setup'
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-9ba5f5057462/lib/janky/repository.rb:36:in `setup'
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-9ba5f5057462/lib/janky/hubot.rb:15:in `block in <class:Hubot>'
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `call'

This is the error I am getting with no authentication enabled at all on the Jenkins server. I have the Notification Plugin enabled as well. Advice?

@sr
Copy link
Contributor

sr commented Dec 24, 2011

Make sure the JANKY_GITHUB_USER user has write access to veevachi/api. Double check JANKY_GITHUB_PASSWORD as well.

@sr sr closed this as completed Dec 24, 2011
@sr
Copy link
Contributor

sr commented Dec 24, 2011

To clarify: this error is happening when trying to create the web hook using the GitHub API.

@toots
Copy link

toots commented Dec 29, 2011

I have exactly the same error. Since the issue is closed, is there a fix, or am I doing something wrong?

@jsmestad
Copy link
Contributor Author

@toots ensure that your GH user is an admin on the repo

@toots
Copy link

toots commented Dec 29, 2011

Yup, user has write access, env. variables are correctly set and I've tested with different repos, including one created by the user. Have your fixed you issue? What was going wrong?

@toots
Copy link

toots commented Dec 29, 2011

Hmm weird, I have just tested with another use and it worked.. First user was just created for tests, are there any restrictions on API access for user accounts?

@dpickett
Copy link

I'm actually experiencing the same issue. We have a client that has an old private user account. our janky instance is wired to an org member and the signature comes through on organization based private repo's. For the client's private user account, even though we have commit access, does not push a HTTP_X_HUB_SIGNATURE

The error occurs when trying to split that by my reading of logs

@TeresaP
Copy link

TeresaP commented Dec 1, 2017

@dpickett What was your solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants