PDA

View Full Version : [Solved] connecting to server



sebako
01-19-2011, 07:42 PM
Hey,

i have setup a little centos server and installed electro server which is running and i can access it via es admin from my local machine.
But for some reason i am unable to connect from my unity application.

the client configuration looks like this:




// instantiate connection
Server server = new Server("foobar");
AvailableConnection con = new AvailableConnection("serverIp", 9899, AvailableConnection.TransportType.BinaryTCP);
Security.PrefetchSocketPolicy("serverIp", 9899);



i have double checked that the server ip is the right one, but i do not even get a valid Connection response. Any clue what that could be?

sebako
01-19-2011, 07:46 PM
if it helps, i get this error message in my ElectroServer5.log when starting the server:





2011-Jan-19 18:44:54:242 [main] DEBUG Extensions.Cascade.Plugins.DatabaseJDBCPlugin - using database pool: mysqlpool
2011-Jan-19 18:44:55:692 [main] ERROR com.electrotank.electroserver5.servers.standalone. StandaloneContainerFactory - Unable to start gateway container
java.lang.NullPointerException
at com.electrotank.electroserver5.servers.gateway.Gat ewayServer.initializeConfigurationFromRegistry(Gat ewayServer.java:83)
at com.electrotank.electroserver5.servers.gateway.Gat ewayServer.doStart(GatewayServer.java:124)
at com.electrotank.electroserver5.servers.gateway.Gat ewayServer.start(GatewayServer.java:114)
at com.electrotank.electroserver5.servers.adapters.Se rverComponentAdapter.start(ServerComponentAdapter. java:46)
at org.picocontainer.defaults.DecoratingComponentAdap ter.start(DecoratingComponentAdapter.java:154)
at org.picocontainer.defaults.CachingComponentAdapter .start(CachingComponentAdapter.java:86)
at org.picocontainer.defaults.DefaultPicoContainer$Or deredComponentAdapterLifecycleManager.start(Defaul tPicoContainer.java:656)
at org.picocontainer.defaults.DefaultPicoContainer.st art(DefaultPicoContainer.java:456)
at org.picocontainer.defaults.DefaultPicoContainer.st art(DefaultPicoContainer.java:461)
at com.electrotank.electroserver5.servers.standalone. StandaloneContainerFactory.start(StandaloneContain erFactory.java:66)
at com.electrotank.electroserver5.Main.startUp(Main.j ava:95)
at com.electrotank.electroserver5.Main.processCommand LineResults(Main.java:276)
at com.electrotank.electroserver5.Main.invoke(Main.ja va:211)
at com.electrotank.electroserver5.bootstrap.Main.star t(Main.java:70)
at com.electrotank.electroserver5.bootstrap.Main.main (Main.java:41)

tcarr
01-19-2011, 07:50 PM
If you give me your global IP address (either here or in a PM) I can try to diagnose the problem. You will want to test using the code examples that came when you compiled. SimpleChat is a good one to use, either AS3 with SOSMax running or else Java and look at the UI's Log lines. If we know that SimpleChat works (or doesn't) it will help us figure out what the problem might be.

tcarr
01-19-2011, 07:53 PM
if it helps, i get this error message in my ElectroServer5.log when starting the server:

Aha! ES5 didn't start up correctly. Nothing will be able to connect. Hmmmm..... what customizations did you make using the ES Admin? You may need to remove the DatabaseJDBCPlugin extension while we test - not sure if that has anything to do with the NPE. When I see that particular NPE there is either something wrongly configured using ES Admin or else it's a bad installation and uninstalling and getting fresh download fixes it.

sebako
01-19-2011, 07:57 PM
well i have just copied over my local files to the server. should work this way - shouldn't it?
customizations are the extension (only that one) & a persistant room.

tcarr
01-19-2011, 08:03 PM
If the persistent room is not configured correctly, you could get that error. For example, if you tried to add a RoomVariable to the persistent room but didn't add valid XML for an EsObject as the room variable's value.

sebako
01-19-2011, 08:05 PM
at this point the persistant room is only there an does nothing. The room becomes important after login first, before this point the room will never be accessed by any code or anything else.

tcarr
01-19-2011, 08:12 PM
Odds are the extension that you added has a problem then. Try removing that extension and seeing if ES5 starts properly. Then add the extension back but don't make any server level components, and see if there are problems. I would think that a bug in one of your server level components would give some clue as to which one it was.

tcarr
01-19-2011, 09:55 PM
I've been helping Seb via PM. After fixing one bug in his Extension.xml (a plugin and an event handler were given the same handle) all he needed was to be careful adding his multiple server level components in the right order. If one component references another one, that one referenced has to be added before the one that references it.

Seb, can we mark this thread as Solved? You didn't mention if your client can connect and log in now.