kuleuven/jenkins-mattermost-plugin

Test Connection Failure - Couldn't find the channel

charleschu-cc opened this issue · 5 comments

Hi,
I am trying to setup Jenkins Hook for Mattermost. But, failed at Test Connection with the following error.

Pls help.

Jenkins log

Nov 02, 2016 4:46:54 PM INFO jenkins.plugins.mattermost.StandardMattermostService publish
Posting succeeded
Nov 02, 2016 4:46:55 PM INFO jenkins.plugins.mattermost.StandardMattermostService publish
Posting: to im1kxtoxmpn1zkfb6yi8w81mmr@http://<host>:<port>/hooks/4hysn9qnntdhxruc936hp4amhr: Mattermost/Jenkins plugin: you're all set! (parameters: endpoint='http://<host>:<port>/hooks/4hysn9qnntdhxruc936hp4amhr', room='im1kxtoxmpn1zkfb6yi8w81mmr', icon='null', buildServerUrl='null') (good)
Nov 02, 2016 4:46:55 PM WARNING jenkins.plugins.mattermost.StandardMattermostService publish
Mattermost post may have failed. Response: <html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx</center>
</body>
</html>

Mattermost log

[2016/11/02 16:47:49 SGT] [EROR] /hooks/4hysn9qnntdhxruc936hp4amhr:incomingWebhook code=500 rid=6isnpz1ucp8yznn7iad3oep9ue uid= ip=10.92.142.70 Couldn't find the channel [details: err=store.sql_channel.get_by_name.missing.app_error]

It would seem you are specifying the wrong room name. im1kxtoxmpn1zkfb6yi8w81mmr is a weird name for a room...

This is the channel id from Channel Info. Tried using the Channel Name of "Town Square". Same failure.

That issue you referred to is only when sending to a user directly (private message). I'm not sure anymore how to specify channels with spaces and I'm not with laptop now - could you try with:

  • A different channel without spaces in it
  • Use dashes instead of the spaces, eg. town-square. The # in front should not be relevant.

Found the issue. Have to substitute spaces with "-". E.g. "town-square".

Thanks for helping!