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

Hosting in cloud is not possible #5305

Closed
t-my opened this issue Sep 8, 2018 · 3 comments
Closed

Hosting in cloud is not possible #5305

t-my opened this issue Sep 8, 2018 · 3 comments
Labels
FAQ Instructions to fix problems server support Questions from users, help and support

Comments

@t-my
Copy link

t-my commented Sep 8, 2018

I tried to setup a server and I figured out that xmage requires that the address it binds to should be available in the physical interface.

I tried the the following:

VM in GCP with external IP.
DNS A record from xmage.strangled.net -> external IP (35.210.180.120).
sudo hostname xmage.strangled.net
config.xml: serverAddress=xmage.strangled.net
java -jar xmage-server.jar

Result:

real hostname and ip changed, xmage tries to bind to physical interface which is not available in this VM:

FATAL 2018-09-08 22:13:12,156 Failed to start server - xmage.strangled.net:8080/?serializationtype=jboss&maxPoolSize
=300   =>[main] Main.main
java.io.IOException: SocketServerInvoker[xmage.strangled.net:80] error creating ServerSocket[35.210.180.120:8080]: C
annot assign requested address (Bind failed)
        at org.jboss.remoting.transport.socket.SocketServerInvoker.createServerSockets(SocketServerInvoker.java:37
5)

This makes the server pretty much impossible to host in cloud environment like AWS, GCP or even Azure. Cloud platform manages external IP addresses outside the actual runtime, so the machine will have no information about the external IP.

Additionally, I realized that xmage uses the actual hostname of the machine and uses it to send it to the client that the client can then connect to the server. This is not acceptable in cloud environment. The address where the client connects must be configurable in the server to make this work.

@JayDi85
Copy link
Member

JayDi85 commented Sep 9, 2018

It's possible to use cloud services with ip-like hostnames (ip mapping service like http://nip.io). Look at that repositories for example config:

Tutorial for run xmage on DigitalOcean cloud service:

@JayDi85 JayDi85 added server support Questions from users, help and support labels Sep 9, 2018
@t-my
Copy link
Author

t-my commented Sep 9, 2018

Thanks, I needed 0.0.0.0 host.com in /etc/hosts. Works with any DNS A record

@JRHerlehy
Copy link
Member

If you need fixed IPs in something like AWS, you’ll need ENIs with EIPs.

Xmage is a bandwidth hog though, expect some crazy bills if you host on and of these providers and get any sort of player base on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FAQ Instructions to fix problems server support Questions from users, help and support
Projects
None yet
Development

No branches or pull requests

3 participants