Newbie Spellweaver
- Joined
- Sep 3, 2019
- Messages
- 90
- Reaction score
- 12
Hi
For a few days I have had a problem with launching a server on linux that requires JAVA-7
Of course, I did a system update and everything went wrong, I reinstalled Debian 11, of course I installed JAVA or Zulu-7 and there was a problem because it did not start the server.
Below is the full explanation of how the boot server was and the whole configuration works without any problems until the update.
$ java -version
openjdk version "1.7.0_272"
OpenJDK Runtime Environment (Zulu 7.40.0.15-CA-linux64) (build 1.7.0_272-b10)
OpenJDK 64-Bit Server VM (Zulu 7.40.0.15-CA-linux64) (build 24.272-b10, mixed mode)
Script to start the server that the server always started and ran until the last update:
#!/bin/sh
# Path to main Open folder WITHOUT a trailing slash
RUNPATH="/var/ServerPlay/Heaven"
# GameServer Folder Name
GAMEFOLDER="GameServer"
# GameServer Launch Command
GAMEEXEC="java -Xms4g -Xmx10g -XXermSize=4g -XX:MaxPermSize=10g -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=1 -ea -XX:-UseSplitVerifier -javaagent:./libs/al-commons.jar -cp ./libs/*:AL-Game.jar com.gameserver.GameServer"
# LoginServer Folder Name
LOGINFOLDER="LoginServer"
# LoginServer Launch Command
LOGINEXEC="java -Xms8m -Xmx32m -ea -Xbootclasspath/p:./libs/jsr166-1.7.0.jar -cp ./libs/*:AL-Login.jar com.loginserver.LoginServer"
# ChatServer Launch Command
CHATEXEC="java -Xms128m -Xmx128m -ea -Xbootclasspath/p:./libs/jsr166-1.7.0.jar -cp ./libs/*:AL-Chat.jar com.chatserver.ChatServer"
# ChatServer Folder Name
CHATFOLDER="ChatServer"
# DONT NO EDIT AFTER HERE
GAME_PID=$(ps ux | awk '/GameServer/ && !/awk/ {print $2}')
LOGIN_PID=$(ps ux | awk '/LoginServer/ && !/awk/ {print $2}')
CHAT_PID=$(ps ux | awk '/ChatServer/ && !/awk/ {print $2}')
start() {
if [ -z "$LOGIN_PID" ]; then
echo -n "Starting Login Server..."
cd $RUNPATH/$LOGINFOLDER
screen -A -m -d -S login.login $LOGINEXEC
echo "OK"
else
echo "Login Server is already started..."
fi
if [ -z "$GAME_PID" ]; then
echo -n "Starting Game Server..."
cd $RUNPATH/$GAMEFOLDER
screen -A -m -d -S game.game $GAMEEXEC
echo "OK"
else
echo "Game Server is already started..."
fi
if [ -z "$CHAT_PID" ]; then
echo -n "Starting Chat Server..."
cd $RUNPATH/$CHATFOLDER
screen -A -m -d -S chat.chat $CHATEXEC
echo "OK"
else
echo "Chat Server is already started..."
fi
return 0
}
stop() {
echo -n "Stoping Services..."
if [ ! -z "$LOGIN_PID" ]; then
kill $LOGIN_PID
fi
if [ ! -z "$GAME_PID" ]; then
kill $GAME_PID
fi
if [ ! -z "$CHAT_PID" ]; then
kill $CHAT_PID
fi
echo "OK"
return 0
}
start_login() {
if [ -z "$LOGIN_PID" ]; then
echo -n "Starting Login Server..."
cd $RUNPATH/$LOGINFOLDER
screen -A -m -d -S login.login $LOGINEXEC
echo "OK"
else
echo "Open Login Server is already started..."
fi
return 0
}
start_game() {
if [ -z "$GAME_PID" ]; then
echo -n "Starting Game Server..."
cd $RUNPATH/$GAMEFOLDER
screen -A -m -d -S game.game $GAMEEXEC
echo "OK"
else
echo "Open Game Server is already started..."
fi
return 0
}
start_chat() {
if [ -z "$CHAT_PID" ]; then
echo -n "Starting Chat Server..."
cd $RUNPATH/$CHATFOLDER
screen -A -m -d -S chat.chat $CHATEXEC
echo "OK"
else
echo "Chat Server is already started..."
fi
return 0
}
stop_login() {
if [ ! -z "$LOGIN_PID" ]; then
kill $LOGIN_PID
echo "Stoping login server..."
else
echo "Login server its not started"
fi
return 0
}
stop_game() {
if [ ! -z "$GAME_PID" ]; then
kill $GAME_PID
echo "Stoping gameserver server..."
else
echo "Gameserver server its not started"
fi
return 0
}
stop_chat() {
if [ ! -z "$CHAT_PID" ]; then
kill $CHAT_PID
echo "Stoping Chat server..."
else
echo "Chat server its not started"
fi
return 0
}
status() {
echo "[Heaven]========================================="
if [ ! -z "$LOGIN_PID" ]; then
echo "[OK] Login Server Running..."
else
echo "[FAIL] Login Server is not running"
fi
if [ ! -z "$GAME_PID" ]; then
echo "[OK] Game Server Running..."
else
echo "[FAIL] Game Server is not running"
fi
if [ ! -z "$CHAT_PID" ]; then
echo "[OK] Chat Server Running..."
else
echo "[FAIL] Chat Server is not running"
fi
echo "==============================================="
return 0
}
help() {
echo "Commands: ====================================="
echo "help = Show this help text"
echo "start = Starts all servers"
echo "stop = Stops all servers"
echo "start-login = Starts LoginServer Only"
echo "start-game = Starts GameServer Only"
echo "start-chat = Starts ChatServer Only"
echo "stop-login = Stop LoginServer Only"
echo "stop-game = Stop GameServer Only"
echo "stop-chat = Stop ChatServer Only"
echo "restart = Restart all servers "
echo "restart-login = Restart LoginServer Only"
echo "restart-game = Restart GameServer Only"
echo "restart-chat = Restart ChatServer Only"
echo "status = Show status servers"
echo " =============================================="
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
$0 stop $*
sleep 5
$0 start $*
;;
start-login)
start_login
;;
start-game)
start_game
;;
start-chat)
start_chat
;;
stop-login)
stop_login
;;
stop-game)
stop_game
;;
stop-chat)
stop_chat
;;
restart-login)
$0 stop_login $*
sleep 5
$0 start_login $*
;;
restart-game)
$0 stop_game $*
sleep 5
$0 start_game $*
;;
restart-chat)
$0 stop_chat $*
sleep 5
$0 start_chat $*
;;
help)
help
;;
status)
status
;;
*)
echo $"Usage: $0 (start|stop|stop-login|stop-game|stop-chat|start-login|start-game|start-chat|restart|restart-login|restart-game|restart-chat|status|help)"
exit 1
esac
exit $?
After starting, I have this message:
Error opening zip file or JAR manifest missing : ./libs/jsr166-1.7.0.jar
Error occurred during initialization of VM
agent library failed to init: instrument
I've never had a problem running on any Linux system until now.
Someone can help solve the problem.
For a few days I have had a problem with launching a server on linux that requires JAVA-7
Of course, I did a system update and everything went wrong, I reinstalled Debian 11, of course I installed JAVA or Zulu-7 and there was a problem because it did not start the server.
Below is the full explanation of how the boot server was and the whole configuration works without any problems until the update.
$ java -version
openjdk version "1.7.0_272"
OpenJDK Runtime Environment (Zulu 7.40.0.15-CA-linux64) (build 1.7.0_272-b10)
OpenJDK 64-Bit Server VM (Zulu 7.40.0.15-CA-linux64) (build 24.272-b10, mixed mode)
Script to start the server that the server always started and ran until the last update:
#!/bin/sh
# Path to main Open folder WITHOUT a trailing slash
RUNPATH="/var/ServerPlay/Heaven"
# GameServer Folder Name
GAMEFOLDER="GameServer"
# GameServer Launch Command
GAMEEXEC="java -Xms4g -Xmx10g -XXermSize=4g -XX:MaxPermSize=10g -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=1 -ea -XX:-UseSplitVerifier -javaagent:./libs/al-commons.jar -cp ./libs/*:AL-Game.jar com.gameserver.GameServer"
# LoginServer Folder Name
LOGINFOLDER="LoginServer"
# LoginServer Launch Command
LOGINEXEC="java -Xms8m -Xmx32m -ea -Xbootclasspath/p:./libs/jsr166-1.7.0.jar -cp ./libs/*:AL-Login.jar com.loginserver.LoginServer"
# ChatServer Launch Command
CHATEXEC="java -Xms128m -Xmx128m -ea -Xbootclasspath/p:./libs/jsr166-1.7.0.jar -cp ./libs/*:AL-Chat.jar com.chatserver.ChatServer"
# ChatServer Folder Name
CHATFOLDER="ChatServer"
# DONT NO EDIT AFTER HERE
GAME_PID=$(ps ux | awk '/GameServer/ && !/awk/ {print $2}')
LOGIN_PID=$(ps ux | awk '/LoginServer/ && !/awk/ {print $2}')
CHAT_PID=$(ps ux | awk '/ChatServer/ && !/awk/ {print $2}')
start() {
if [ -z "$LOGIN_PID" ]; then
echo -n "Starting Login Server..."
cd $RUNPATH/$LOGINFOLDER
screen -A -m -d -S login.login $LOGINEXEC
echo "OK"
else
echo "Login Server is already started..."
fi
if [ -z "$GAME_PID" ]; then
echo -n "Starting Game Server..."
cd $RUNPATH/$GAMEFOLDER
screen -A -m -d -S game.game $GAMEEXEC
echo "OK"
else
echo "Game Server is already started..."
fi
if [ -z "$CHAT_PID" ]; then
echo -n "Starting Chat Server..."
cd $RUNPATH/$CHATFOLDER
screen -A -m -d -S chat.chat $CHATEXEC
echo "OK"
else
echo "Chat Server is already started..."
fi
return 0
}
stop() {
echo -n "Stoping Services..."
if [ ! -z "$LOGIN_PID" ]; then
kill $LOGIN_PID
fi
if [ ! -z "$GAME_PID" ]; then
kill $GAME_PID
fi
if [ ! -z "$CHAT_PID" ]; then
kill $CHAT_PID
fi
echo "OK"
return 0
}
start_login() {
if [ -z "$LOGIN_PID" ]; then
echo -n "Starting Login Server..."
cd $RUNPATH/$LOGINFOLDER
screen -A -m -d -S login.login $LOGINEXEC
echo "OK"
else
echo "Open Login Server is already started..."
fi
return 0
}
start_game() {
if [ -z "$GAME_PID" ]; then
echo -n "Starting Game Server..."
cd $RUNPATH/$GAMEFOLDER
screen -A -m -d -S game.game $GAMEEXEC
echo "OK"
else
echo "Open Game Server is already started..."
fi
return 0
}
start_chat() {
if [ -z "$CHAT_PID" ]; then
echo -n "Starting Chat Server..."
cd $RUNPATH/$CHATFOLDER
screen -A -m -d -S chat.chat $CHATEXEC
echo "OK"
else
echo "Chat Server is already started..."
fi
return 0
}
stop_login() {
if [ ! -z "$LOGIN_PID" ]; then
kill $LOGIN_PID
echo "Stoping login server..."
else
echo "Login server its not started"
fi
return 0
}
stop_game() {
if [ ! -z "$GAME_PID" ]; then
kill $GAME_PID
echo "Stoping gameserver server..."
else
echo "Gameserver server its not started"
fi
return 0
}
stop_chat() {
if [ ! -z "$CHAT_PID" ]; then
kill $CHAT_PID
echo "Stoping Chat server..."
else
echo "Chat server its not started"
fi
return 0
}
status() {
echo "[Heaven]========================================="
if [ ! -z "$LOGIN_PID" ]; then
echo "[OK] Login Server Running..."
else
echo "[FAIL] Login Server is not running"
fi
if [ ! -z "$GAME_PID" ]; then
echo "[OK] Game Server Running..."
else
echo "[FAIL] Game Server is not running"
fi
if [ ! -z "$CHAT_PID" ]; then
echo "[OK] Chat Server Running..."
else
echo "[FAIL] Chat Server is not running"
fi
echo "==============================================="
return 0
}
help() {
echo "Commands: ====================================="
echo "help = Show this help text"
echo "start = Starts all servers"
echo "stop = Stops all servers"
echo "start-login = Starts LoginServer Only"
echo "start-game = Starts GameServer Only"
echo "start-chat = Starts ChatServer Only"
echo "stop-login = Stop LoginServer Only"
echo "stop-game = Stop GameServer Only"
echo "stop-chat = Stop ChatServer Only"
echo "restart = Restart all servers "
echo "restart-login = Restart LoginServer Only"
echo "restart-game = Restart GameServer Only"
echo "restart-chat = Restart ChatServer Only"
echo "status = Show status servers"
echo " =============================================="
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
$0 stop $*
sleep 5
$0 start $*
;;
start-login)
start_login
;;
start-game)
start_game
;;
start-chat)
start_chat
;;
stop-login)
stop_login
;;
stop-game)
stop_game
;;
stop-chat)
stop_chat
;;
restart-login)
$0 stop_login $*
sleep 5
$0 start_login $*
;;
restart-game)
$0 stop_game $*
sleep 5
$0 start_game $*
;;
restart-chat)
$0 stop_chat $*
sleep 5
$0 start_chat $*
;;
help)
help
;;
status)
status
;;
*)
echo $"Usage: $0 (start|stop|stop-login|stop-game|stop-chat|start-login|start-game|start-chat|restart|restart-login|restart-game|restart-chat|status|help)"
exit 1
esac
exit $?
After starting, I have this message:
Error opening zip file or JAR manifest missing : ./libs/jsr166-1.7.0.jar
Error occurred during initialization of VM
agent library failed to init: instrument
I've never had a problem running on any Linux system until now.
Someone can help solve the problem.