narc0tiq / factorio-updater

Factorio update helper for headless servers
MIT License
245 stars 48 forks source link

experimental updates disabled with -x flag #24

Closed mckalexee closed 7 years ago

mckalexee commented 7 years ago

Summary

When updating my experimental server, I get an error stating that experimental updates are disabled.

System Info

Output

Auto-detected starting version as 0.15.14 from binary.
Applying update with `/home/ubuntu/.factorio/bin/x64/factorio --apply-update /tmp/core-linux_headless64-0.15.14-0.15.15-update.zip`.
b'   0.000 2017-06-02 15:33:36; Factorio 0.15.14 (build 30011, linux64, headless)\n   0.040 Operating system: Linux (Ubuntu 16.04)\n   0.042 Program arguments: "/home/ubuntu/.factorio/bin/x64/factorio" "--apply-update" "/tmp/core-linux_headless64-0.15.14-0.15.15-update.zip" \n   0.042 Read data path: /home/ubuntu/.factorio/data\n   0.042 Write data path: /home/ubuntu/.factorio\n   0.042 Binaries path: /home/ubuntu/.factorio/bin\n   0.055 System info: [CPU: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz, 1 core, RAM: 486MB]\n   0.062 Running in headless mode\n   0.084 Loading mod core 0.0.0 (data.lua)\n   0.094 Loading mod base 0.15.14 (data.lua)\n   0.238 Loading mod base 0.15.14 (data-updates.lua)\n   0.311 Checksum for core: 2224076952\n   0.311 Checksum of base: 2355693671\n   0.456 Info PlayerData.cpp:56: Local player-data.json available, timestamp 1495902333\n   0.456 Info PlayerData.cpp:63: Cloud player-data.json unavailable\n   0.466 Custom inputs active: 0\n   0.466 Info Updater.cpp:751: Downloading https://updater.factorio.com/get-available-versions?username=mckalexee&token=<private>&apiVersion=2\n   0.599 Some core updates would be reachable if experimental updates were enabled.\n   0.599 0 packages available to download (experimental updates disabled).\n   0.603 Factorio initialised\n   0.603 Info Updater.cpp:382: Applying update /tmp/core-linux_headless64-0.15.14-0.15.15-update.zip\n   1.871 Goodbye\n   0.000  Error Util.cpp:62: std::bad_alloc\n'
Traceback (most recent call last):
  File "./update_factorio.py", line 197, in <module>
    main()
  File "./update_factorio.py", line 187, in main
    verbose_aware_exec(update_args, args.verbose)
  File "./update_factorio.py", line 133, in verbose_aware_exec
    captured = subprocess.check_output(exec_args, stderr=subprocess.STDOUT)
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 708, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/ubuntu/.factorio/bin/x64/factorio', '--apply-update', '/tmp/core-linux_headless64-0.15.14-0.15.15-update.zip']' returned non-zero exit status 1
narc0tiq commented 7 years ago

Your Factorio ran out of memory while applying the update - you can see that in the std::bad_alloc it reported.

That the Factorio server is not configured to look for experimental updates is inconsequential, since the updater does the job of fetching them (which a headless server can't do anyway, on account of not being able to prompt you to update).

On Jun 2, 2017 18:41, "Alex McKenzie" notifications@github.com wrote:

Summary

When updating my experimental server, I get an error stating that experimental updates are disabled. System Info

  • Ubuntu 16.04 Server
  • Factorio 0.15.14 under /home/ubuntu/.factorio
  • Python 3.5.2

Command

python ./update_factorio.py -xDa ~/.factorio/bin/x64/factorio Output

Auto-detected starting version as 0.15.14 from binary. Applying update with /home/ubuntu/.factorio/bin/x64/factorio --apply-update /tmp/core-linux_headless64-0.15.14-0.15.15-update.zip. b' 0.000 2017-06-02 15:33:36; Factorio 0.15.14 (build 30011, linux64, headless)\n 0.040 Operating system: Linux (Ubuntu 16.04)\n 0.042 Program arguments: "/home/ubuntu/.factorio/bin/x64/factorio" "--apply-update" "/tmp/core-linux_headless64-0.15.14-0.15.15-update.zip" \n 0.042 Read data path: /home/ubuntu/.factorio/data\n 0.042 Write data path: /home/ubuntu/.factorio\n 0.042 Binaries path: /home/ubuntu/.factorio/bin\n 0.055 System info: [CPU: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz, 1 core, RAM: 486MB]\n 0.062 Running in headless mode\n 0.084 Loading mod core 0.0.0 (data.lua)\n 0.094 Loading mod base 0.15.14 (data.lua)\n 0.238 Loading mod base 0.15.14 (data-updates.lua)\n 0.311 Checksum for core: 2224076952\n 0.311 Checksum of base: 2355693671\n 0.456 Info PlayerData.cpp:56: Local player-data.json available, timestamp 1495902333\n 0.456 Info PlayerData.cpp:63: Cloud player-data.json unavailable\n 0.466 Custom inputs active: 0\n 0.466 Info Updater.cpp:751: Downloading https://updater.factorio.com/get-available-versions?username=mckalexee&token=&apiVersion=2\n 0.599 Some core updates would be reachable if experimental updates were enabled.\n 0.599 0 packages available to download (experimental updates disabled).\n 0.603 Factorio initialised\n 0.603 Info Updater.cpp:382: Applying update /tmp/core-linux_headless64-0.15.14-0.15.15-update.zip\n 1.871 Goodbye\n 0.000 Error Util.cpp:62: std::bad_alloc\n' Traceback (most recent call last): File "./update_factorio.py", line 197, in main() File "./update_factorio.py", line 187, in main verbose_aware_exec(update_args, args.verbose) File "./update_factorio.py", line 133, in verbose_aware_exec captured = subprocess.check_output(exec_args, stderr=subprocess.STDOUT) File "/usr/lib/python3.5/subprocess.py", line 626, in check_output **kwargs).stdout File "/usr/lib/python3.5/subprocess.py", line 708, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['/home/ubuntu/.factorio/bin/x64/factorio', '--apply-update', '/tmp/core-linux_headless64-0.15.14-0.15.15-update.zip']' returned non-zero exit status 1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/narc0tiq/factorio-updater/issues/24, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkG1Vk3uO-SJ5q7g9fieJStMe9JsVbKks5sACztgaJpZM4Nuc6y .

narc0tiq commented 7 years ago

In other news, I'll need to figure out why it printed the Factorio output as a b'yte string'. Rather, how to persuade it to output nicely.

mckalexee commented 7 years ago

This was it. I had it on a 512 MB Lightsail instance. That seemed to be enough to run the server but not enough to update. I switched to the 1 GB instance and it updated correctly.

Auto-detected starting version as 0.15.14 from binary.
Applying update with `/home/ubuntu/.factorio/bin/x64/factorio --apply-update /tmp/core-linux_headless64-0.15.14-0.15.15-update.zip`.
Update applied, deleting temporary file /tmp/core-linux_headless64-0.15.14-0.15.15-update.zip.
Applying update with `/home/ubuntu/.factorio/bin/x64/factorio --apply-update /tmp/core-linux_headless64-0.15.15-0.15.16-update.zip`.
Update applied, deleting temporary file /tmp/core-linux_headless64-0.15.15-0.15.16-update.zip.
Applying update with `/home/ubuntu/.factorio/bin/x64/factorio --apply-update /tmp/core-linux_headless64-0.15.16-0.15.17-update.zip`.
Update applied, deleting temporary file /tmp/core-linux_headless64-0.15.16-0.15.17-update.zip.
Applying update with `/home/ubuntu/.factorio/bin/x64/factorio --apply-update /tmp/core-linux_headless64-0.15.17-0.15.18-update.zip`.
Update applied, deleting temporary file /tmp/core-linux_headless64-0.15.17-0.15.18-update.zip.

Thanks!