Skip to content

Hosting in cloud is not possible #5305

@t-my

Description

@t-my

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FAQInstructions to fix problemsserversupportQuestions from users, help and support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions