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

500 error using smee trigger and bitbucket #157

Closed
sona1111 opened this issue Feb 4, 2020 · 4 comments
Closed

500 error using smee trigger and bitbucket #157

sona1111 opened this issue Feb 4, 2020 · 4 comments

Comments

@sona1111
Copy link

sona1111 commented Feb 4, 2020

  • Plugin version used.
    1.66
  • Jenkins version used.
    2.204.2

I am using bitbucket cloud and smee as described in this document: https://jenkins.io/blog/2019/01/07/webhook-firewalls/ . From what I understand, a 500 error is received when trying to post to the jenkins server. I have attached a fairly detailed log of the curl response provided by smee. Please let me know what other information I can gather to help debug this.

Thanks for taking a look!

smee_error2.txt

@tomasbjerre
Copy link
Contributor

And it works when using curl without smee?

Are you sure Jenkins is on 127.0.0.1:8080/ and not 127.0.0.1:8080/jenkins?

I dont see anything in the log proving that the plugin was actually invoked.

@tomasbjerre
Copy link
Contributor

@sona1111
Copy link
Author

sona1111 commented Feb 5, 2020

Hi @tomasbjerre , thank you for the follow up. I have tried the curl from the new issue screen. The server is on 8080 and not 8080/jenkins. :

curl -v -H "Content-Type: application/json" -X POST -d '{ "app":{ "name":"GitHub API", "url":"http://developer.github.com/v3/oauth/" }}' http://localhost:8080/generic-webhook-trigger/invoke?token=sometoken
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /generic-webhook-trigger/invoke?token=sometoken HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.58.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 79
> 
* upload completely sent off: 79 out of 79 bytes
< HTTP/1.1 404 Not Found
< Date: Wed, 05 Feb 2020 16:26:26 GMT
< X-Content-Type-Options: nosniff
< Content-Type: application/json;charset=utf-8
< Content-Length: 275
< Server: Jetty(9.4.z-SNAPSHOT)
< 
* Connection #0 to host localhost left intact
{"jobs":null,"message":"Did not find any jobs with GenericTrigger configured! If you are using a token, you need to pass it like ...trigger/invoke?token=TOKENHERE. If you are not using a token, you need to authenticate like http://user:passsword@jenkins/generic-webhook... "}

(I tried with a token too, and that worked fine to trigger my job)
So should I assume this is a smee error and report the bug to them?

Thank you anyway.

@sona1111
Copy link
Author

sona1111 commented Feb 5, 2020

Ok, I think I have found the same issue opened already here: probot/smee-client#116

Sorry to bother you!

@sona1111 sona1111 closed this as completed Feb 5, 2020
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

2 participants