-
Notifications
You must be signed in to change notification settings - Fork 229
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
Adapter does not connect with https #95
Comments
It is trying to connect to |
Sorry for my ambigous description. We are using a full hostname like 'https://rocktchat.host.tld'. |
For our also same problem, but we are not going on ecure layer only http for now. but logs are stopping after the
But when i examined the code i have seen that after success full login it want to log message
at this line So, it means its not connecting and i dont think the problem is with https or http. |
But when ping the hubot instance ( im using docker here ) with the rocket url (http://rocket.invizoserver.com:80 in my case) it working. |
Make sure you try 0.15.0 for server. Use adapter 0.0.25 if you must use older servers. |
Im using bot latest ones to get the latest updates as well. is both latest version are compatible or not. indirectly im using both develop branches. |
the bot adapter is an npm module - https://www.npmjs.com/package/hubot-rocketchat - latest is 0.0.27 should work with the lastest release 0.15.0 of the server - https://rocket.chat/releases/ if you don't need LDAP - you can try using npm module 0.0.25 for maximum compatibility |
From hubot-rocker modules's package.json i have
And from rocket chat server, im getting the code for develop. But still not working ... |
Please try using "0.0.25" for the npm |
But im using the normal username and password authentication . Any way i will give it a try. |
Precisely. You want the older version. Sent from Yahoo Mail on Android On Thu, Jan 28, 2016 at 9:00 AM, Pavan kumarnotifications@github.com wrote: — |
@honnel - please close this if it is working for you. Thanks. |
No, I have tried with versions 0.0.24,0.0.25,0.0.26 but not getting that successful message. |
Come over to https://demo.rocket.chat/support so one of us can get you up and running. Hundreds of others are using the same adapter every day. |
Hi @TheReal1604 , First thing im installing it using the docker, and I changed env to just domain name without schema or port but its not working, but when im diggin in to that i just tries a curl command on rocketchat-hubot container
Im getting the response
So it means that rocketchat container is running well and api also working. this is the info i can share with you. |
Finally i got it, it is working only when I set the environment |
Hi @honnel , just check with environment Dev to true |
Thanks for all hints. I have tried version 0.0.27 and 0.0.25 in Combination with/without The different quoting does not make sense to me cause printenv shows the environment variable allways without any quotes. I have also tried to hard code my url in For me the problem does look like it is based on any parameter passing error. |
I had not had any luck connecting over @honnel have you tried linking and using docker run -it \
-e ROCKETCHAT_URL="rocketchat:3000" \
-e ROCKETCHAT_ROOM='my-testing-channel' \
-e LISTEN_ON_ALL_PUBLIC=false \
-e ROCKETCHAT_USER=bot.user \
-e ROCKETCHAT_PASSWORD=secret \
-e ROCKETCHAT_AUTH=password \
-e BOT_NAME=mybot \
--link rocketchat:rocketchat \
rocketchat/hubot-rocketchat |
@mide with |
Guys, you do realise that the Rocket.Chat itself is unable to handle SSL, it only does it when behind a reverse proxy like NGINX (that actually does the SSL termination), right? So when you are trying to use SSL you are pointing to the host and port of NGINX/Apache and not Rocket.Chat, correct? |
@engelgabriel I do realize that. When I try to connect to the externally facing endpoint (so the traffic would be routed using HTTPS to NGINX and then passed from NGINX to Rocket.Chat via HTTP), it times out. The only way I've been successful is to bypass NGINX and connect directly via linked Docker containers. For example, this does not work:
|
Are you sure you can access the NGINX port from the other containers? Or is it only exposed externally? Did you do a CURL from the Hubot container to see the results? |
I will perform some extra debugging when I get back tonight. The port may
|
So I have a domain, 1) Connect via external HTTPS Domain, no Docker linking
This does not connect to RocketChat. And even more interesting, when I run 2) Linked to NGINX container and use HTTPS I haven't had a chance to test this case yet, my Nginx instance is currently not a Docker container. 3) Linked to RocketChat container and use HTTP
This is the solution I mentioned above, and it works great. I don't feel this is an appropriate longterm solution, but it's fine as a workaround. |
In case 1 , set URL to https://rocket.mydomain.com And AUTH to "password". <--- the actual literal |
@Sing-Li I have tried running the following, and it does not connect.
This is the output I get, it just hangs at the point you see. The bot does not join any rooms or respond to any messages.
|
Can you please put Chrome debugger on a browser, go to the https://rocket.mydomain.com, and see if the network tab shows a successful websocket upgrade? Thx |
Full disclosure: I'm not 100% on what I'm looking for here regarding websockets and switching protocols so please let me know if I can help and dig further. It looks like the websocket request returned a |
Looks okay. Click on it (the actual URL word-link |
@mide Did you fix the Nginx problem? |
Not yet; I hope to get to this over the next couple days. I've been out of the office for the last week, so I'll update this ASAP. |
@Sing-Li It looks like my Nginx configuration is correct. After some research, I am able to see activity on the Frames tab when inspecting the websocket. Since this is a change from before, I will re-run my tests tonight when I get home. |
Alright, sorry for the delay @Sing-Li - I've changed my configuration to use It hangs at the "connecting" step.
The only way I've managed to get this working remains using port |
I'm seeing this too. [When I first wrote this comment, I thought, but see below] it has to do with some people's ssl certificates being valid, but the CA they use is not being verified, possibly. Everything works fine in Chrome for me, including the CA and the websocket upgrade through nginx. But running hubot on the server does not work as in the issue above. When I use curl on that same server, it complains that the CA can not be verified. Using
So I suspect that I should be able to (on my centos 7 system) add my CA to Edit: So I've resolved all SSL issues on the server. curl connects just fine now without changing the above file, and server gets A+ on SSL tests. But still hubot will not connect. The nginx access log when hubot tries to connect is:
in a loop without advancing, whereas chrome correctly moves to the next step:
|
Hi, I think I'm having the same issue. I do get a websocket with live frames when going to the chat from the browser. However my bot is hanging at "Connecting". Any news on this ? |
Also having this issue. For those here I found a temporary solution. It only works if your bot is running on the same network as your rocket.chat image, set your rocket.chat url to http://192.168.5.43:3000 (your rocket chat static ip) |
I also found another way to do it: I use stunnel. I set the stunnel between localhost and the chat server and then connect the bot to localhost without https. It is also available on heroku, in case someone use this hosting service (through buildpacks). |
This fix/update should finally allow Whew! Please test and confirm asap. |
(Un)fortunately this also opens the floodgate to bots on demo and other public facing RC servers 😌 |
@Sing-Li Could you please outline the fix required specifically for hubot |
Im facing with this issue, my company host rocket chat on https, try adapter 0.1.4 and 1.0.12 but it not work, still connecting: export ROCKETCHAT_URL=https://chat.company.com |
Still facing this issue. can't connect the rocketchat with https://XXX.com. using adapter 2.0.0 |
I think the Readme file should be update, and add ROCKETCHAT_USESSL. |
Thanks. |
Hi,
I can't establish any connection to our Rocket.Chat Instance. I have tried following settings:
I have got following output:
I have prepared Rocket.Chat with an user
bot
and passwordbot
.Is there anything i have forgot to configure?
cheers honnel
The text was updated successfully, but these errors were encountered: