Would you like to react to this message? Create an account in a few clicks or log in to continue.

Official Community Forums
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  The Wiki  Website  github Project  

 

 What is this?

Go down 
4 posters
AuthorMessage
AthlonJedi
Administrator
Administrator
AthlonJedi


Posts : 213
Join date : 2012-07-19
Location : Walkerton, Indiana

What is this? Empty
PostSubject: What is this?   What is this? EmptyTue 16 Apr - 3:12

Ok so against my better judgement I have decided to try Multiverse yet again for the millionth time and big suprize, problems right out of the gate.

so I set up everything on a server 2008 r2 machine and upon "start-multiverse.bat this shows up in the instance log:

Code:


ERROR [2013-04-15 11:57:17,360] Instance-2          handleMessageImpl java.lang.NullPointerException
      at java.lang.String.replace(Unknown Source)
      at multiverse.server.util.FileUtil.expandFileName(FileUtil.java:10)
      at multiverse.server.plugins.InstancePlugin$CreateInstanceHook.createInstance(InstancePlugin.java:307)
      at multiverse.server.plugins.InstancePlugin$CreateInstanceHook.handleMessage(InstancePlugin.java:222)
      at multiverse.server.plugins.InstancePlugin$CreateInstanceHook.processMessage(InstancePlugin.java:216)
      at multiverse.server.engine.EnginePlugin.handleMessageImpl(EnginePlugin.java:424)
      at multiverse.server.engine.EnginePlugin$QueuedMessage.run(EnginePlugin.java:458)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)



now the reason I trashed Multiverse the last time is because of a java problem NO ONE could seem to figure out. so....not off to a good start as JAVA is already acting up and on first run. This inturn causes the infamous "Startup Failed...Please stop the server...." message.

any ideas?
Back to top Go down
Louis Blackblood
Experienced Newbie
Experienced Newbie
Louis Blackblood


Posts : 32
Join date : 2013-04-12
Age : 38
Location : California

What is this? Empty
PostSubject: Re: What is this?   What is this? EmptyTue 16 Apr - 3:26

Honestly I was having Java problems out the gate as well. I just reinstalled JDK and made sure jvm.dll was in the ..jre7/server directory. Im launching the server with Cygwin though. Atleast the console was telling me what the problem was.
Back to top Go down
AthlonJedi
Administrator
Administrator
AthlonJedi


Posts : 213
Join date : 2012-07-19
Location : Walkerton, Indiana

What is this? Empty
PostSubject: Re: What is this?   What is this? EmptyTue 16 Apr - 6:44

jvm.dll is where it is supposed to be, idk maybe i need to do a quick debian install on one of my boxes and set it up on debian and see what happens.
Back to top Go down
Louis Blackblood
Experienced Newbie
Experienced Newbie
Louis Blackblood


Posts : 32
Join date : 2013-04-12
Age : 38
Location : California

What is this? Empty
PostSubject: Re: What is this?   What is this? EmptyTue 16 Apr - 7:01

Yeah in Cygwin it kept telling me that it couldnt load it for some reason. I uninstalled all Java on my pc-restarted-reinstalled and it worked no problem after that. Try that if your next method doesnt work.
Back to top Go down
tichfuie
Super Contributor
Super Contributor
tichfuie


Posts : 257
Join date : 2013-02-07
Location : NA

What is this? Empty
PostSubject: Re: What is this?   What is this? EmptyTue 16 Apr - 7:35

you need to setup the java path in you windows environment variables path

otherwise you will get tons of java errors
Back to top Go down
AthlonJedi
Administrator
Administrator
AthlonJedi


Posts : 213
Join date : 2012-07-19
Location : Walkerton, Indiana

What is this? Empty
PostSubject: Re: What is this?   What is this? EmptyTue 16 Apr - 8:05

from Cygwin shell :

Code:


Administrator@Prometheus /cygdrive/c/multiverse/bin
$ ./multiverse.sh -w sampleworld -v start
./multiverse.sh: line 3: $'\r': command not found
./multiverse.sh: line 8: $'\r': command not found
./multiverse.sh: line 13: $'\r': command not found
./multiverse.sh: line 17: $'\r': command not found
./multiverse.sh: line 20: $'\r': command not found
./multiverse.sh: line 21: syntax error near unexpected token `$'{\r''
'/multiverse.sh: line 21: `function kill_process () {


now what?
Back to top Go down
AthlonJedi
Administrator
Administrator
AthlonJedi


Posts : 213
Join date : 2012-07-19
Location : Walkerton, Indiana

What is this? Empty
PostSubject: Re: What is this?   What is this? EmptyTue 16 Apr - 8:36

and back to the same line 15 error as before.

Code:


ERROR [2013-04-15 17:33:13,547] main                ScriptManager.runPYFile: file=..\config\sampleworld\startup_instance.py Traceback (innermost last):
  File "..\config\sampleworld\startup_instance.py", line 15, in ?
multiverse.msgsys.RPCException(java.lang.NullPointerException in instance)

   at java.lang.String.replace(Unknown Source)

   at multiverse.server.util.FileUtil.expandFileName(FileUtil.java:10)

   at multiverse.server.plugins.InstancePlugin$CreateInstanceHook.createInstance(InstancePlugin.java:307)

   at multiverse.server.plugins.InstancePlugin$CreateInstanceHook.handleMessage(InstancePlugin.java:222)

   at multiverse.server.plugins.InstancePlugin$CreateInstanceHook.processMessage(InstancePlugin.java:216)

   at multiverse.server.engine.EnginePlugin.handleMessageImpl(EnginePlugin.java:424)

   at multiverse.server.engine.EnginePlugin$QueuedMessage.run(EnginePlugin.java:458)

   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

   at java.lang.Thread.run(Unknown Source)


multiverse.msgsys.RPCException: multiverse.msgsys.RPCException(java.lang.NullPointerException in instance)

      at org.python.core.Py.JavaError(Unknown Source)
      at org.python.core.Py.JavaError(Unknown Source)
      at org.python.core.PyReflectedFunction.__call__(Unknown Source)
      at org.python.core.PyReflectedFunction.__call__(Unknown Source)
      at org.python.core.PyObject.__call__(Unknown Source)
      at org.python.core.PyObject.invoke(Unknown Source)
      at org.python.pycode._pyx5.f$0(..\config\sampleworld\startup_instance.py:15)
      at org.python.pycode._pyx5.call_function(..\config\sampleworld\startup_instance.py)
      at org.python.core.PyTableCode.call(Unknown Source)
      at org.python.core.PyCode.call(Unknown Source)
      at org.python.core.Py.runCode(Unknown Source)
      at multiverse.server.engine.ScriptManager.runPYFile(ScriptManager.java:181)
      at multiverse.server.engine.ScriptManager.runFile(ScriptManager.java:94)
      at multiverse.server.engine.Engine.processPostScripts(Engine.java:527)
      at multiverse.server.engine.Engine.main(Engine.java:382)
DEBUG [2013-04-15 17:33:13,547] main                Engine, script completed
DEBUG [2013-04-15 17:33:24,066] DBKeepalive          Database: ping
DEBUG [2013-04-15 17:34:24,072] DBKeepalive          Database: ping
DEBUG [2013-04-15 17:35:24,072] DBKeepalive          Database: ping
DEBUG [2013-04-15 17:35:28,916] MessageIO            Connection closed (exception) java.nio.channels.SocketChannel[connected local=/127.0.0.1:49810 remote=/127.0.0.1:50001]
ERROR [2013-04-15 17:35:28,916] MessageIO            Lost connection to agent 'voiceserver' java.nio.channels.SocketChannel[closed]
DEBUG [2013-04-15 17:35:28,994] MessageIO            Connection closed (exception) java.nio.channels.SocketChannel[connected local=/127.0.0.1:49810 remote=/127.0.0.1:50051]
ERROR [2013-04-15 17:35:28,994] MessageIO            Lost connection to agent 'mobserver' java.nio.channels.SocketChannel[closed]
DEBUG [2013-04-15 17:35:29,072] MessageIO            Connection closed (exception) java.nio.channels.SocketChannel[connected local=/127.0.0.1:49810 remote=/127.0.0.1:49937]
ERROR [2013-04-15 17:35:29,072] MessageIO            Lost connection to agent 'proxy_1' java.nio.channels.SocketChannel[closed]
DEBUG [2013-04-15 17:35:29,134] MessageIO            Connection closed (exception) java.nio.channels.SocketChannel[connected local=/127.0.0.1:49810 remote=/127.0.0.1:49962]
ERROR [2013-04-15 17:35:29,134] MessageIO            Lost connection to agent 'login_manager' java.nio.channels.SocketChannel[closed]
DEBUG [2013-04-15 17:35:29,197] MessageIO            Connection closed (exception) java.nio.channels.SocketChannel[connected local=/127.0.0.1:49810 remote=/127.0.0.1:50151]
ERROR [2013-04-15 17:35:29,197] MessageIO            Lost connection to agent 'objmgr' java.nio.channels.SocketChannel[closed]

which brings the whole house of cards down as usual.
Back to top Go down
tichfuie
Super Contributor
Super Contributor
tichfuie


Posts : 257
Join date : 2013-02-07
Location : NA

What is this? Empty
PostSubject: Re: What is this?   What is this? EmptyTue 16 Apr - 9:17

try this:

assuming you have installed the server in C:\multiverse\

backup your current and replace with this ones:

C:\multiverse\bin\multiverse.sh

Code:

#!/bin/sh
(shopt -s igncr) 2>/dev/null && shopt -s igncr; # Workaround Cygwin line-ending issue

# This batch file runs the Multiverse sever processes on Linux in bash shell or on Windows/Cygwin
# You must have installed Java, a database, JDBC driver, and the Multiverse servers
# Copyright 2007 The Multiverse Network, Inc.
# Thanks to Judd-MGT for contributions.

# Optional: Set MV_HOME env. variable to be able to run this script from an arbitrary directory.
# Otherwise, this script assumes it is being run from MV_HOME/bin working directory
# NOTE: Doesn't work if you set MV_HOME.
export MV_HOME=${MV_HOME:-".."}

# Optional: Set DEFAULT_MV_PROPERTYFILE env. variable to set the default property file, otherwise use multiverse.properties
# when no property file is specified as final argument on command line.
DEFAULT_MV_PROPERTYFILE=${DEFAULT_MV_PROPERTYFILE:-"multiverse.properties"}

### Set to true to enable JMX management and monitoring (either here or in env. variable.
ENABLE_MGMT=${ENABLE_MGMT:-"false"}

function kill_process () {
    if [ $verbose -gt 0 ]; then
        echo -en "stopping $1 "
    fi
    kill $2 > /dev/null 2>&1
    result=$?
    if [ $verbose -gt 0 ]; then
        if [ $result = 0 ]; then
            echo STOPPED
        else
            echo NOT RUNNING
        fi
    fi
}

function check_process () {
    ps -e ho pid | grep $1 > /dev/null 2>&1
    result=$?
    if [ $result = 1 ]; then
        echo FAILED
    else
        echo SUCCESS
    fi
}

function status_process () {
    if [ x$2 == x ]; then
   return 0
    fi
    ps -e ho pid | grep $2 > /dev/null 2>&1
    result=$?
    if [ $result = 0 ]; then
        echo -e "$1" RUNNING
    else
        echo -e "$1" NOT RUNNING
    fi
    return $result
}

function alloc_domain_name () {

    type=$1
    name=$2

    if [ $(uname -o) == "Cygwin" ]; then
   CMD_CLASSPATH="$MV_JAR;$GETOPT;$LOG4J;$BCEL;."
    else
   CMD_CLASSPATH="${MV_JAR}:${GETOPT}:${LOG4J}:${BCEL}:."
    fi

    # not currently using CMD_CLASSPATH

    java -client ${JAVA_FLAGS} \
       -Dmultiverse.disable_logs=true \
       -Dmultiverse.log_level=3 \
       multiverse.msgsys.DomainCommand \
       $CMDLINE_PROPS \
        -t "${MV_COMMON}"/typenumbers.txt \
       -n ${type},${name}

    if [ $? -ne 0 ]; then
   echo "alloc_domain_name failed" 1>&2
   exit 1
    fi
}

function start_world_manager () {

    AGENT_TYPE=wmgr
    AGENT_NAME=$(alloc_domain_name AGENT ${AGENT_TYPE}_# )

    if [ $verbose -gt 0 ]; then
        echo -en "Starting $AGENT_NAME ...    \t"
    fi

    java \
        $JAVA_FLAGS \
   $JMX_FLAGS \
      -Dmultiverse.agenttype=${AGENT_TYPE} \
        -Dmultiverse.loggername=wmgr_1 \
        multiverse.server.engine.Engine \
   $CMDLINE_PROPS \
        -i "${MV_BIN}"/wmgr_local1.py \
        -i "${MV_COMMON}"/mvmessages.py \
        -i "${MV_WORLD}"/worldmessages.py \
        -t "${MV_COMMON}"/typenumbers.txt \
      "${MV_COMMON}"/global_props.py \
        "${MV_WORLD}"/global_props.py \
        "${MV_COMMON}"/world_mgr1.py \
        "${MV_WORLD}"/extensions_wmgr.py \
        &

    PID=$!
    echo $PID > "${MV_RUN}"/${AGENT_NAME}.pid

    if [ $verbose -gt 0 ]; then
        check_process $PID
    fi
}

function start_proxy () {

    AGENT_TYPE=proxy
    AGENT_NAME=$(alloc_domain_name AGENT ${AGENT_TYPE}_# )

    if [ $verbose -gt 0 ]; then
        echo -en "Starting $AGENT_NAME ...    \t"
    fi

    java  \
        $JAVA_FLAGS \
   $JMX_FLAGS \
      -Dmultiverse.agenttype=${AGENT_TYPE} \
        -Dmultiverse.loggername=proxy_1 \
        multiverse.server.engine.Engine \
   $CMDLINE_PROPS \
        -i "${MV_BIN}"/proxy.py \
        -i "${MV_COMMON}"/events.py \
        -i "${MV_COMMON}"/mvmessages.py \
        -i "${MV_WORLD}"/worldmessages.py \
        -t "${MV_COMMON}"/typenumbers.txt \
        "${MV_COMMON}"/proxy.py \
        "${MV_COMMON}"/global_props.py \
        "${MV_WORLD}"/global_props.py \
        "${MV_WORLD}"/extensions_proxy.py \
        &

    PID=$!
    echo $PID > "${MV_RUN}"/${AGENT_NAME}.pid

    if [ $verbose -gt 0 ]; then
        check_process $PID
    fi
}

function archive_log_dir () {
    rm -rf "${MV_LOGS}.old"/*
    mkdir -p "${MV_LOGS}".old
    mv "${MV_LOGS}"/* "${MV_LOGS}".old
}

function start_server () {

    if [ X$ARCHIVE_LOG_DIR = X"true" ]; then
   if [ -d "${MV_LOGS}" ]; then
       archive_log_dir
   fi
    fi

    # Do marshalling code injection if USE_CLASS_FILES is true
    if [ X$USE_CLASS_FILES = X"true" ]; then
        ./performinjection.sh $MV_WORLDNAME
    fi
   
    # Use these flags for profiling
    HPROF_FLAGS="-agentlib:hprof=heap=sites,depth=8"
    GCDETAILS_FLAGS="-XX:+PrintGC -XX:+PrintGCDetails"

    # Linux: Use strace with the following flags to monitor one of the
    # multiverse server processes.
    #    strace -f -e trace=\!futex,gettimeofday,clock_gettime java \

    echo "*** Starting world $MV_WORLDNAME ***"
    if [ ! -d "${MV_RUN}" ]
        then
        mkdir -p "${MV_RUN}"
    fi

    if [ ! -d "${MV_LOGS}" ]
        then
        mkdir -p "${MV_LOGS}"
    fi

    rm -f ${MV_RUN}/*.pid

    if [ X$DELETE_LOGS_ON_STARTUP = X"true" ]; then
        rm "${MV_LOGS}"/*.out*
    fi

    if [ X$ENABLE_MGMT = X"true" ]; then
        echo "Enabling JMX mgmt & monitoring"
        JAVA_FLAGS="${JAVA_FLAGS} $JMX_FLAGS"
    fi       

    if [ $verbose -gt 0 ]; then
        echo MV_HOME is $MV_HOME
        if [ X$USE_CLASS_FILES = X"true" ]; then
            echo "Using .class files from the /build hierarchy"
        else
            echo "Using .jar files from the /dist hierarchy"
        fi
        echo Using property file $MV_PROPERTYFILE 
        echo Using world file $MVW_FILENAME
        echo Using world script directory $MV_WORLD
        echo Using log directory $MV_LOGS
        echo Using common directory $MV_COMMON, bin directory $MV_BIN   
        echo "JAVA_FLAGS=\"${JAVA_FLAGS}\""
    fi

    # Increase the file descriptor limit up to the hard limit
    # Linux: Use /etc/security/limits.conf to set the hard limit
    ulimit -n hard

    AGENT_NAMES="-a combat -a wmgr_1 -a mobserver -a objmgr -a login_manager -a proxy_1 -a instance -a voiceserver"
    PLUGIN_TYPES="-p Login,1 -p Proxy,1 -p ObjectManager,1 -p WorldManager,1 -p Inventory,1 -p MobManager,1 -p Quest,1 -p Instance,1 -p Voice,1 -p Trainer,1 -p Group,1 -p Combat,1 -p ClassAbility,1 -p Domain,1"

    if [ $verbose -gt 0 ]; then
        echo -en "Starting domain server: \t"
    fi

    java ${JAVA_FLAGS} \
        -Dmultiverse.loggername=domain \
        multiverse.msgsys.DomainServer \
   $CMDLINE_PROPS \
        -t "${MV_COMMON}"/typenumbers.txt \
        ${AGENT_NAMES} ${PLUGIN_TYPES} \
        &

    echo $! > "${MV_RUN}"/domain.pid

    if [ $verbose -gt 0 ]; then
        check_process $(cat "${MV_RUN}"/domain.pid)
    fi

    start_world_manager

    if [ $verbose -gt 0 ]; then
        echo -en "Starting combat server: \t"
    fi
    java \
        $JAVA_FLAGS \
        -Dmultiverse.loggername=combat \
        multiverse.server.engine.Engine \
   $CMDLINE_PROPS \
        -i "${MV_BIN}"/wmgr_local1.py \
        -i "${MV_COMMON}"/mvmessages.py \
        -i "${MV_WORLD}"/worldmessages.py \
        -t "${MV_COMMON}"/typenumbers.txt \
        "${MV_COMMON}"/global_props.py \
        "${MV_WORLD}"/global_props.py \
        "${MV_COMMON}"/skill_db.py \
        "${MV_WORLD}"/skill_db.py \
        "${MV_COMMON}"/ability_db.py \
        "${MV_WORLD}"/ability_db.py \
        "${MV_WORLD}"/classabilityplugin.py \
        "${MV_WORLD}"/combat.py \
        "${MV_WORLD}"/extensions_combat.py \
        "${MV_COMMON}"/profession_db.py \
        "${MV_WORLD}"/profession_db.py \
        "${MV_COMMON}"/groupplugin.py \
        "${MV_WORLD}"/group.py \
        &

    echo $! > "${MV_RUN}"/combat.pid

    if [ $verbose -gt 0 ]; then
        check_process $(cat "${MV_RUN}"/combat.pid)
        echo -en "Starting instance server: \t"
    fi
    java \
        $JAVA_FLAGS \
        -Dmultiverse.loggername=instance \
        multiverse.server.engine.Engine \
   $CMDLINE_PROPS \
        -i "${MV_COMMON}"/mvmessages.py \
        -i "${MV_WORLD}"/worldmessages.py \
        -t "${MV_COMMON}"/typenumbers.txt \
        "${MV_COMMON}"/global_props.py \
        "${MV_WORLD}"/global_props.py \
        "${MV_COMMON}"/instance.py \
        "${MV_WORLD}"/startup_instance.py \
        &

    echo $! > "${MV_RUN}"/instance.pid

    if [ $verbose -gt 0 ]; then
        check_process $(cat "${MV_RUN}"/instance.pid)
        echo -en "Starting object manager: \t"
    fi
    java \
        ${JAVA_FLAGS} \
        -Dmultiverse.loggername=objmgr \
        multiverse.server.engine.Engine \
   $CMDLINE_PROPS \
        -i "${MV_COMMON}"/mvmessages.py \
        -i "${MV_WORLD}"/worldmessages.py \
        -t "${MV_COMMON}"/typenumbers.txt \
        "${MV_COMMON}"/global_props.py \
        "${MV_WORLD}"/global_props.py \
        "${MV_WORLD}"/templates.py \
        "${MV_COMMON}"/obj_manager.py \
        "${MV_WORLD}"/mobs_db.py \
        "${MV_WORLD}"/items_db.py \
        "${MV_WORLD}"/extensions_objmgr.py \
        &

    echo $! > "${MV_RUN}"/objmgr.pid

    if [ $verbose -gt 0 ]; then
        check_process $(cat "${MV_RUN}"/objmgr.pid)
        echo -en "Starting login manager: \t"
    fi

    java \
        ${JAVA_FLAGS} \
        -Dmultiverse.loggername=login_manager \
        multiverse.server.engine.Engine \
   $CMDLINE_PROPS \
        -i "${MV_COMMON}"/mvmessages.py \
        -i "${MV_WORLD}"/worldmessages.py \
        -t "${MV_COMMON}"/typenumbers.txt \
        "${MV_BIN}"/login_manager.py \
        "${MV_COMMON}"/login_manager.py \
        "${MV_COMMON}"/character_factory.py \
        "${MV_WORLD}"/character_factory.py \
        "${MV_WORLD}"/extensions_login.py \
        &

    echo $! > "${MV_RUN}"/login_manager.pid

    if [ $verbose -gt 0 ]; then
        check_process $(cat "${MV_RUN}"/login_manager.pid)
    fi

    start_proxy

    if [ $verbose -gt 0 ]; then
        echo -en "Starting mob server:    \t"
    fi

    java \
        ${JAVA_FLAGS} \
        -Dmultiverse.loggername=mobserver \
        multiverse.server.engine.Engine \
   $CMDLINE_PROPS \
        -i "${MV_BIN}"/mobserver_local.py \
        -i "${MV_COMMON}"/mvmessages.py \
        -i "${MV_WORLD}"/worldmessages.py \
        -t "${MV_COMMON}"/typenumbers.txt \
        "${MV_COMMON}"/global_props.py \
        "${MV_WORLD}"/global_props.py \
        "${MV_COMMON}"/mobserver_init.py \
        "${MV_WORLD}"/mobserver_init.py \
        "${MV_COMMON}"/questplugin.py \
        "${MV_COMMON}"/trainerplugin.py \
        "${MV_COMMON}"/mobserver.py \
        "${MV_WORLD}"/mobserver.py \
        "${MV_WORLD}"/extensions_mobserver.py \
        &

    echo $! > ${MV_RUN}/mobserver.pid
    if [ $verbose -gt 0 ]; then
        check_process $(cat "${MV_RUN}"/mobserver.pid)
        echo -en "Starting voice server:    \t"
    fi

    java \
        ${JAVA_FLAGS} \
        -Dmultiverse.loggername=voiceserver \
        multiverse.server.engine.Engine \
   $CMDLINE_PROPS \
        -i "${MV_COMMON}"/mvmessages.py \
        -i "${MV_WORLD}"/worldmessages.py \
        -t "${MV_COMMON}"/typenumbers.txt \
        "${MV_COMMON}"/voice.py \
        "${MV_WORLD}"/voice.py \
        &

    echo $! > ${MV_RUN}/voiceserver.pid
    if [ $verbose -gt 0 ]; then
        check_process $(cat "${MV_RUN}"/voiceserver.pid)
    fi

    echo "Wait for finished initializing msg... "
}

function stop_server () {
    echo "*** Stopping world $MV_WORLDNAME ***"
    kill_process "login server  " $(cat "${MV_RUN}"/login_manager.pid)
    kill_process "combat server  " $(cat "${MV_RUN}"/combat.pid)
    kill_process "instance      " $(cat "${MV_RUN}"/instance.pid)
    kill_process "object manager " $(cat "${MV_RUN}"/objmgr.pid)
    kill_process "world manager  " $(cat "${MV_RUN}"/wmgr_1.pid)
    kill_process "proxy server  " $(cat "${MV_RUN}"/proxy_1.pid)
    kill_process "mob server    " $(cat "${MV_RUN}"/mobserver.pid)
    kill_process "voice server  " $(cat "${MV_RUN}"/voiceserver.pid)
    kill_process "domain server  " $(cat "${MV_RUN}"/domain.pid)
}

function status_server () {
    down=0
    status_process "domain server  " $(cat "${MV_RUN}"/domain.pid) 
    if [ $? -ne 0 ]; then down=1 ; fi
    status_process "login server  " $(cat "${MV_RUN}"/login_manager.pid)
    if [ $? -ne 0 ]; then down=1 ; fi
    status_process "combat server  " $(cat "${MV_RUN}"/combat.pid)
    if [ $? -ne 0 ]; then down=1 ; fi
    status_process "instance      " $(cat "${MV_RUN}"/instance.pid)
    if [ $? -ne 0 ]; then down=1 ; fi
    status_process "object manager " $(cat "${MV_RUN}"/objmgr.pid)
    if [ $? -ne 0 ]; then down=1 ; fi
    status_process "world manager  " $(cat "${MV_RUN}"/wmgr_1.pid)
    if [ $? -ne 0 ]; then down=1 ; fi
    status_process "proxy server  " $(cat "${MV_RUN}"/proxy_1.pid)
    if [ $? -ne 0 ]; then down=1 ; fi
    status_process "mob server    " $(cat "${MV_RUN}"/mobserver.pid)
    if [ $? -ne 0 ]; then down=1 ; fi
    status_process "voice server  " $(cat "${MV_RUN}"/voiceserver.pid)
    if [ $? -ne 0 ]; then down=1 ; fi
    exit ${down}
}

function test_server () {
    if [ $verbose -gt 0 ]; then
        java $JAVA_FLAGS multiverse.simpleclient.SimpleClient -e ${MV_COMMON}/simpleclient.props -s $MV_COMMON/simpleclient.py --exit-after-login
    else
        java $JAVA_FLAGS multiverse.simpleclient.SimpleClient -e ${MV_COMMON}/simpleclient.props -s ${MV_COMMON}/simpleclient.py --exit-after-login > /dev/null 2>&1
    fi
    result=$?
    if [ $verbose -gt 0 ]; then
        if [ $result == 0 ]; then
            echo "login test: PASS"
        else
            echo "login test: FAIL"
        fi
    fi
    exit ${result}
}

function import_property_file () {
    for file
    do
        if [ -f $file ]; then
            files="$files $file"
        fi
    done
    if [ -n "$files" ]; then
        awk -f "$MV_BIN/prop2sh.awk" $files > "$MV_BIN/_javaprops_"
        . "$MV_BIN/_javaprops_"
        rm -f "$MV_BIN/_javaprops_"
    fi
}

verbose=0
rm -f _cmdline_props_
while getopts "hvw:p:CMP:Aa" arg; do
    case "$arg" in
        h)
            echo "$0: usage: $0 [-hvCM] [-w worldname] [-p propertyfilename] (start|stop|status|test)"
            ;;
        v)
            let verbose++
            ;;
   w)
       MV_WORLDNAME=$OPTARG
       ;;
   p)
       if [ -z $MV_PROPERTYFILE ]; then
      MV_PROPERTYFILE=$OPTARG
       else
      CMDLINE_PROPS="$CMDLINE_PROPS -p $OPTARG"
      PROPERTY_FILES="$PROPERTY_FILES $OPTARG"
       fi
       ;;
   C)
       JVM_FLAG=-client
       ;;
   M)
       ENABLE_MGMT=true
       JMX_FLAGS="-Dcom.sun.management.jmxremote"
       ;;
   P)
       CMDLINE_PROPS="$CMDLINE_PROPS -P$OPTARG"
       echo $OPTARG >> _cmdline_props_
       ;;
   A)
       AGGRESIVE="-XX:CompileThreshold=200 -Xnoclassgc -XX:+RelaxAccessControlCheck"
       ;;
   a)
       ARCHIVE_LOG_DIR=true
       ;;
   esac
done
shift $((OPTIND-1))

if [ $(uname -o) = "Cygwin" ]; then
    MV_HOME_UNIX=$(cygpath -u "${MV_HOME}")
else
    MV_HOME_UNIX="$MV_HOME"
fi

# where the local startup configs are stored, such as the port number
# and log level
MV_BIN=${MV_BIN:-"${MV_HOME}/bin"}

# where common config files are stored, such as plugin logic
MV_COMMON=${MV_COMMON:-"${MV_HOME}/config/common"}

if [ -n $MV_WORLDNAME ]; then
    JAVA_FLAGS="$JAVA_FLAGS -Dmultiverse.worldname=$MV_WORLDNAME"
    CMDLINE_PROPS="$CMDLINE_PROPS -Pmultiverse.worldname=$MV_WORLDNAME"
fi

MV_PROPERTYFILE=${MV_PROPERTYFILE:-"${MV_BIN}/${DEFAULT_MV_PROPERTYFILE}"}

import_property_file $MV_PROPERTYFILE
if [ -n "$MV_WORLDNAME" ] ; then
    multiverse_worldname=$MV_WORLDNAME
fi
import_property_file "$MV_HOME/config/$multiverse_worldname/world.properties" $PROPERTY_FILES _cmdline_props_
rm -f _cmdline_props_

if [ -z "$ARCHIVE_LOG_DIR" -a -n "$multiverse_archive_logs_on_startup" ] ; then
    ARCHIVE_LOG_DIR=$multiverse_archive_logs_on_startup
fi

# Determine if we should use .class files from the build hierarchy,
# or .jar files from the dist hierarchy.  To run the property getter
# before MV_JAR is set, we always use the dist version of the property
# getter.
USE_CLASS_FILES=${USE_CLASS_FILES:-$multiverse_use_class_files}

RHINO=${RHINO:-"${MV_HOME}/other/rhino1_5R5/js.jar"}
GETOPT=${GETOPT:-"${MV_HOME}/other/java-getopt-1.0.11.jar"}
JYTHON=${JYTHON:-"${MV_HOME}/other/jython.jar"}
LOG4J=${LOG4J:-"${MV_HOME}/other/log4j-1.2.14.jar"}
BCEL=${BCEL:-"${MV_HOME}/other/bcel-5.2.jar"}

if  [ X$USE_CLASS_FILES = X"true" ]; then
    MV_JAR=${MV_JAR:-"${MV_HOME}/build"}
    MARS_JAR=${MARS_JAR:-"${MV_HOME}/build"}
    INJECTED_JAR=${INJECTED_JAR:-"${MV_HOME}/inject"}
else
    MV_JAR=${MV_JAR:-"${MV_HOME}/dist/lib/multiverse.jar"}
    MARS_JAR=${MARS_JAR:-"${MV_HOME}/dist/lib/mars.jar"}
    INJECTED_JAR=${INJECTED_JAR:-"${MV_HOME}/dist/lib/injected.jar"}
fi

EXT_JAR=${EXT_JAR:="${MV_HOME}/dist/lib/${MV_WORLDNAME}.jar"}
JDBC=${JDBC:-$multiverse_jdbcJarPath}
#JDBC=${JDBC:-$(java -cp $MV_JAR -Dmultiverse.propertyfile=${MV_PROPERTYFILE} multiverse.scripts.PropertyGetter multiverse.jdbcJarPath)}

if [ $(uname -o) == "Cygwin" ]; then
    export PATH=$(cygpath "$JAVA_HOME"/bin):.:$PATH   
    MV_CLASSPATH="$RHINO;$JDBC;$INJECTED_JAR;$MV_JAR;$MARS_JAR;$EXT_JAR;$GETOPT;$JYTHON;$LOG4J;$BCEL;."
else
    MV_CLASSPATH="${RHINO}:${JDBC}:${INJECTED_JAR}:${MV_JAR}:${MARS_JAR}:${EXT_JAR}:${GETOPT}:${JYTHON}:${LOG4J}:${BCEL}:."
fi
       
# HotSpot tracking flags: -XX:+PrintCompilation -XX:+CITime
JVM_FLAG="${JVM_FLAG:-"-server"} $AGGRESIVE"
JAVA_FLAGS="-cp ${MV_CLASSPATH} -Dmultiverse.propertyfile=${MV_PROPERTYFILE} ${JAVA_FLAGS}"
JAVA_FLAGS="${JVM_FLAG} ${JAVA_FLAGS}"

#Get world name from properties file, and construct path to world script dir if not set from env var.
#MV_WORLDNAME=${MV_WORLDNAME:-$multiverse_worldname}
MV_WORLDNAME=${MV_WORLDNAME:-$(java $JAVA_FLAGS multiverse.scripts.PropertyGetter multiverse.worldname)}
MV_WORLD=${MV_WORLD:-"$MV_HOME/config/$MV_WORLDNAME"}

# Get path to mvw file if set explicitly in multiverse.mvwfile, otherwise, construct path to mvwfile.
MVW_FILENAME=${MVW_FILENAME:-$multiverse_mvwfile}

if [ "$MVW_FILENAME" = "null" ]; then
    MVW_FILENAME=$MV_HOME/config/$MV_WORLDNAME/$MV_WORLDNAME.mvw
fi

if [ X"$MV_HOSTNAME" != "X" ]; then
    CMDLINE_PROPS="$CMDLINE_PROPS -Pmultiverse.hostname=${MV_HOSTNAME}"
    JAVA_FLAGS="$JAVA_FLAGS -Dmultiverse.hostname=${MV_HOSTNAME}"
fi

# This is in local OS format
MV_LOGS=${MV_LOGS:-"${MV_HOME}/logs/${MV_WORLDNAME}"}
DELETE_LOGS_ON_STARTUP=${DELETE_LOGS_ON_STARTUP:-$multiverse_delete_logs_on_startup}

# This should always be in "unix" format
if [ $(uname -o) = "Cygwin" ]; then
    MV_RUN=${MV_RUN:-$(cygpath -w ${MV_BIN}/run/${MV_WORLDNAME})}
else
    MV_RUN=${MV_RUN:-${MV_BIN}/run/${MV_WORLDNAME}}
fi

JAVA_FLAGS="${JAVA_FLAGS} -Dmultiverse.logs=${MV_LOGS}"

case "$1" in

    start)
        start_server
        ;;

    stop)
        stop_server
        ;;

    status)
        status_server
        ;;

    restart)
        stop_server
        start_server
        ;;

    proxy)
        start_proxy
        ;;

    wmgr)
        start_world_manager
        ;;

    test)
        test_server
        ;;
esac
 







also :

C:\multiverse\bin\prop2sh.awk

Code:


/^#/ { next }
/^!/ { next }
/^[[:space:]]*$/ { next }
{
    sub(/^[ \t]+/, "", $0)
    equal = match($0,/[=:]/)
    if (equal == 0) {
   key = $0
   sub(/^[ \t]+/, "", key)
   sub(/[ \t]+$/, "", key)
   printf "%s=''\n", key
   next
    }
    key = substr($0,1,equal-1)
    value = substr($0,equal+1)
    sub(/^[ \t]+/, "", key)
    sub(/[ \t]+$/, "", key)
    gsub(/[.]/, "_", key)
    sub(/^[ \t]+/, "", value)
    sub(/[ \t]+$/, "", value)

    gsub(/[\\][\\]/, "\\", value)
    #print
    #print "KEY:", key, "."
    #print "VALUE:", value, "."
    printf "%s='%s'\n", key, value
}




now, from your cygwin terminal go to server path:
C:/multiverse/bin/
and run the server: multiverse.sh -v start

see if that works for you

Back to top Go down
AthlonJedi
Administrator
Administrator
AthlonJedi


Posts : 213
Join date : 2012-07-19
Location : Walkerton, Indiana

What is this? Empty
PostSubject: Re: What is this?   What is this? EmptyTue 16 Apr - 11:48

no dice, same result from cygwin as before.


EDIT::
There was a typo in the line used to fix the cygwin-windows carrage return problem.

should be :
Code:

(set -o igncr) 2>/dev/null && set -o igncr;

but with that fixed and your help the server FINALY started under server 2008 r2. I havent tryed to login yet though....affraid ill break it again lol

Now i just need to see about getting a Master server running.

Thank you
Back to top Go down
rotello
Super Contributor
Super Contributor
rotello


Posts : 215
Join date : 2012-12-06

What is this? Empty
PostSubject: Re: What is this?   What is this? EmptyTue 16 Apr - 15:12

AthlonJedi,

I'm sure the master server setup won't be that difficult, just remember to setup your sql database for it, link the sql driver and create the master server key.

Always check for logs too.

cheers.
Back to top Go down
Sponsored content





What is this? Empty
PostSubject: Re: What is this?   What is this? Empty

Back to top Go down
 
What is this?
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Getting Started-
Jump to: