Closed pdclxf closed 8 years ago
Hi,
I see there is no domain in the url - did you omit it or is it running locally? Did you do the 'curl' test from the server running jenkins?
Can you try and provide a channel in the settings?
Hi thanks for the reply, when i run 'curl' it is from the server which is running jenkins, there is an correct url included my host name/port, i just wipe it up here, as my company's security requests, i did tried to provide a channel too, but still no luck, may i know if i can debug it like to make it print out what user name/password/command it is running? Thanks again
You could change the source code, of course, but if you're not using ssl for communication between Jenkins and Mattermost, you could use tcpdump:
tcpdump -nnnn -i any port 8065
and then
tcpdump -A -nnnn -i any port 8065
First will just show tcp headers, second will show packet contents. The combination of request and response might give you a clue about context ...
There should not be any username or password, since that is inherent in the token (8g6y9awyjp...)
Can you see in the Mattermost logs? Sometimes there is something useful there ...
sorry no luck from Mattermost logs, it just has something like:
[2016/03/24 02:46:08 GMT] [DEBG] /api/v1/users/status [2016/03/24 02:46:16 GMT] [DEBG] /api/v1/users/status [2016/03/24 02:46:22 GMT] [DEBG] /api/v1/users/status [2016/03/24 02:46:29 GMT] [DEBG] /api/v1/users/status [2016/03/24 02:46:37 GMT] [DEBG] /api/v1/users/status
Just out of curiosity, which os are you running? Googling the error you get gives me lots of Microsoft results... If it's Linux, did you try the tcpdump?
Also, why are you using 1.4.0 and not 1.5.0?
Hi i updated it to version 1.5.0 but still no luck..same issue
and yes i am running on Linux, and the tcpdump is running fine, just don't know why only errors from my jenkins
I expect tcpdump to run fine itself, but what do you see as output :-)
Do you see the connections going out? Do you see them arriving at the Mattermost side?
Hi yes the tcpdump works fine as i can see the output on Mattermost, like this
webhook BOT 5 days ago Hello, this is some text. This is more text.
The output that you see on Mattermost is generated by Jenkins or by Curl?
it is by Curl, so far no successful connection between Jenkins and Mattermost i think
Are you using proxy configuration in Jenkins? Do you see outgoing connection on the Jenkins server (using tcpdump) to the Mattermost server?
hi i find this in the jenkins plugin "Note: the plugin uses the HTTP Proxy Configuration set in Plugin Manager. Fill the 'No Proxy Host' field if your Mattermost instance is hosted internally."
as my jenkins and my Mattermost are in the same internal network, i think we should no need Proxy, so may i ask where i should put this 'No Proxy Host' in ?
This is only relevant if you have configured proxy; find the configuration here:
Manage Jenkins > Manage Plugins > Advanced
yes i did have a proxy setup there, and i verify it is working, can connect to erternal network like "http://wiki.jenkins-ci.org/"
There should be a field 'No Proxy Host' where you can add your mattermost domain. You can verify by putting your mattermost url (withouth the hooks/* part) in "test url" field and testing before and after adding the domain.
ok i have did the No proxy host, and now the error from my jenkins is
INFO: Posting: to
may i ask if any idea on it ?
I think you now have to specify a channel...
Thanks a lot for all your great help, finally i find that with the "Endpoint", there is no need to specify "channel" in jenkins, i remove my "channel" information and keep it empty, it works fine, the test connection between my jenkins and mattermost is passed now, Cheers !
Great, I will then close this issue...! However, I don't understand how you put channel with endpoint?
Hi
Nice to meet you, today i am playing mattermost with my Jenkins, using Mattermost Notification Plugin version 1.4.0 But unlucky i find that's an access denied issue, appreciate that your advise
My incoming webhooks is OK, as when i run below command, it can shows the message curl -i -X POST -d 'payload={"text": "Hello, this is some text.\nThis is more text."}' http://:8065/hooks/8g6y9awyjpdq7d1aff7wfnhh8a
But after i did the config in Jenkins like below. it fails as of access denied Jenkins config: Endpoint:http://:8065/hooks/8g6y9awyjpdq7d1aff7wfnhh8a
Channel:
Build Server URL:http://:8080/
error: Mar 16, 2016 9:19:33 AM jenkins.plugins.mattermost.StandardMattermostService publish INFO: Posting: to icon: , on http://:8065/hooks/8g6y9awyjpdq7d1aff7wfnhh8a: Mattermost/Jenkins plugin: you're all set! (using ) good
Mar 16, 2016 9:19:33 AM jenkins.plugins.mattermost.StandardMattermostService publish
WARNING: Mattermost post may have failed. Response:
Mar 16, 2016 9:19:33 AM jenkins.plugins.mattermost.StandardMattermostService publish INFO: Posting succeeded