Page 1 of 2

RegisterGameServer.sh doesn't recieve any packets

Posted: Thu Jan 21, 2010 3:04 pm
by DasBaum
L2J Revision 3799:
L2JDP Revision 6876:

Hey guys,

if i try to execute RegisterGameServer.sh on my Debian 64 Bit machine, I get the following error:

Code: Select all

Error: There was an error while attempting to retrieve the list of currently registered GameServers.Reason: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.Exception in thread "main" java.lang.NullPointerException        at net.sf.l2j.gsregistering.GameServerRegister.<init>(GameServerRegister.java:45)        at net.sf.l2j.gsregistering.BaseGameServerRegister.startCMD(BaseGameServerRegister.java:282)        at net.sf.l2j.gsregistering.BaseGameServerRegister.main(BaseGameServerRegister.java:190)        at net.sf.l2j.gsregistering.GameServerRegister.main(GameServerRegister.java:33)
I already tried running as root and normal user and I don't use a firewall at the moment, so I don't get the point..

I tried with java6-jdk and java5-jdk installed (via apt).

Best regards,

DasBaum

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Thu Jan 21, 2010 3:57 pm
by JIV
check db settings in config.

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Thu Jan 21, 2010 4:52 pm
by DasBaum
All database settings are correct.

Code: Select all

# ---------------------------------------------------------------------------# Login Server Settings# ---------------------------------------------------------------------------# This is the server configuration file. Here you can set up the connection information for your server.# This was written with the assumption that you are behind a router.# Dumbed Down Definitions...# LAN (LOCAL area network) - typically consists of computers connected to the same router as you.# WAN (WIDE area network) - typically consists of computers OUTSIDE of your router (ie. the internet).# x.x.x.x - Format of an IP address. Do not include the x'es into settings. Must be real numbers.# ---------------------------------------------------------------------------# Networking# ---------------------------------------------------------------------------# This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname# Common settings...# 127.0.0.1 - If you are playing alone on a test server# 192.168.x.x - This is if you are on a 192.168.x.x type network (behind a standard consumer router) and want other computers from JUST the internal network to be able to connect# x.x.x.x - WAN IP obtained from http://www.whatismyip.com/. This is if you want people outside your internal network to be able to connect to your server.# ---------------------------------------------------------------------------# Default: 127.0.0.1ExternalHostname = 94.127.**.** # ---------------------------------------------------------------------------# This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname.# This can be the internal IP such as 127.0.0.1 or the computer's IP such as 192.168.x.x.# ---------------------------------------------------------------------------# Default: 127.0.0.1InternalHostname = 127.0.0.1 # ---------------------------------------------------------------------------# If you are behind a router which using its own local IP for Port Forwarding then set this to the routers# local IP if you want people outside your internal network to be able to connect to your server.# ---------------------------------------------------------------------------# RouterHostname =  # Bind ip of the LoginServer, use * to bind on all available IPs# Default: *LoginserverHostname = * # Default: 2106LoginserverPort = 2106 # The address on which login will listen for GameServers, use * to bind on all available IPs# Default: *LoginHostname = * # The port on which login will listen for GameServers# Default: 9014LoginPort = 9014 # The delay in minutes after which the login updates the gameservers IP's (usefull when their ip is dynamic)# Default: 15IpUpdateTime = 15  # ---------------------------------------------------------------------------# Security# ---------------------------------------------------------------------------# Default: TrueLogLoginController = True # How many times you can provide an invalid account/pass before the IP gets banned.# Default: 10LoginTryBeforeBan = 6 # Time you won't be able to login back again after LoginTryBeforeBan tries to login.# Default: 600 (10 minutes)LoginBlockAfterBan = 600 # If set to True any GameServer can register on your login's free slots# Default: FalseAcceptNewGameServer = True # Enforce GameGuard authorization from client?# If True, login server will kick client if the client bypassed GameGuard authentication.# Default: FalseForceGGAuth = False # Flood Protection. All values are in MILISECONDS.# Default: TrueEnableFloodProtection = True # Default: 15FastConnectionLimit = 15 # Default: 700NormalConnectionTime = 700 # Default: 350FastConnectionTime = 350 # Default: 50MaxConnectionPerIP = 50  # ---------------------------------------------------------------------------# Database# ---------------------------------------------------------------------------# Specify the appropriate driver and url for the database you're using.# Examples:# Driver = com.mysql.jdbc.Driver (default)# Driver = org.hsqldb.jdbcDriver# Driver = com.microsoft.sqlserver.jdbc.SQLServerDriverDriver = com.mysql.jdbc.Driver# Database URL# URL = jdbc:mysql://localhost/l2jdb (default)# URL = jdbc:hsqldb:hsql://localhost/l2jdb# URL = jdbc:sqlserver://localhost/database = l2jdb/user = sa/password = URL = jdbc:mysql://localhost/l2jdb# Database user info (default is "root" but it's not recommended)Login = **# Database connection passwordPassword = ** # Default: 10MaximumDbConnections = 10 # Default: 0MaximumDbIdleTime = 0  # ---------------------------------------------------------------------------# Misc.# ---------------------------------------------------------------------------# If False, the license (after the login) will not be shown.# Default: TrueShowLicence = True # Default: TrueAutoCreateAccounts = True  # ---------------------------------------------------------------------------# Developer Settings# ---------------------------------------------------------------------------# Default: FalseDebug = False # Default: FalseAssert = False # Default: FalseDeveloper = False

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Fri Mar 26, 2010 6:21 pm
by DeGato
Same problem with RegisterGameServer.sh, login and gameserver.
OS Debian
all server configs are correct and checked many times...

also:

Code: Select all

login# loading login configL2Properties: Missing property for key - PacketHandlerDebugL2Properties: Missing property for key - RequestServerIDL2Properties: Missing property for key - AcceptAlternateIDL2Properties: Missing property for key - DatapackRootL2Properties: Missing property for key - RouterHostnameLoading mmo.propertiesL2Properties: Missing property for key - IOSelectorThreadCountMLog clients using java 1.4+ standard logging.Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ java.beans.IntrospectionException: java.lang.reflect.InvocationTargetException [numThreadsAwaitingCheckoutDefaultUser] ]FATAL: Failed initializing database. Reason: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1119)        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2257)        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:784)        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:354)        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:284)        at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:119)        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:143)        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:132)        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.initializeAutomaticTestTable(C3P0PooledConnectionPoolManager.java:772)        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.createPooledConnectionPool(C3P0PooledConnectionPoolManager.java:696)        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:257)        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:271)        at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)        at com.l2jserver.L2DatabaseFactory.<init>(L2DatabaseFactory.java:96)        at com.l2jserver.L2DatabaseFactory.getInstance(L2DatabaseFactory.java:207)        at com.l2jserver.loginserver.L2LoginServer.<init>(L2LoginServer.java:111)        at com.l2jserver.loginserver.L2LoginServer.main(L2LoginServer.java:57)Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1119)        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2178)        ... 21 moreCaused by: java.net.SocketException: Network is unreachable        at java.net.PlainSocketImpl.socketConnect(Native Method)        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)        at java.net.Socket.connect(Socket.java:525)        at java.net.Socket.connect(Socket.java:475)        at java.net.Socket.<init>(Socket.java:372)        at java.net.Socket.<init>(Socket.java:215)        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)        ... 22 more 
Edit:
nvm, just set 0 value at /etc/sysctl.d/bindv6only.conf

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Sat Mar 27, 2010 10:59 am
by Sirpaypi
Well you need just to have some knowledge, read the log error ! :o

You need just to fix your config files... in your problem there's no Database installed.

Code: Select all

FATAL: Failed initializing database. Reason: Communications link failure

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Sat Apr 03, 2010 9:00 pm
by DeGato
I had no problems with DB. It was ipv6 connect problem.

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Sun Apr 04, 2010 9:14 pm
by Negat1ve
Try using {ip}/l2jdb instead of localhost/l2jdb
It worked for me

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Mon Apr 05, 2010 12:31 am
by doti04
check this 3 things

1. URL = jdbc:mysql://localhost/l2jdb do you have in your sql db named l2jdb
2. user name of your db
3. password of your db

if this 3 things is ok your problem must solve

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Sat Apr 09, 2011 12:58 pm
by strelock
I have try executed RegisterGameServer.sh, but have some troubles:

Code: Select all

  ./RegisterGameServer.shError: There was an error while attempting to retrieve the list of currently reg                                                                                          istered GameServers.Reason: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driv                                                                                          er has not received any packets from the server.Exception in thread "main" java.lang.NullPointerException        at com.l2jserver.gsregistering.GameServerRegister.<init>(GameServerRegis                                                                                          ter.java:46)        at com.l2jserver.gsregistering.BaseGameServerRegister.startCMD(BaseGameS                                                                                          erverRegister.java:279)        at com.l2jserver.gsregistering.BaseGameServerRegister.main(BaseGameServe                                                                                          rRegister.java:187)        at com.l2jserver.gsregistering.GameServerRegister.main(GameServerRegiste                                                                                          r.java:34) 
I am readed lot of topics, as I understanded this trouble of connect to mysql data base. So I checked login "loginserver.properties", but I use valid base(i called it l2j), and create spesial user of mysql "l2jroot" that can connect just from localhost without password. My database server locate on same machine, so all shoud be fine?

Code: Select all

 # Driver = com.microsoft.sqlserver.jdbc.SQLServerDriverDriver = com.mysql.jdbc.Driver# Database URL# URL = jdbc:mysql://localhost/l2jdb (default)# URL = jdbc:hsqldb:hsql://localhost/l2jdb# URL = jdbc:sqlserver://localhost/database = l2jdb/user = sa/password =URL = jdbc:mysql://localhost/l2j# Database user info (default is "root" but it's not recommended)Login = l2jroot# Database connection passwordPassword =  

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Sun Apr 10, 2011 9:31 am
by strelock
How create that,while I execute RegisterGameServer.sh log's information had written in "log" directory?

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Sun Apr 10, 2011 10:57 am
by strelock
I have changed java-code, built l2jlogin.jar, substituted it to newer. I have added several System.out.println(Config.DATABASE_LOGIN), and looked that all fine. All entries reading normally. So one row down I looked interesting row : "GameServerTable.load();"... As I understand this is a list with names of servers....maybe, this list I should especially fill ?

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Mon Apr 11, 2011 10:11 am
by strelock
I try debug l2jproject. I found where jvm throws to me fault.
This is L2DatabaseFactory.java:

Code: Select all

                         System.out.println("some text in L2DatabaseFactory() Constructor. 1");            /* Test the connection */            _source.getConnection().close();            System.out.println("some text in L2DatabaseFactory() Constructor. 2"); 
"System.out.println" - this is entry I added. So, I've get this throws exception on commands line :

Code: Select all

 ./RegisterGameServer.sh some text in L2DatabaseFactory() Constructor. 1Error: There was an error while attempting to retrieve the list of currently registered GameServers.Reason: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.Exception in thread "main" java.lang.NullPointerException    at com.l2jserver.gsregistering.GameServerRegister.<init>(GameServerRegister.java:46)    at com.l2jserver.gsregistering.BaseGameServerRegister.startCMD(BaseGameServerRegister.java:279)    at com.l2jserver.gsregistering.BaseGameServerRegister.main(BaseGameServerRegister.java:187)    at com.l2jserver.gsregistering.GameServerRegister.main(GameServerRegister.java:34) 

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Mon Apr 11, 2011 11:23 am
by tukune
1.
2. # Driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
3. Driver = com.mysql.jdbc.Driver
4. # Database URL
5. # URL = jdbc:mysql://localhost/l2jdb (default)
6. # URL = jdbc:hsqldb:hsql://localhost/l2jdb
7. # URL = jdbc:sqlserver://localhost/database = l2jdb/user = sa/password =
8. URL = jdbc:mysql://localhost/l2j <-- why change? try default.
9. # Database user info (default is "root" but it's not recommended)
10. Login = l2jroot <-- why change? try default.
11. # Database connection password
12. Password =

Let's debug!

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Mon Apr 11, 2011 11:32 am
by strelock
I can try using default, but my question :" Why I have a trouble?".

I found fault error, with using "System.out.println();" :

Code: Select all

 System.out.println("some text in L2DatabaseFactory() Constructor. 1");            System.out.println("some text in L2DatabaseFactory() Constructor, _source.getConnectionTesterClassName() :"+_source.getConnectionTesterClassName() );            /* Test the connection */            _source.getConnection().close();            System.out.println("some text in L2DatabaseFactory() Constructor. 2"); 
For my side is very interesting, why developer used :

Code: Select all

 import com.mchange.v2.c3p0.ComboPooledDataSource; 
What's greater have this package?

And what i should change, that my server is start?!

Re: RegisterGameServer.sh doesn't recieve any packets

Posted: Mon Apr 11, 2011 11:34 am
by strelock
tukune wrote:1.
2. # Driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
3. Driver = com.mysql.jdbc.Driver
4. # Database URL
5. # URL = jdbc:mysql://localhost/l2jdb (default)
6. # URL = jdbc:hsqldb:hsql://localhost/l2jdb
7. # URL = jdbc:sqlserver://localhost/database = l2jdb/user = sa/password =
8. URL = jdbc:mysql://localhost/l2j <-- why change? try default.
9. # Database user info (default is "root" but it's not recommended)
10. Login = l2jroot <-- why change? try default.
11. # Database connection password
12. Password =

Let's debug!
Are you at Japan now? What's are happening in Japan now? Do you have a panic?