Skip to content
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

Deploy a new hub server #1172

Open
oskarkrawczyk opened this issue Mar 1, 2020 · 28 comments
Open

Deploy a new hub server #1172

oskarkrawczyk opened this issue Mar 1, 2020 · 28 comments

Comments

@oskarkrawczyk
Copy link
Member

The old hub server is now down, which is why TogetherJS isn't working. Need to deploy a new working one for public use.

@Zibri
Copy link

Zibri commented Mar 4, 2020

just put one on glitch or repl.it

@Zibri
Copy link

Zibri commented Mar 4, 2020

or buy the cheapest VPS on OVH which costs $40/year and is more than enough for the hub server to run smoothly. https://www.ovh.com/world/vps/vps-ssd.xml

@Zibri
Copy link

Zibri commented Mar 4, 2020

another option is https://freeupload.net/
since you fit in the policies you can use that too!!

@oskarkrawczyk
Copy link
Member Author

Hosting is not an issue. Setting the while server up with the app is.

@Zibri
Copy link

Zibri commented Mar 5, 2020

Hosting is not an issue. Setting the while server up with the app is.

what do you mean? I have a hub up and running on repl.it with no problems. I set it up in 10 minutes.

@oskarkrawczyk
Copy link
Member Author

oskarkrawczyk commented Mar 5, 2020

I mean exactly what I wrote and you're fully aware of that. You just seem to be here to be a jerk, who will throw epithets and not provide a working solution anywhere.

@jsfiddle jsfiddle temporarily blocked Zibri Mar 5, 2020
@joeyguerra
Copy link

joeyguerra commented Mar 5, 2020

just offering my perspective here, I didn't get the impression that @Zibri was trying to come off as a jerk. Sometimes, it takes effort to convey good intent, takes time to craft the message. Perhaps if @Zibri just posted the link to the hub they set up, we could collaborate on it better?

@oskarkrawczyk
Copy link
Member Author

I don't take blocking users lightly, believe me. But I've seen this before, and it takes a firm hand to teach a community member to think twice how he comes off to a community that offers free tools and doesn't have to take attitude.

The user had 4 chances to be come off helpful in any way - ie, providing helpful resources, a link to the repl since he already had it working (such a simple thing to do).

@harshalgajjar
Copy link

harshalgajjar commented Mar 5, 2020

Just made a quick screen capture showing how to host the hub on Glitch, feel free to watch it:
https://youtu.be/dsMLaZH17t0

@joeyguerra
Copy link

@harshalgajjar that's awesome! Thank you so much for taking time to create a screen cast for this.

@oskarkrawczyk
Copy link
Member Author

oskarkrawczyk commented Mar 6, 2020

@harshalgajjar well done man, thanks a lot for taking the the time and throw this together 🤙🏻

From what I see the server works without the websocket-compat package, so that's good. I was previously completely focused on getting that package to work, which proven problematic, since it couldn't resolve deps.

The app is launched here: https://togetherjs-hub.glitch.me - hopefully this will be up until I can get the dedicated server Hub up and running.

In order to use a non-default hub, users need to add the hub URL to their code:

TogetherJSConfig_hubBase = "https://togetherjs-hub.glitch.me/"

People can fork the glitch code from this project: https://glitch.com/edit/#!/togetherjs-hub

@rachitpatel
Copy link

@harshalgajjar well done man, thanks a lot for taking the the time and throw this together 🤙🏻

From what I see the server works without the websocket-compat package, so that's good. I was previously completely focused on getting that package to work, which proven problematic, since it couldn't resolve deps.

The app is launched here: https://togetherjs-hub.glitch.me - hopefully this will be up until I can get the dedicated server Hub up and running.

In order to use a non-default hub, users need to add the hub URL to their code:

TogetherJSConfig_hubBase = "https://togetherjs-hub.glitch.me/"

People can fork the glitch code from this project: https://glitch.com/edit/#!/togetherjs-hub

@oskarkrawczyk done well, thank you!

@david95thinkcode
Copy link

Thanks @oskarkrawczyk , it works.

@dr-hc-solo
Copy link
Contributor

Thanks @oskarkrawczyk
Great work!

@peterweare
Copy link

I'm trying to setup a hub server on AWS but just cannot connect. any ideas? Seems to be refusing the connection all the time.

@joeyguerra
Copy link

Hard to tell without understanding the architecture that you've created. Can you provide a Container diagram? Or just describe the setup?

@peterweare
Copy link

Thanks for responding Joey - wasn't sure how active this github was...

I've created an EC2 t2.micro server running Apache and Node and given it a fixed IP address.

The server is also proxied though cloudflare

I've Cloned the togetherjs code onto the box and made some amendments to server.js to fix errors...

replaced:

var WebSocketServer = WEBSOCKET_COMPAT ?
  require("./websocket-compat").server :
  require("websocket").server;

with:
var WebSocketServer = require('websocket').server;

I can get the service running from the command line and listening to port 8080.

I've also setup my inbound rules on the AWS server to open up the appropriate ports:

inbound-rules

I've setup both HTTP and HTTPS ports as I've been trying both! (for HTTPS I've tried using stunnel and also modifying the server.js code ).

I seem to be getting either 'This site cannot be reached' errors - 404 or disallowed_url_scheme errors

I've tried lots of different HTTP/HTTPS calls and ports (8080/80/443/8443) but nothing seems to be getting through.

I'm sure it must be something simple I've missed - it can't be that difficult to get up and running ;-)

I was originally wondering if there were any issues with AWS and websocket messages as I undestand they have their own websocket API I'm sure Amazon would prefer we used.

Any pointers greatly appreciated!

Pete

@joeyguerra
Copy link

Thanks for that. My initial thought is AWS just recently add the ability for their Application Load Balancers to allow for the Websocket protocol. Is there an ALB proxing/fronting the EC2 instance that's running the together.js hub app?

@peterweare
Copy link

yes, i did see that - and had a little play wthe the load balancing. I noticed a few blog posts on socketio and people trying the load balancers for ws and wss . Maybe i need to spend more time playing with that. There does seem to be something strange about how AWS handles these types of messages. thanks Joey - i’ll report back soon!

@anthonylan
Copy link

Seems like https://togetherjs-hub.glitch.me/
isn't working either.

@joeyguerra
Copy link

joeyguerra commented Jun 28, 2020

@anthonylan Can you please elaborate? What are you seeing that indicates it's not working? Can you post the code used to configure the hub server? FYI, https://togetherjs-hub.glitch.me/status returns OK.

@peterweare
Copy link

peterweare commented Jul 1, 2020

Finally got round to having another go at setting up my own hub server on AWS Joey...and I've managed to get my server up and running! Yeah!! 2 issues i had:

  1. As expected, i needed to setup the Load Balancers properly on AWS. I deleted them and set the balancers up again as i must have has something set wrong
  2. i had forgotten to add the parameter -host 0.0.0.0 when running the TogetherJS hub to indicate an external host

Once i'd sorted those two things, all seems to be working fine - been up for a day or so, so looking good!

thanks for the pointers!

Pete

@joeyguerra
Copy link

@peterweare that's an awesome win. Thank you so much for posting that here. I wonder if there's a section in the docs to add your particular setup?

@joeyguerra
Copy link

which reminds me, should we mark this issue as solved/closed?

@peterweare
Copy link

peterweare commented Jul 2, 2020

i think so, there's a server up and running and there are the needed mods here to get your own up and running too. Think it needs to be closed by @oskarkrawczyk as they created it?

@pratik9722
Copy link

Audio chat is not working! How can we fix this

@peterweare
Copy link

peterweare commented Sep 23, 2020

yea - that's a real pain. I saw there was pull request to fix RTC #1169

I've applied that to an instance I had, but it has not fixed things for me. Have you tried that? Maybe I didn't deploy correctly for me - be good to see if it might work for you

@tsellios
Copy link

I've applied that to an instance I had, but it has not fixed things for me. Have you tried that? Maybe I didn't deploy correctly for me - be good to see if it might work for you

Have already tried to utilize this pull request but it is not working for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests