Problem with JDBC

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
Torvitas
Posts: 164
Joined: Fri Nov 16, 2007 1:44 am

Problem with JDBC

Post by Torvitas »

If you want to receive support we need this info to help you properly.
» Find Revision
Not Revision Specific.

Hi Everytime I want to start the Server (LoginServer in this Case) the following error occurs:

Code: Select all

 loading login configL2Properties: Missing property for key - PacketHandlerDebugL2Properties: Missing property for key - RequestServerIDL2Properties: Missing property for key - AcceptAlternateIDL2Properties: Missing property for key - DatapackRootLoading mmo.propertiesMLog clients using java 1.4+ standard logging.Initializing c3p0-0.9.2-pre1 [built 27-May-2010 01:00:49 -0400; 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:409)    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1118)    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)    at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2308)    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2122)    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:774)    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)    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:409)    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)    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:866)    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.createPooledConnectionPool(C3P0PooledConnectionPoolManager.java:789)    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:298)    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:312)    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)    at com.l2jserver.L2DatabaseFactory.<init>(L2DatabaseFactory.java:100)    at com.l2jserver.L2DatabaseFactory.getInstance(L2DatabaseFactory.java:211)    at com.l2jserver.loginserver.L2LoginServer.<init>(L2LoginServer.java:109)    at com.l2jserver.loginserver.L2LoginServer.main(L2LoginServer.java:56)Caused by: java.net.ConnectException: Connection refused    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:529)    at java.net.Socket.connect(Socket.java:478)    at java.net.Socket.<init>(Socket.java:375)    at java.net.Socket.<init>(Socket.java:218)    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)    ... 23 more 
does anyone know how to fix this? If you know plz give the details.
I tried everything considered here "viewtopic.php?f=81&t=15295&start=0" but it doesn't help.
Thx in Advance
Torvitas
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Problem with JDBC

Post by BiggBoss »

are you using wampserver?
Image
Torvitas
Posts: 164
Joined: Fri Nov 16, 2007 1:44 am

Re: Problem with JDBC

Post by Torvitas »

i am using am Debian4+Lamp Server
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Problem with JDBC

Post by BiggBoss »

did you started lampp before launch gamseserver?
Image
Torvitas
Posts: 164
Joined: Fri Nov 16, 2007 1:44 am

Re: Problem with JDBC

Post by Torvitas »

Mysql is running as a standard service . Have a good connection via HeidiSQL and Phpmyadmin. But Gameserver and Loginserver are not working. :(

the Second problem is that from time to time there is the error "nice: cannot set niceness: Permission denied"

but there is no niceness in the script:

Code: Select all

#!/bin/bash err=1until [ $err == 0 ]; do    [ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"    [ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"    java -Xms128m -Xmx128m -cp ./../libs/*:l2jlogin.jar com.l2jserver.loginserver.L2LoginServer > log/stdout.log 2>&1    err=$?#   /etc/init.d/mysql restart    sleep 10;done 
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Problem with JDBC

Post by _DS_ »

Remove skip-networking from mysql config.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
Torvitas
Posts: 164
Joined: Fri Nov 16, 2007 1:44 am

Re: Problem with JDBC

Post by Torvitas »

i already did. Didn't help
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Problem with JDBC

Post by _DS_ »

Then connection possibly blocked by firewall.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
Torvitas
Posts: 164
Joined: Fri Nov 16, 2007 1:44 am

Re: Problem with JDBC

Post by Torvitas »

i habe no firewall installed afaik.
The system is now Debian5.0 minimal.
its 64bit OS.

Is Mysql 5.1 needed? or does Mysql 5.0 work too?
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Problem with JDBC

Post by _DS_ »

Check what mysql correctly binded to the 0.0.0.0 port 3306.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
Torvitas
Posts: 164
Joined: Fri Nov 16, 2007 1:44 am

Re: Problem with JDBC

Post by Torvitas »

it is bound to 0.0.0.0 and port 3306 in My.cnf.

But how to know this is what it uses?^^

I'm become crazy trying to get a l2jServer runnung. I did a trillion times before but now it won't work.

Is mysql 5.0 ok or do i need 5.1?
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Problem with JDBC

Post by _DS_ »

netstat -an ?
I using 5.1
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
Torvitas
Posts: 164
Joined: Fri Nov 16, 2007 1:44 am

Re: Problem with JDBC

Post by Torvitas »

i'm trying to install 5.1 but cant find a working .deb package.
netstat?^^
Torvitas
Posts: 164
Joined: Fri Nov 16, 2007 1:44 am

Re: Problem with JDBC

Post by Torvitas »

Done. the Password for the SQL User was too long xD
Post Reply