Closed isair closed 6 years ago
Can you verify its being passed to the game? It looks like it's not even used since there's no search path. And as far as I know no checks are performed on read/write test.
Chances are you'd also need to match the case of the folder to what's on the filesystem as well.
@isair Are you still having problems with this?
Been a while since I could continue working on my project, I'll check again with the latest build and post an update.
For reference, a PR from the branch where I'm facing this issue: https://github.com/isair/jedi-academy-server/pull/9
Still seeing this issue. It works fine with jampded and sees the MBII folder and every pk3 file in it.
I am using docker cloud to host my servers, while this stack file works:
open:
environment:
- FS_GAME=MBII
- NET_PORT=29072
- RTVRTM_CFG=open_rtvrtm.cfg
- SERVER_CFG=open_server.cfg
image: 'bsencan/jedi-academy-server:latest'
ports:
- '29072:29072/udp'
restart: always
volumes:
- '/root/jedi-academy:/jedi-academy'
This one doesn't:
open:
environment:
- FS_GAME=MBII
- NET_PORT=29072
- RTVRTM_CFG=open_rtvrtm.cfg
- SERVER_CFG=open_server.cfg
image: 'bsencan/jedi-academy-server:openjk-beta'
ports:
- '29072:29072/udp'
restart: always
volumes:
- '/root/jedi-academy:/jedi-academy'
The only difference being the images they use. In my docker image this is the script used to start the OpenJK server:
#! /bin/bash
# Environment variables and their default values.
[ -z "$NET_PORT" ] && NET_PORT=29070
[ -z "$FS_GAME" ] && FS_GAME=base
[ -z "$SERVER_CFG" ] && SERVER_CFG=server.cfg
# Symlink directories under /jedi-academy to /root/.local/share/openjk.
mkdir -p /root/.local/share/openjk
find /jedi-academy -maxdepth 1 -mindepth 1 -type d -exec ln -s "{}" /root/.local/share/openjk \; 2>/dev/null
# Configuration files need to be under /opt/ja-server/base directory.
cp /jedi-academy/*.cfg /opt/ja-server/base
# Shouldn't +set fs_game for base.
SET_FS_GAME="+set fs_game $FS_GAME"
if [ "$FS_GAME" = base ]; then
SET_FS_GAME=""
fi
# If an rtvrtm configuration file has been defined and it exists, start rtvrtm.
RTVRTM_CFG_PATH="/jedi-academy/$RTVRTM_CFG"
if [ -f "$RTVRTM_CFG_PATH" ]; then
cp /jedi-academy/*.txt /opt/rtvrtm
cp "$RTVRTM_CFG_PATH" /opt/rtvrtm/rtvrtm.cfg
(sleep 10; python /opt/rtvrtm/rtvrtm.py -c /opt/rtvrtm/rtvrtm.cfg) &
fi
# Start the server.
/opt/ja-server/openjkded.x86_64 \
+set dedicated 2 \
+set net_port "$NET_PORT" \
"$SET_FS_GAME" \
+exec "$SERVER_CFG"
I would suggest making the fs_game the first of the set options and see if that makes any difference.
Did the above suggestion help or is there still issues?
I can let you know next month when I start working on my jedi-academy-server project again.
From: Ensiform
Sent: Monday, December 25, 2017 9:46 PM
To: JACoders/OpenJK
Cc: Baris Sencan; Mention
Subject: Re: [JACoders/OpenJK] [openjkded] +set fs_game X
does not add X
to search paths (#813)
Did the above suggestion help or is there still issues? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
This seems to be an issue still. Using the latest nightly build, with the proposed change applied.
Code: https://github.com/isair/jedi-academy-server/tree/feature/isair-openjk
Honestly not sure what the issue would be, sorry. It works fine elsewhere. Docker probably does something strange with the arguments is all I can think of.
https://github.com/isair/jedi-academy-server/blob/feature/isair-openjk/server/start.sh#L33
This looks a bit suspicious. You're quoting the variable so your command will look like this:
openjkded.x86_64 "+set fs_game \"mod\"" ...
JKA will treat quoted strings as a single argument. Try removing the quotes.
That makes sense why it is not working
Thanks. That does make sense indeed. However it's different behavior than linuxjampded as my master branch works fine on a couple servers right now. I'll try this in a few hours and let you all know.
Yes it is different because it fixes some issues with incorrect parsing of quoted arguments afaik.
It worked. I'm closing the issue.
I'm getting a segfault when any player logs in to the server though. Using the latest 32-bit Linux build. I'll search around a bit and may open an issue.
When I run openjkded.x86_64 with
+set fs_game MBII
, and some other irrelevant parameters, I see this output at start:The map would have been found if the server had
/root/.local/share/openjk/MBII
in its search paths. Am I missing something?Directory information
/opt/ja-server
is where the latest openjk build is downloaded and extracted. So it also has subdirectories/opt/ja-server/base
and/opt/ja-server/OpenJK
./root/.local/share/openjk
is where game files are symlinked from a read-only volume. Containsbase
and various other game directories (MBII
in my case).