Bisa / factorio-init

Factorio init script
MIT License
415 stars 82 forks source link

Option ‘server-adminlist’ does not exist #149

Closed filter-visor closed 5 years ago

filter-visor commented 5 years ago

Hi there. I was just rolling a new headless ubuntu VM (ubuntu-19.04-live-server-amd64) to host a save-game of mine with some friends. I have followed the instructions to the best of my ability and checked multiple times that I am doing everything correctly. I appear to have stumbled upon an issue. Here is what it looks like.

I did as the debug section suggested and turned on debugging and then run the invocation command to see what the script is running. Then run the same command as the factorio user.

factorio@factorio:~$ /opt/factorio-init/factorio invocation

DEBUG: Determining WRITE_DIR based on /opt/factorio/config/config.ini, IF you edited write-data from the default, this probably fails
DEBUG: write path: /opt/factorio/bin/x64/../..
/opt/factorio/bin/x64/factorio --config /opt/factorio/config/config.ini --port 34197 --start-server-load-latest --server-settings /opt/factorio/data/server-settings.json --server-adminlist /opt/factorio/data/server-adminlist.json

So I run the command and here is what the output is.

factorio@factorio:~$ /opt/factorio/bin/x64/factorio --config /opt/factorio/config/config.ini --port 34197 --start-server-load-latest --server-settings /opt/factorio/data/server-settings.json --server-adminlist /opt/factorio/data/server-adminlist.json

Option ‘server-adminlist’ does not exist

Usage:
  factorio [OPTION...]

 General options:
  -h, --help                    display help
      --version                 show version information
  -v, --verbose                 enable verbose logging
  -c, --config PATH             config file to use
      --no-log-rotation         don't rotate log file
      --mod-directory PATH      Mod directory to use
      --check-unused-prototype-data
                                Print a warning for all prototype values that
                                were not accessed
      --executable-path PATH    Override autodetected __PATH__executable.
                                Usually not needed except on very weird systems.

 Running options:
  -s, --map2scenario arg        map to scenario conversion
  -m, --scenario2map arg        scenario to map conversion
      --apply-update arg        immediately apply update package
      --create FILE             create a new map
      --map-gen-settings FILE   Map generation settings for use with
                                --create, --start-server-load-scenario or
                                --generate-map-preview. See
                                data/map-gen-settings.example.json
      --map-gen-seed SEED       Map generation seed for use with --create,
                                --start-server-load-scenario or
                                --generate-map-preview. Will override seed specified in map
                                gen settings
      --map-settings FILE       Map settings for use with --create or
                                --start-server-load-scenario. See
                                data/base/prototypes/map-settings.lua
      --preset arg              Name of the map generation preset to be used.
      --enable-runtime-autoplace-modification
                                Allows changing autoplace specifications
                                runtime in non-multiplayer non-replay enabled
                                games for debug purposes.
      --generate-map-preview PNGFILE
                                Generate preview images of the map
      --generate-tile-properties-csv CSVFILE
                                Generate tile properties into a CSV file; can
                                be used with --generate-map-preview
      --map-preview-size SCALE  Size (in pixels) of map preview (default:
                                1024)
      --map-preview-scale SCALE
                                Scale (meters per pixel) of map preview
                                (default: 1)
      --map-preview-offset X,Y  Offset of the center of the map, in meters
                                (default: 0,0)
      --noise-outputs TAG,TAG...
                                Indicate which variables of noise program to
                                output
      --slope-shading SHADEAMOUNT
                                Apply elevation shading to map preview
      --report-quantities PROTOTYPE,...
                                When generating map preview, report
                                approximate quantities of the named entity prototypes
      --threads THREADCOUNT     Number of threads to use when generating map
                                previews
      --start-server FILE       start a multiplayer server
      --start-server-load-scenario [MOD/]NAME
                                start a multiplayer server and load the
                                specified scenario. The scenario is looked for
                                inside the given mod. If no mod is given, it is
                                looked for in the top-level scenarios directory.
      --start-server-load-latest
                                start a multiplayer server and load the
                                latest available save
      --until-tick TICK         run a save until given map tick
      --benchmark FILE          load save and run benchmark
      --benchmark-ticks N       number of ticks for benchmarking. Default is
                                1000 (default: 1000)

 Server options:
      --port N                  network port to use
      --bind ADDRESS[:PORT]     IP address (and optionally port) to bind to
      --rcon-port N             Port to use for RCON
      --rcon-password PASSWORD  Password for RCON
      --server-settings FILE    Path to file with server settings. See
                                data/server-settings.example.json
      --server-whitelist FILE   Path to file with server whitelist.
      --server-banlist FILE     Path to file with server banlist.
      --console-log FILE        Path to file where a copy of the server's log
                                will be stored
      --server-id FILE          Path where server ID will be stored or read
                                from

I guess that explains why the script won't start the server. I am just not sure what the best resolution would be, so I turned here for some advice.

Thanks so much for your time.

Xiretza commented 5 years ago

Are you still on 0.16? This is due to https://github.com/Bisa/factorio-init/pull/143, which apparently just assumes everyone is on experimental already. Either upgrade to 0.17 or edit out the option in the invocation inside /opt/factorio-init/factorio:

diff --git a/factorio b/factorio
index 0e2bad9..4b5273b 100755
--- a/factorio
+++ b/factorio
@@ -123,7 +123,7 @@ case "$1" in
     fi

     # Finally, set up the invocation
-    INVOCATION="${BINARY} --config ${FCONF} --port ${PORT} --start-server-load-latest --server-settings ${SERVER_SETTINGS} --server-adminlist ${ADMINLIST} ${EXTRA_BINARGS}"
+    INVOCATION="${BINARY} --config ${FCONF} --port ${PORT} --start-server-load-latest --server-settings ${SERVER_SETTINGS} ${EXTRA_BINARGS}"
     ;;
 esac
filter-visor commented 5 years ago

That did the trick, thanks! When I get our group to move to .17 I will be sure to re-add the line. Thanks again.

ericljiang commented 5 years ago

Not sure this issue should be closed since factorio-init installs stable by default yet expects experimental parameters upon invocation. This means that the current workflow of git clone ... ->.../factorio install -> .../factorio start is broken.

ghost commented 5 years ago

Ai. I came here, because i had the same issue. Please mark this in your readme.

douira commented 5 years ago

Thanks, this was driving me crazy for a few hours. Maybe it would be a good idea to not use experimental features if no experimental version is downloaded by default? That makes this project broken by default which is undesirable.