Android "Connect in X Seconds" message

Hello,

I have created a rocketchat server. This is also accessible in the browser and in the desktop application under Windows. Under Android, I can also sign up. But when I am logged in, the chats can not be displayed. There is only one timer running. The app tries to connect after expiration. However, I can easily open the preferences or my profile. Only the chats can not be displayed. I work with https://, but I also tried it with http://. Same effect. Does anyone have a solution?

Can no one help me? Please :heart:

Are you serious? No answers? Anyone there?

@Vogelmonster If you look into the issues of the Android repository, you will see that there’re tons of the solutions over there: https://github.com/RocketChat/Rocket.Chat.Android/issues/1116.

TLDR: You server doesn’t have WebSockets enabled, you should enabled it.

Thanks for the answer.
I have read this. However nobody writes there, how to activate WebSockets on lighttpd. Do you know how to enable WebSockets on lighttpd? Can you help me with this?

Let me bring one of our cloud experts here: @lucia.guevgeozian could you help us here please? :slight_smile:

Okay. Thank you for your help :blush:

Are there any news? I tried to solve the problem myself. Unfortunately without success so far :pensive:. I would really like to be able to use rocket chat on Android :grinning_face_with_smiling_eyes:

Search the interwebs for:

Lighthttpd websockets
Lighthttpd reverse proxy

I have already researched on the internet. I found some instructions. It does not work somehow. And I’ve already set up the reverse proxy. I just have to activate / install the WebSocket somehow. That’s why I ask here on the forum :blush:

As you can see you are in uncharted territory. No one that I know of in the community has used lighthttpd. If you want out of the box working. Check out nginx / apache2 and the many others in our docs.

Otherwise you’re kinda stuck to our guessing. Because we have no experience making Rocket.Chat work with lighthttpd.

Looks like you need to set up a block to do proxy and to add upgrade header

From what I can see you can proxy through to Rocket.Chat is something like this:

$HTTP["url"] =~ "^/" {
    proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => "3000" ) ) )
}

From what I can see here you have to specify the headers for the websocket. So maybe define another section to proxy the websocket path

$HTTP["url"] =~ "^/websocket" {
    setenv.add-request-header   = ( "Connection" => "Upgrade")
    setenv.add-response-header  = ( "Connection" => "Upgrade")
    proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => "3000" ) ) )
    proxy.header = ( "upgrade" => "enable")
}

Good luck!

1 Like

Many thanks for the answer!
It works partially.
If I do this here:

$HTTP["url"] =~ "^/websocket" {
    setenv.add-request-header   = ( "Connection" => "Upgrade")
    setenv.add-response-header  = ( "Connection" => "Upgrade")
    proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => "3000" ) ) )
    proxy.header = ( "upgrade" => "enable")
}

I do not notice any difference. Nothing happens.

What I noticed. When I connect to the local address “http://192.168.178.22:3000” it works! The chats are displayed. Also “http://mydomain.com:3000” works. There the chats are displayed as well.
“http://mydomain.com” works only partially. I can sign in, but no chats will show. I can also sign up under “https://mydomain.com”. The chats are not displayed there either.

I hope you can still help me :blush:

I’d recommend giving one of our documented methods a try. I’m afraid as mentioned before I have no experience with lighthttpd so I’d only be guessing.

You really need to search for

lighthttpd web sockets

Which says:

Notice

DEAD.
use lighttpd v1.4.46 or after w/ mod_proxy and mod_wstunnnel.

So you can follow it up from there.

If you get it working then post back for others who may try to use lighthttpd