It is currently 25 Apr 2024, 01:30
   
Text Size

xmage server & Amazon EC2

by BetaSteward

Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins

xmage server & Amazon EC2

Postby shiroken11 » 21 Oct 2014, 18:36

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!
shiroken11
 
Posts: 2
Joined: 21 Oct 2014, 18:33
Has thanked: 0 time
Been thanked: 0 time

Re: xmage server & Amazon EC2

Postby LevelX » 21 Oct 2014, 18:52

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?
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times

Re: xmage server & Amazon EC2

Postby shiroken11 » 23 Oct 2014, 20:11

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.
shiroken11
 
Posts: 2
Joined: 21 Oct 2014, 18:33
Has thanked: 0 time
Been thanked: 0 time

Re: xmage server & Amazon EC2

Postby LevelX » 23 Oct 2014, 22:20

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.
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times


Return to XMage

Who is online

Users browsing this forum: No registered users and 163 guests


Who is online

In total there are 163 users online :: 0 registered, 0 hidden and 163 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 163 guests

Login Form