Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Настройка L2EmuProject на FreeBSD
#1
#./L2Server.sh
или
#sudo ./L2Server.sh
Ведет к такой ошибке
Код:
===========================================================================================================================-[ L2GameServer ]
17 Dec 17:59:31: [INFO] L2EmuProject-Game servers should not run under root-account ... exited.

от wheel юзера сервер не стартует (пользуюсь screen) и не открываются сокеты без скрина.
Ответ
#2
решил траблой отключением проверки на рута
исправил в папке L2EmuProject-Game/src/main/java/com/l2emu/gameserver/util файл BootManager.java
Верный файл http://depositfiles.com/files/55mvn5hk4
Содержимое файла:
Код:
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Panaceya вылечил проверку от рута ICQ:  435-441
package com.l2emu.gameserver.util;

import java.io.File;
import java.io.IOException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.l2emu.Config;
import com.l2emu.gameserver.L2GameServer;
import com.l2emu.status.Status;
import com.l2emu.tools.Tools;
import com.l2emu.tools.config.L2Config;
import com.l2emu.tools.logging.L2Log;
import com.l2emu.tools.versionning.Version;

/**
* @author Rayan
*/
public final class BootManager
{
    private final static Log _log = LogFactory.getLog(BootManager.class);
        
    // Release
    private static final String STABLE_RELEASE = "1.0.6";
    
    // Versionning
    private static final Version _gameVersion = new Version("l2emuproject-game-" + STABLE_RELEASE + ".jar");
    private static final Version _commonsVersion = new Version("l2emuproject-commons-" + STABLE_RELEASE + ".jar");

    /**
     * Calls Boot Preparator.
     *
     * @param args
     * @throws Throwable
     */
    public static void main(String[] args) throws Throwable
    {
        new BootManager();
    }

    public BootManager() throws Throwable
    {
        Tools.printSection("Boot Manager");
        _log.info("BootManager: Initializing Boot Manager.");
        
        // create all needed files and dirs
        // --------------------------------
        _log.info("BootManager: Creating Boot Folders and Files.");
        createBootDirs();
        
        // inits versionning
        // ------------
        _log.info("BootManager: Initalizing Versionning.");
        initVersionning();
        
        // inits logging
        // ------------
        _log.info("BootManager: Initializing Logging.");
        L2Log.initLogging();
        
        // reads Config b4 init gameserver boot
        // --------------------------------------------
        _log.info("BootManager: Initializing Configs.");
        Config.loadAll();
        
        // need to re print config just loaded.
        // ------------------------------------
        Tools.printSection("Boot Manager");
        _log.info("BootManager: Config Sucessffully Loaded.");
        
        // Init telnet
        Tools.printSection("Telnet");
        loadTelnet();
        //StartGameServer
               // Вот тут была бяка
        Tools.printSection("L2GameServer");
        _log.info("BootManager: Preparations Done. Staring GameServer!");
              
        new L2GameServer();
    }

    private void loadTelnet() throws Exception
    {
        if (L2Config.IS_TELNET_ENABLED)
            new Status().start();
        else
            _log.info("Telnet Server is currently disabled.");
    }

    private void createBootDirs()
    {
        // Create logging Directories
        // -----------------------------
        new File("log").mkdirs();
        new File("log/java").mkdirs();
        new File("log/error").mkdirs();
        new File("log/audit").mkdirs();
        new File("log/chat").mkdirs();
        new File("log/item").mkdirs();
        new File("log/enchant").mkdirs();
        new File("log/olympiad").mkdirs();
        new File("log/game").mkdirs();
        new File("log/GMAudit").mkdirs();
        new File("log/admin-commands").mkdirs();
        // temp fix
        new File(Config.DATAPACK_ROOT, "data/crests").mkdirs();
        new File("./config/versionning").mkdirs();
        _log.info("BootManager: All Directories and Files Created!");
    }
    
    private void initVersionning() throws IOException
    {
        File buildGameFile = new File("./config/versionning/game-version.xml");
        File buildCommonsFile = new File("./config/versionning/commons-version.xml");
        
        // Delete if exists.
        // -----------------------------
        if (buildGameFile.exists())
            buildGameFile.delete();
        
        // Delete if exists.
        // -----------------------------
        if (buildCommonsFile.exists())
            buildCommonsFile.delete();
        
        // Create version files.
        // -----------------------------
        buildGameFile.createNewFile();
        buildCommonsFile.createNewFile();
        _gameVersion.transferInfo("l2emuproject-game-" + STABLE_RELEASE + ".jar", "L2Server", buildGameFile);
        _commonsVersion.transferInfo("l2emuproject-commons-" + STABLE_RELEASE + ".jar", "L2Server", buildCommonsFile);
    }
}
При правильной настройке от рута запускать можно! Но не советую незнающим это делать.
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Настройка сервера l2 iluzi0n 3 2,733 09-16-2011, 09:48 PM
Последний пост: JR.dev
  Настройка KarameJIka 9 6,229 05-28-2010, 06:16 PM
Последний пост: Array
  Настройка wolegan 2 2,240 05-07-2010, 05:43 PM
Последний пост: wolegan

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)