L2J And Ubuntu 9.04 Problem In Login Server Run

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
Zhen-Xlogic
Posts: 5
Joined: Wed Sep 16, 2009 7:29 am
Location: Athens, Greece.
Contact:

L2J And Ubuntu 9.04 Problem In Login Server Run

Post by Zhen-Xlogic »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: 3545 - 20090921_0500 (Latest)
L2JDP Revision Number: 6651 - 20090921_0503 (Latest)

WebServer
Apache/2.2.11 (Ubuntu)
PHP/5.2.6.-3ubuntu4.2 with Suhosin-Patch
MySQL client version 5.0.75
PHP extension: mysql
Local Machine IP: 192.168.1.12

Java Version:

Code: Select all

zhen-xlogic@LinuxServer:~/L2jServer/gameserver$ java -versionjava version "1.6.0_0"OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu11)OpenJDK Client VM (build 14.0-b08, mixed mode, sharing) 
I have install the database via "database_installer.sh" in l2jdb
i have register a game server via "RegisterGameServer.sh" hexid.txt (the hexid.txt is on /gameserver/config folder) code:

Code: Select all

#The HexId to Auth into LoginServer#Mon Sep 21 19:57:26 EEST 2009HexID=5bc7d8be29c8ace62cf568d7caa6af24ServerID=5
I will place login and server configuration:

server.properties

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 = * # --------------------------------------------------------------------------- # 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 = * # Where's the Login server this gameserver should connect to # Default: 127.0.0.1 LoginHost = 192.168.1.12 # TCP port the login server listen to for gameserver connection requests # Default: 9014 LoginPort = 9014 # Default: * GameserverHostname = * # Default: 7777 GameserverPort = 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.SQLServerDriver Driver = 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 = root  # Database connection password Password = MYSQL PASSWORD xD # Default: 100 MaximumDbConnections = 100 # Default: 0 MaximumDbIdleTime = 0 # --------------------------------------------------------------------------- # Misc Server Settings # --------------------------------------------------------------------------- # This is the server ID that the Game Server will request. # Example: 1 = Bartz # Default: 1 RequestServerID = 1 # True = The Login Server will give an other ID to the server if the requested ID is already reserved. # Default: True AcceptAlternateID = 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: 100 MaximumOnlineUsers = 100 # Minimum and maximum protocol revision that server allow to connect. # Warning: You must make sure that the minimum revision is always less than or equal to the maximum revision. # Default: 83 MinProtocolRevision = 83 # Default: 87 MaxProtocolRevision = 87 # --------------------------------------------------------------------------- # 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 details PetNameTemplate = .* # Maximum number of characters per account. # Default: 7 (client limit) CharMaxNumber = 7 
loginserver.properties

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 = 192.168.1.12# ---------------------------------------------------------------------------# 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 = 192.168.1.12# ---------------------------------------------------------------------------# 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: TrueForceGGAuth = true# 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 = root# Database connection passwordPassword = MYSQL PASSWORD xD# Default: 10MaximumDbConnections = 10# Default: 0MaximumDbIdleTime = 0# ---------------------------------------------------------------------------# Misc.# ---------------------------------------------------------------------------# If False, the license (after the login) will not be shown.# Default: TrueShowLicence = true# Default: TrueAutoCreateAccounts = false# ---------------------------------------------------------------------------# Developer Settings# ---------------------------------------------------------------------------# Default: FalseDebug = false# Default: FalseAssert = false# Default: FalseDeveloper = false 
All *.sh files haves chmod +x

When i open my terminal and i go in LoginServer and i try to run the script with the follow command

Code: Select all

zhen-xlogic@LinuxServer:~/L2jServer/login$ ./startLoginServer.shzhen-xlogic@LinuxServer:~/L2jServer/login$
Nothing else happen if i check the log folder in login server, in all txt (stdout.log & 2009-09-21_20-39-22_stdout.log etc) i see the same line:

Code: Select all

nice: cannot set niceness: Permission denied
I use 2 sh scripts to check the status of the Login & Game server:
Login Server Console.sh

Code: Select all

#!/bin/bash cd /home/zhen-xlogic/L2jServer/loginxterm -title "LoginServer Console" -e tail  -f /home/zhen-xlogic/L2jServer/login/log/stdout.log &./LoginServer_loop.sh &
Game Server Console.sh

Code: Select all

#!/bin/bash cd /home/zhen-xlogic/L2jServer/gameserverxterm -title "GameServer Console" -e tail  -f /home/zhen-xlogic/L2jServer/gameserver/log/stdout.log &./GameServer_loop.sh &
When the Game server run i recive the follow:
Connection to login on 192.168.1.12:9014
Diconnected from Login trying to reconnect:
Java.net.ConnectException: Connection refused.

I have and the web server status GameServer UP \ LoginServer Down.

Can you help me to fix the isue with the "nice: cannot set niceness: Permission denied" in Login Server.

Thanks in advance and sorry for this big Post,
Zhen-Xlogic :D 8)
Image Image
kotk
Posts: 99
Joined: Wed Jan 04, 2006 12:51 am

Re: L2J And Ubuntu 9.04 Problem In Login Server Run

Post by kotk »

Just remove the

Code: Select all

nice -n -2
from the LoginServer_loop.sh or start the server as root. Also, grab the JDK from Sun.
Zhen-Xlogic
Posts: 5
Joined: Wed Sep 16, 2009 7:29 am
Location: Athens, Greece.
Contact:

Re: L2J And Ubuntu 9.04 Problem In Login Server Run

Post by Zhen-Xlogic »

kotk wrote:Just remove the

Code: Select all

nice -n -2
from the LoginServer_loop.sh or start the server as root. Also, grab the JDK from Sun.
Simple and easy!
That works! :lol:

Thanks a lot @kotk :D :wink: 8)
Image Image
User avatar
XavierElf
Posts: 92
Joined: Wed May 14, 2008 3:39 am
Location: Russia

Re: L2J And Ubuntu 9.04 Problem In Login Server Run

Post by XavierElf »

It's not the best solution. "nice" command changes the priority of the process. Negative value means that it has priority higher then normal. But in *nix only root user can set the priority of the process above normal. So you can create a new user and allow him to execute "nice" command with root privileges in the /etc/sudoers file. After that just login at that new user and run server using command: sudo ./startLoginServer.sh
Sry for my bad english...
User avatar
nonom
L2j Veteran
L2j Veteran
Posts: 649
Joined: Wed Mar 11, 2009 10:34 pm
Location: Magmeld

Re: L2J And Ubuntu 9.04 Problem In Login Server Run

Post by nonom »

XavierElf wrote:It's not the best solution. "nice" command changes the priority of the process. Negative value means that it has priority higher then normal. But in *nix only root user can set the priority of the process above normal. So you can create a new user and allow him to execute "nice" command with root privileges in the /etc/sudoers file. After that just login at that new user and run server using command: sudo ./startLoginServer.sh
+1

and easy to use:

ps xau
renice -20 <gameserverprocess>
Image
"There are three kinds of people in this world, those who can count and those who can't"
Post Reply