Open chrisi51 opened 4 years ago
Hmm, I'll try does this work.
so you mean it may be a bug which i can't fix on my own?
@chrisi51
Hey, take it easy. I'm in progress of testing does this work or not. I don't mean anything yet.
@chrisi51
Try this:
1) In your UCS instance, type this to see what is your UCS instance IP address:
sudo cat /etc/hosts
There you see something like this:
192.168.123.123 ucs-....
2) At Wekan board, change beginning of Outgoing Webhook URL from https://ucs-...
to that UCS IP address http://192.168.123.123/....
3) a) Set some Wekan board public, and copy from it avatar image URL of user. b) Or copy some other public image URL.
3) At RocketChat incoming webhook settings, at bottom CURL example, change:
https://ucs-....
to HTTP IP address http://192.168.123.123/....
"image_url":"/images/...png" to your Wekan avatar image URL like
http://example.com/something.png` Also set that API call as enabled slider blue.
4) Run that example REST API call
This is because there is problem with incorrect image URL in REST API call. This fix here does not work https://github.com/RocketChat/Rocket.Chat/issues/15494#issuecomment-562148180
5) Then at Wekan board create new card. It will show that activity as RocketChat channel message.
@chrisi51
Hey, take it easy. I'm in progress of testing does this work or not. I don't mean anything yet.
sorry that was an missunderstanding due to language barrier - don't wanted to stress you up :)
i tried to follow your explanation and i got it running but i dont really understand, whats happening here :) Is this a bug of rocketchat then?
seems to be really necessary to avoid domainnames and fall back to IP and also it seems to be necessary to give rocketchat an valid public image url of wekan - also with IP.
Thank you for your analysis and i hope that you keep up the good work :)
Yes, it's a bug in RocketChat. Having valid image URL in REST API call makes RocketChat webhook start working correctly.
Hmm, maybe I should check sometime, that if I add that image URL info to Wekan Outgoing Webhook JSON, does it start working immediately?
and do you have any idea why dns is not working in this context? both, wekan and rocketchat can resolve the dns of each other so why do i have to use ips with http instead of https with dns.
i've tried to bring it to work with dns but had no success :(
by the way, i iadded a ticket to put some more data to the outgoing webhook json: https://github.com/wekan/wekan/issues/3297 (dunno how to reference it)
@chrisi51
I think DNS does not work, because Wekan and RocketChat are inside of Docker containers in Docker network.
Same problem here. Rocket.Chat in docker, zabbix 5.4 in docker on the same machine.
00:00:00.001 [Debug] [ RocketChat Webhook ] Sending request: https://xxx/api/v1/chat.postMessage {"channel":"#zabbix","attachments":[{"collapsed":false,"color":"#97AAB3","title":"{ALERT.SUBJECT}","title_link":"{$ZABBIX.URL}/tr_events.php?triggerid={TRIGGER.ID}&eventid={EVENT.ID}","text":"{ALERT.MESSAGE}"}]}
00:00:00.095 [Debug] [ RocketChat Webhook ] Received response with status code 400 {"success":false,"error":"Invalid href value provided"}
00:00:00.096 [Warning] [ RocketChat Webhook ] ERROR: Request failed with status code 400: "Invalid href value provided". Check debug log for more information.
@matziu
Do you have Wekan installed? Is this related to Wekan at all?
It seems Zabbix is sending that webhook to RocketChat.
Sry, my mistake. I Have problem with zabbix and rocket.chat.
Sry :)
@matziu
Please add issue to Zabbix, I think it's a problem in what kind of JSON Zabbix does send to RocketChat. That JSON maybe should not have image_url
at all.
Also check does this workaround work https://github.com/wekan/univention/issues/15#issuecomment-706356696
And try does sending with curl from inside of Zabbix or RocketChat container work.
And check are Zabbix and RocketChat in same docker network.
Thank You, i solved my problem: https://www.zabbix.com/forum/zabbix-help/417916-error-sending-message-through-rocket-chat-webhook
Issue
Server Setup Information:
Problem description:
A bad HTTP response code (404) was received when fetching the script.
Uncaught (in promise) TypeError: Failed to register a ServiceWorker for scope ('https://xxxxxxxx/') with script ('https://xxxxxxxx/pwa-service-worker.js'): A bad HTTP response code (404) was received when fetching the script.
in jobs-ch:1GET https://wekan.a-o.intern/site.webmanifest 404 (Not Found)
in site.webmanifest:1Manifest: Line: 1, column: 1, Syntax error.
in site.webmanifest:1sudo docker logs wekan-app
? Please anonymize logs. no log entrys while changing cardsgeneral problem: I try to enable webhooks to send events from wekan to rocketchat. Both apps are running in a docker environment built by ucs.
What is working:
So i know, that wekan on its side is able to send data and rocketchat on its own side is able to receive, but for any reason wekan cant reach rocketchat.
I have no clue how to troubleshoot it. Where may i get an error or something like, to see why the webhook is not called or sent?
I discovered, that the ucs host was not able to nslookup rocketchat and wekan, so i've added dns entrys and this is working now. i also guess, there could be a problem with the internal ssl certs. Both apps got ssl certs by ucs and both apps should know the ucs CA, so there should not be a problem but potencially this can be a problem!?
hope u can bring me on the right train :)