Page 1 of 1

Problem with JDBC

Posted: Wed Nov 17, 2010 4:39 pm
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

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 4:49 pm
by BiggBoss
are you using wampserver?

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 4:53 pm
by Torvitas
i am using am Debian4+Lamp Server

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 4:53 pm
by BiggBoss
did you started lampp before launch gamseserver?

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 4:56 pm
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 

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 5:38 pm
by _DS_
Remove skip-networking from mysql config.

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 5:43 pm
by Torvitas
i already did. Didn't help

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 8:37 pm
by _DS_
Then connection possibly blocked by firewall.

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 8:49 pm
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?

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 8:50 pm
by _DS_
Check what mysql correctly binded to the 0.0.0.0 port 3306.

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 9:12 pm
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?

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 10:09 pm
by _DS_
netstat -an ?
I using 5.1

Re: Problem with JDBC

Posted: Wed Nov 17, 2010 10:10 pm
by Torvitas
i'm trying to install 5.1 but cant find a working .deb package.
netstat?^^

Re: Problem with JDBC

Posted: Thu Nov 18, 2010 12:46 am
by Torvitas
Done. the Password for the SQL User was too long xD