Page 1 of 1

xmage server & Amazon EC2

PostPosted: 21 Oct 2014, 18:36
by shiroken11
Has anyone had any luck in configuring an Amazon ec2 instance as an xmage server? I've tried it using Ubuntu, the security group allowing any traffic from my client IP, and setting config.xml to either 0.0.0.0 or the machine's assigned public IP. Any help would be awesome!

Re: xmage server & Amazon EC2

PostPosted: 21 Oct 2014, 18:52
by LevelX
shiroken11 wrote:Has anyone had any luck in configuring an Amazon ec2 instance as an xmage server? I've tried it using Ubuntu, the security group allowing any traffic from my client IP, and setting config.xml to either 0.0.0.0 or the machine's assigned public IP. Any help would be awesome!
The Public server is also running with Ubuntu 14.04 so that shouln't be a problem. The 2 ports the server needs for JBoss remoting are open? Did you set the second port to a fixed value?

Can you post your config.xml?

Does the server start? What is shown in the server log after the start? That it's listening?

What happens if you try to connect to the server?
What's shown in the client and server log for this action?

Re: xmage server & Amazon EC2

PostPosted: 23 Oct 2014, 20:11
by shiroken11
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
    <server serverAddress="0.0.0.0"
            serverName="mage-server"
            port="17171"
            secondaryBindPort="17179"
            backlogSize="200"
            numAcceptThreads="2"
            maxPoolSize="300"
            leasePeriod="5000"
            maxGameThreads="10"
            maxSecondsIdle="600"
            minUserNameLength="3"
            maxUserNameLength="14"
            userNamePattern="[^a-z0-9_]"
            maxAiOpponents="15"
            saveGameActivated="false"
    />
Now, if I leave it at 0.0.0.0, then JBOSS can bind that address.
Code: Select all
INFO  2014-10-23 19:56:00,466 Started MAGE server - listening on 0.0.0.0:17171/?serializationtype=jboss&maxPoolSize=300  =>[main] Main.main
The client says "Unable to connect to server. ip-172-31-40-112" Now the funny thing is that "ip-172-31-40-112" is the hostname for the ubuntu server, so obviously it is contacting somehow. Even telnet to port 17171 will bring up a "jbs1{" prompt

If I use the public IP (54.191.15.126) provided for the machine:
Code: Select all
INFO  2014-10-23 19:57:11,047 Config - second.bind port: 17179                                                           =>[main] Main.main
It hangs without binding an IP.

If I use the Private IP given:
Code: Select all
INFO  2014-10-23 19:59:37,952 Started MAGE server - listening on 172.31.40.112:17171/?serializationtype=jboss&maxPoolSize=300 =>[main] Main.main
It binds... but the client just sits at the "connecting" stage... No response on the server's output.

I've opened ALL ports to my server from my client's IP.

Re: xmage server & Amazon EC2

PostPosted: 23 Oct 2014, 22:20
by LevelX
That's exactly also my experience I made by trying to use a server from a private network in the internet.

You can maybe try to to add internal/external/name to /etc/hosts or /etc/resolv.conf but I have no strong hope in this alone.


Maybe this is worth a try:
-Djava.rmi.server.hostname="your custom IP" \
-Djava.rmi.server.uselocalHostname=false \ (also try with true)
Add it to your startServer.sh

Found here: http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Q_26511083.html
And here:
https://developer.jboss.org/wiki/UsingJBossBehindAFirewall

That's the JBoss Remoting documentation:
http://jbossremoting.jboss.org/documentation/v2.html


I don't know why this must be so ***** complicated.