04-10-2011, 12:26 AM
Распокавал файлы джава-сервера, отредактировал ,loginserver.properties,server.properties. Выставил chmod +x RegsiterGameServer.sh, но при запуске выдает следующее:
./RegisterGameServer.sh
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 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)
Полазил по инету, наткнулся, что это скорее всего проблемы коннекшена к БД, потому стоит просмотрет фаил конфигурации настройки непосредственно к серверу (у меня база "l2j" , пользователь "l2jroot" без пароля и с хостом прям к localhost) :
# ---------------------------------------------------------------------------
# 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.SQLServerDriver
Driver = com.mysql.jdbc.Driver
# Database URL
# URL = jdbc:mysql://localhost/l2jdb (default)
# URL = jdbc:hsqldb:hsql://localhost/l2jdb
# URL = jdbc
qlserver://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 password
Password =
# Default: 10
MaximumDbConnections = 10
# Default: 0
MaximumDbIdleTime = 0
.
При попытке зайти через строчку пускает на бегом :
login$ mysql -u l2jroot -h localhost
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 303
Server version: 5.1.49-3 (Debian)
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
В чем может быть проблема, больше никто не сталкавался с тем же?
П.С.: я скомпилировал файлы через ant, и перед этим установил всю базу в l2j, где таблица gameserver существует.
./RegisterGameServer.sh
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 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)
Полазил по инету, наткнулся, что это скорее всего проблемы коннекшена к БД, потому стоит просмотрет фаил конфигурации настройки непосредственно к серверу (у меня база "l2j" , пользователь "l2jroot" без пароля и с хостом прям к localhost) :
# ---------------------------------------------------------------------------
# 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.SQLServerDriver
Driver = com.mysql.jdbc.Driver
# Database URL
# URL = jdbc:mysql://localhost/l2jdb (default)
# URL = jdbc:hsqldb:hsql://localhost/l2jdb
# URL = jdbc

URL = jdbc:mysql://localhost/l2j
# Database user info (default is "root" but it's not recommended)
Login = l2jroot
# Database connection password
Password =
# Default: 10
MaximumDbConnections = 10
# Default: 0
MaximumDbIdleTime = 0
.
При попытке зайти через строчку пускает на бегом :
login$ mysql -u l2jroot -h localhost
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 303
Server version: 5.1.49-3 (Debian)
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
В чем может быть проблема, больше никто не сталкавался с тем же?
П.С.: я скомпилировал файлы через ant, и перед этим установил всю базу в l2j, где таблица gameserver существует.
Учиться никогда не поздно и никогда не рано
