I have a Problems with the new hooks introduced in v1.1
When I do a Hook over the curl command like shown in the example Incoming Webhooks, it all works great.
But when I let GitLab do the hook. It does not work.
Using CURL
curl -k -i -X POST -d 'payload={"text": "Hello, this is some text."}' https://mattermost.private.org/hooks/on4fee1tkiyydkifc1sx1u535o
HTTP/1.1 200 OK
Server: nginx/1.4.7
Date: Thu, 29 Oct 2015 11:33:23 GMT
Content-Type: text/plain
Content-Length: 2
Connection: keep-alive
X-Ratelimit-Limit: 10
X-Ratelimit-Remaining: 9
X-Ratelimit-Reset: 1
X-Request-Id: 657thq75ipr75c45p1p8acaquh
X-Version-Id: 1.1.0.1446116526
Mattermost ./platform log:
Oct 29 12:33:23 mattermost platform[1657]: [10/29/15 12:33:23] [DEBG] /hooks/on4fee1tkiyydkifc1sx1u535o
Using GitLab
I cant figure out how to crawl the HTTP request, so all I have is the production.log output of GitLab.
gitlab/production.log
Started GET "/td/game-prototype/hooks/32/test" for xxx.xxx.xxx.xxx at 2015-10-29 13:20:38 +0100
Processing by Projects::HooksController#test as HTML
Parameters: {"namespace_id"=>"td", "project_id"=>"game-prototype", "id"=>"32"}
Redirected to https://git.devcontrol.org/td/game-prototype/hooks
Completed 302 Found in 159ms (ActiveRecord: 9.8ms)
Started GET "/td/game-prototype/hooks" for xxx.xxx.xxx.xxx at 2015-10-29 13:20:38 +0100
Processing by Projects::HooksController#index as HTML
Parameters: {"namespace_id"=>"td", "project_id"=>"game-prototype"}
Completed 200 OK in 200ms (Views: 97.4ms | ActiveRecord: 14.8ms)
Mattermost ./platform log:
Oct 29 12:23:10 mattermost platform[1657]: [10/29/15 13:20:39] [EROR] /hooks/on4fee1tkiyydkifc1sx1u535o:incomingWebhook code=500 rid=crx48kysxjnz5xrydrt3qtih8y uid= ip=192.168.1.15 No text specified [details: ]
What I have tried
Disabling SSL
Serval DNS configurations ( I know, why bother, but I just wanted to be sure ).
There seems to be a bug that passes the travis-ci tests?? see: Home ā Travis-CI
This is a known issue that should be fixed in master (meaning it will be fixed in the 1.2 release coming up). GitLab and Slack send āattachmentsā with their outgoing webhooks which we donāt yet support.
The fix currently in for the 1.2 release will stop the incoming webhook from breaking when attachments are present (it will just use the plaintext) and itās on our roadmap to convert Slackās attachments to Markdown so that weāre 100% compatible
Hello,
Many thanks for your help, actually it was my fault, Iāve been too fast and missed the need of conversion from the slackās format to json. Credits to @jwilander :
Shouldnāt this be fixed with the 1.2 release? Iām still getting that error.
Maybe Iām doing it wrongā¦ Is there a guide on how to set up the hooks for GitLab yet?
Iām hosting Mattermost on a separate server but successfully use the GitLab Oauth authentication.
Having a similar error between Mattermost and Gitlab. Prior to upgrading to 8.5.1, the integration seemed to be working fine. After upgrading, every time the outgoing hook from Gitlab fires (testing or a real event), it throws up a 500 error. In sidekiq.log I see:
"error_message"=>"getaddrinfo: Name or service not known", "error_class"=>"SocketError"
Followed by:
WARN: SocketError: getaddrinfo: Name or service not known
dig shows that address resolution is working OK, and curl posts out to Mattermost successfully, so Iām not sure whatās throwing the error.
EDIT: More information from production.log
Started GET "/testingroup/mattermost/services/slack/test" for 127.0.0.1 at 2016-02-26 11:37:36 -0500
Processing by Projects::ServicesController#test as HTML
Parameters: {"namespace_id"=>"testingroup", "project_id"=>"mattermost", "id"=>"slack"}
Completed 500 Internal Server Error in 137ms (ActiveRecord: 5.6ms)
SocketError (getaddrinfo: Name or service not known):
app/models/project_services/slack_service.rb:101:in `execute'
app/models/service.rb:106:in `test'
app/controllers/projects/services_controller.rb:49:in `test'
Are you able to provide the server logs with the errors? We have the Jira integration running on our own instance and it seems to work fine.
Can you also provide me with some extra information on how youāre using the Jira integration? It might be different than how we do it, hence us not noticing any issues
Is this the only integration you have running? Maybe try setting up a different one to test if that works. If Mattermost works with a different integration the issue could be on the GitLab side or a specific problem with the GitLab integration itself (maybe a change in GitLab broke the integration).
If you donāt have the latest version of the integration you might be able to get it here. You can also open an issue there to see if anyone else is having your problem.
Thanks @jwilander. I set up mattertee just to make sure that things are working correctly that way, so Iām pretty sure this issue is on the Gitlab side. Again, thanks for your help!
You will need some sort of immediate translator between TFS and Mattermost. Mattermost webhooks must be formatted as described here in our documentation.
Iām not overly familiar with TFS but I imagine the format of their outgoing webhooks does not match the format of our incoming webhooks (this is normal between any practically any two products), hence the need for some intermediate application to act as a translator.
Yeah, thatās what I figured. Iām writing a little node server on the same linux box to receive the hook and pass it along with a ātextā property.