[Connection] Gameserver lost connection with login

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
belak
Posts: 32
Joined: Thu Jan 04, 2007 6:57 pm

[Connection] Gameserver lost connection with login

Post by belak »

» Find Revision
L2J Revision Number: 4299
L2JDP Revision Number: 7511

I'm using Addons for TvT (BigBoss): viewtopic.php?f=73&t=13981&hilit=TVT
And Bot Report Button (BigBoss): viewtopic.php?f=69&t=15511
I dont have problems with codes in eclipse.

Result: Unclosed Connection. After some hours, players can login in loginserver, but not in gameserver. Show bartz normal, "light" and ping. And then, after more time, gameserver crash.

TvT is each hours (1:00, 2:00, 3:00...)

EDIT:

Dedicate Quad 2.4 / 4GB Ram / Link 100mb

MYSQL my.ini:

Code: Select all

[client] port=3306 [mysql] default-character-set=latin1 [mysqld] port=3306 basedir="C:/Program Files/MySQL/MySQL Server 6.0/"datadir="C:/ProgramData/MySQL/MySQL Server 6.0/Data/"default-character-set=latin1 default-storage-engine=INNODB sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" max_connections=5000query_cache_size=500Mtable_cache=3020tmp_table_size=30Mthread_cache_size=64 myisam_max_sort_file_size=100Gmyisam_sort_buffer_size=30Mkey_buffer_size=257Mread_buffer_size=64Kread_rnd_buffer_size=256Ksort_buffer_size=256K innodb_additional_mem_pool_size=11Minnodb_flush_log_at_trx_commit=1innodb_log_buffer_size=6Minnodb_buffer_pool_size=498Minnodb_log_file_size=100Minnodb_thread_concurrency=10
Login prop:

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 = 67.205.67.234 # ---------------------------------------------------------------------------# 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 = 67.205.67.234 # ---------------------------------------------------------------------------# 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 = 10 # 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 = False # 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 = xxxx# Database connection passwordPassword = xxxx # 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 = True # Default: FalseAssert = False # Default: FalseDeveloper = False
Game server.prop:

Code: Select all

# ---------------------------------------------------------------------------# Game 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.# If this IP is resolvable by the Login Server, just leave *.# ---------------------------------------------------------------------------# Default: *ExternalHostname = 67.205.67.234 # ---------------------------------------------------------------------------# 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.# If this IP is resolvable by the Login Server, just leave *.# ---------------------------------------------------------------------------# Default: *InternalHostname = 67.205.67.234 # Where's the Login server this gameserver should connect to# Default: 127.0.0.1LoginHost = 127.0.0.1 # TCP port the login server listen to for gameserver connection requests# Default: 9014LoginPort = 9014 # Default: *GameserverHostname = * # Default: 7777GameserverPort = 7777  # ---------------------------------------------------------------------------# 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 = xxxx# Database connection passwordPassword = xxxx # Default: 100MaximumDbConnections = 100 # Default: 0MaximumDbIdleTime = 0 # ---------------------------------------------------------------------------# Misc Server Settings# ---------------------------------------------------------------------------# This is the server ID that the Game Server will request.# Example: 1 = Bartz# Default: 1RequestServerID = 1 # True = The Login Server will give an other ID to the server if the requested ID is already reserved.# Default: TrueAcceptAlternateID = True # Datapack root directory.# Defaults to current directory from which the server is started unless the below line is uncommented.#DatapackRoot = C:/Work/tmp/DataPack # Define how many players are allowed to play simultaneously on your server.# Default: 100MaximumOnlineUsers = 500 # Numbers of protocol revisions that server allows to connect.# Delimiter is ;# WARNING: <u><b><font color="red">Changing the protocol revision may result in incompatible communication and many errors in game!</font></b></u># Default: 146;152AllowedProtocolRevisions = 146;148;152  # ---------------------------------------------------------------------------# Misc Player Settings# --------------------------------------------------------------------------- # Character name template.# Examples:# CnameTemplate = [A-Z][a-z]{3,3}[A-Za-z0-9]*# The above setting will allow names with first capital letter, next three small letters,# and any letter (case insensitive) or number, like OmfgWTF1# CnameTemplate = [A-Z][a-z]*# The above setting will allow names only of letters with first one capital, like Omfgwtf# Default .* (allows any symbol)CnameTemplate = .* # This setting restricts names players can give to their pets.# See CnameTemplate for detailsPetNameTemplate = .* # Maximum number of characters per account.# Default: 7 (client limit)CharMaxNumber = 7
Sorry my "lol" english :s
Thx for you help!
Last edited by belak on Sun Jun 27, 2010 8:55 pm, edited 1 time in total.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [Connection] Gameserver lost connection with login

Post by janiii »

check from where the unclosed connection comes. check that custom code.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
belak
Posts: 32
Joined: Thu Jan 04, 2007 6:57 pm

Re: [Connection] Gameserver lost connection with login

Post by belak »

I edit my firts post with MYSQL configs.

In logs part1:

Code: Select all

2010.06.27 16:57:29,361	WARNING	57	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7201)2010.06.27 16:58:35,665	WARNING	58	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7201)2010.06.27 17:01:22,042	WARNING	11	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7201)2010.06.27 17:02:38,615	WARNING	59	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7201)2010.06.27 17:17:47,486	INFO	60	com.l2jserver.gameserver.taskmanager.tasks.TaskSevenSignsUpdate	SevenSigns: Data updated successfully.2010.06.27 17:19:07,083	WARNING	59	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.network.serverpackets.CharSelectionInfo.loadCharacterSelectInfo(CharSelectionInfo.java:207)2010.06.27 17:19:07,137	WARNING	60	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.model.L2ItemInstance.updateInDb(L2ItemInstance.java:1476)2010.06.27 17:19:07,177	WARNING	59	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.model.L2ItemInstance.updateInDb(L2ItemInstance.java:1476)2010.06.27 17:19:07,204	WARNING	56	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.model.L2ItemInstance.updateInDb(L2ItemInstance.java:1476)2010.06.27 17:19:07,208	WARNING	61	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.model.L2ItemInstance.updateInDb(L2ItemInstance.java:1476)2010.06.27 17:19:08,212	WARNING	61	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.model.actor.instance.L2PcInstance.storeEffect(L2PcInstance.java:7762)2010.06.27 17:19:08,513	WARNING	11	com.l2jserver.L2DatabaseFactory	Unclosed connection! Trace: com.l2jserver.gameserver.model.actor.instance.L2PcInstance.storeCharBase(L2PcInstance.java:7639)

part 2 (many replays):

Code: Select all

Jun 27, 2010 12:39:30 PM com.l2jserver.L2DatabaseFactory$ConnectionCloser runWARNING: Unclosed connection! Trace: com.l2jserver.gameserver.network.serverpackets.CharSelectionInfo.loadCharacterSelectInfo(CharSelectionInfo.java:207)java.lang.RuntimeException	at com.l2jserver.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:223)	at com.l2jserver.gameserver.network.serverpackets.CharSelectionInfo.loadCharacterSelectInfo(CharSelectionInfo.java:207)	at com.l2jserver.gameserver.network.serverpackets.CharSelectionInfo.<init>(CharSelectionInfo.java:56)	at com.l2jserver.gameserver.network.clientpackets.RequestRestart.runImpl(RequestRestart.java:132)	at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:92)	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)	at java.lang.Thread.run(Unknown Source)Jun 27, 2010 2:36:40 PM com.l2jserver.L2DatabaseFactory$ConnectionCloser runWARNING: Unclosed connection! Trace: com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7201)java.lang.RuntimeException	at com.l2jserver.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:223)	at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7201)	at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.load(L2PcInstance.java:1196)	at com.l2jserver.gameserver.network.L2GameClient.loadCharFromDisk(L2GameClient.java:498)	at com.l2jserver.gameserver.network.clientpackets.CharacterSelect.runImpl(CharacterSelect.java:92)	at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:92)	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)	at java.lang.Thread.run(Unknown Source)
I know that many ppls have part 2 error.

Janii:
check from where the unclosed connection comes. check that custom code.
I'm trying to find something are days. But keep trying.
belak
Posts: 32
Joined: Thu Jan 04, 2007 6:57 pm

Re: [Connection] Gameserver lost connection with login

Post by belak »

This line, for exemple:

Code: Select all

private CharSelectInfoPackage[] loadCharacterSelectInfo()    {        CharSelectInfoPackage charInfopackage;        List<CharSelectInfoPackage> characterList = new FastList<CharSelectInfoPackage>();         Connection con = null;         try        {           [b] con = L2DatabaseFactory.getInstance().getConnection();[/b]            PreparedStatement statement = con.prepareStatement("SELECT account_name, charId, char_name, level, maxHp, curHp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, sp, karma, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, base_class, transform_id FROM characters WHERE account_name=?");            statement.setString(1, _loginName);            ResultSet charList = statement.executeQuery();             while (charList.next())// fills the package            {                charInfopackage = restoreChar(charList);                if ( charInfopackage != null )                    characterList.add(charInfopackage);            }             charList.close();            statement.close();             return characterList.toArray(new CharSelectInfoPackage[characterList.size()]);        }        catch (Exception e)        {            _log.log(Level.WARNING, "Could not restore char info: " + e.getMessage(), e);        }        finally        {            L2DatabaseFactory.close(con);        }         return new CharSelectInfoPackage[0];    }
What the problem? Eclipse dont see errors. :|
-----------------------------------------------------------------
EDIT:

In code have 8 warnings. In one:

The constructor Universe.Coord(L2CharPosition) is never used locally - Universe.java

Code: Select all

		public Coord(L2CharPosition pos)		{			_x = pos.x;			_y = pos.y;			_z = pos.z;		}
All codes related to the position. But i dont understand this error...
Post Reply