GithubHelp home page GithubHelp logo

mitchtalmadge / amp-dockerized Goto Github PK

View Code? Open in Web Editor NEW
81.0 81.0 21.0 331 KB

CubeCoders AMP in a Docker Image. Easily create game servers for games like Minecraft, GMod, TF2, Factorio, and StarBound!

Home Page: https://hub.docker.com/r/mitchtalmadge/amp-dockerized

License: Other

Dockerfile 45.21% Shell 54.79%
amp containers docker docker-compose games gameserver linux minecraft

amp-dockerized's Introduction

Aloha! 🌺 My name is Mitch.

💻 I'm a senior software engineer at ConexED.

🎓 In 2021 I received my Master of Science in Computer Science degree from the University of Utah.

🤙 I have a passion for the Hawaiian culture, and I care deeply about preserving its beautiful language.

🛠 In my free time I love to weld, fix cars, build electronics, go on hikes, and camp in the forest.

♥ My favorite languages are TypeScript, Golang, and Python, but I have extensive experience creating applications in a large number of languages with many of the most popular tools, libraries, and frameworks -- including AWS, GCP, Docker, React, Angular, Webpack, Spring, Node.JS, Zend, Laravel, and SO much more. I am never afraid to learn new technology, as my 12+ years of experience in Computer Science allow me to spot the inherent similarities between old and new tools and languages to make for a very quick ramp-up into any project.

👨‍💻 My software engineering experience covers everything from the web browser to embedded circuitry. I have created full-scale web applications in Angular, React, and Vue; I have helped companies achieve their goals in load balancing and auto-scaling with AWS; and I have constructed entire IoT ecosystems from start to finish -- including everything from the C++ embedded firmware, WiFi management libraries, Angular-based mobile setup app, RESTful API, Java Spring backend, and Angular-based device dashboard. For that project, I even used my knowledge in electrical engineering to help resolve problems in the IoT circuitry.

There is no project so big that I cannot help; I am extremely passionate about what I do, and I am ready to dive in and find eloquent solutions to any problem.


Github Stats

Reach out to me here: https://MitchTalmadge.com/contact

amp-dockerized's People

Contributors

3d6564 avatar iceofwraith avatar joly0 avatar kieeps avatar migushthe2nd avatar mitchtalmadge avatar phonicuk avatar redsparr0w avatar rekonnected avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

amp-dockerized's Issues

Allow Nightly Builds

The current version of AMP, 2.0.6.6, causes some instances to fail to start. This is fixed in nightly builds, but this image does not support nightly builds. We should add an env var to enable them.

Generic Module

AMP 1.9.5.0 just got announced with support for a "generic" module that lets you run anything you want. This will need to be tested

Warn if LICENCE not provided

Right now LICENCE defaults to "notset" which just causes the activation to fail. Might be nice to provide a more user friendly warning ahead of time by checking if the variable is actually set.

Instances loose/forget licence after update

After an update, the instances "forget" the licence and therefore are unable to start.

This needs to be fixed manually by using the command "ampinstmgr --reactivateall $licence" after every new update.

I could make a PR to reactivate the instances in the startup script, though i am not sure if this problem is only occuring for me or if this might be a general issue

AMP cannot update the terminal cursor position for displaying download progress

I suddenly get this error when trying to start AMP:

[Info] Downloading AMP from https://cubecoders.com/Downloads/AMP_Latest.zip...
Unhandled Exception:
System.ArgumentOutOfRangeException: Value must be positive and below the buffer width.
Parameter name: left
  at System.TermInfoDriver.SetCursorPosition (System.Int32 left, System.Int32 top) [0x00021] in <11e8c3ad554843aabf495f404ae51ab6>:0 
  at System.TermInfoDriver.set_CursorLeft (System.Int32 value) [0x00016] in <11e8c3ad554843aabf495f404ae51ab6>:0 
  at System.ConsoleDriver.set_CursorLeft (System.Int32 value) [0x00000] in <11e8c3ad554843aabf495f404ae51ab6>:0 
  at System.Console.set_CursorLeft (System.Int32 value) [0x00000] in <11e8c3ad554843aabf495f404ae51ab6>:0 
  at InstanceManagerPlugin.LocalInstanceManager+<>c__DisplayClass172_1.<DownloadAndUnpack>g__ShowDownloadProgress|2 (System.Object sender, System.EventArgs e) [0x00000] in <6f2ae92962aa4edd9b4748666d12161e>:0 
  at ModuleShared.RunningTask.set_ProgressPercent (System.Int32 value) [0x0001a] in <c64a05644725485cb681794768148712>:0 
  at ModuleShared.Utilities+<>c__DisplayClass15_0.<DownloadFileWithProgressAsync>g__DownloadProgressChanged|0 (System.Object sender, System.Net.DownloadProgressChangedEventArgs e) [0x00091] in <c64a05644725485cb681794768148712>:0

My guess is that AMP started displaying some fancy ASCII-art download progress bar when downloading AMP_Latest.zip but did not anticipate being executed in a context where the terminal may not have valid dimensions. So it then tries to position the cursor based on some value that is calculated using the terminal dimensions, but since those are 0 or -1 or something, the position is out of range and the program crashes with an exception.

I'm not a linux expert, but maybe launching AMP in some sort of emulated terminal would help?

Amp using portainer

Followed the steps however I'm having trouble accessing the webui, 8080 doesn't work even though I mapped it to a port on a bridged docker/portainer connection. I would assume I type my network address 192.168.1.157:46513 to access the webui.

Any help would be appreciated. Thanks!

Published port/ip: Network type Bridged | Host 192.168.1.157 | Docker 172.17.0.3 | 46513:8080

AMP_SUPPORT_LEVEL | UNSUPPORTED

AMP_SUPPORT_TAGS | nosupport docker community unofficial unraid
AMP_SUPPORT_TOKEN | AST0/MTAD
AMP_SUPPORT_URL | https://github.com/MitchTalmadge/AMP-dockerized/
GID | 1000
LANG | en_US.UTF-8
LANGUAGE | en_US:en
LC_ALL | en_US.UTF-8
LICENCE | NO
MODULE | ADS
PASSWORD | password
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PORT | 8080
TZ | Etc/UTC
UID | 1000
USERNAME | admin

Host/volume | Path in container

be1a5b67228157e8bf0b601874eb7bf2a19e2fbb6ce71fa9b445d2f468712a14 | /home/amp/.ampdata

=======

Logs


Starting AMP-Dockerized...


Note: This is an UNOFFICIAL IMAGE for CubeCoders AMP. This was created by the community, NOT CubeCoders.

Please, DO NOT contact CubeCoders (Discord or otherwise) for technical support when using this image.

They do not support nor endorse this image and will not help you.

Instead, please direct support requests to https://github.com/MitchTalmadge/AMP-dockerized/issues.

We are happy to help you there!

Thank you!!


Copying AMP Core...

Ensuring AMP user exists...

Adding group `amp' (GID 1000) ...

Done.

Adding system user `amp' (UID 1000) ...

Adding new user amp' (UID 1000) with group amp' ...

Not creating home directory `/home/amp'.

Ensuring correct file permissions...

Setting timezone from TZ env var...

Current default time zone: 'Etc/UTC'

Local time is now: Tue Jul 27 14:04:15 UTC 2021.

Universal Time is now: Tue Jul 27 14:04:15 UTC 2021.

Making sure Main instance exists...

Creating Main instance... (This can take a while)

[Info] AMP Instance Manager v2.2 built 09/07/2021 18:45

[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV

[Info] Testing internet connection...

[Info] Checking licence key...

[Info] This licence key does not exist.

Setting all instances to use MainLine updates...

Upgrading Instances...

[Info] AMP Instance Manager v2.2 built 09/07/2021 18:45

[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV

[Info] There are no instances to update.

Ensuring Main Instance will Start on Boot...

Starting AMP...

[Info] AMP Instance Manager v2.2 built 09/07/2021 18:45

[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV

[Info] No AMP instances are currently set to start automatically on boot.

Unable to load Minecraft, Permission Issues

Loading up a default config and starting up Minecraft 1.17 causes some permission issues. I'm unable to start minecraft or save any Minecraft Server settings in the UI.
I think it's related to all moduals I'm unable to load Factorio as well.

UID and GUID are my local user.
This user is apart of the Docker group.
I'm running on Ubuntu 20 Host.
I've tried setting all the files/folder to 777

Adding privileged: true to the docker-compose config Seems to fix the issues, but probably isn't the right solution.

Config:

  amp:
    container_name: amp
    image: mitchtalmadge/amp-dockerized:latest
    restart: unless-stopped
    mac_address: 02:42:AC:3C:EB:F8 # Please see the README about this field.
    ports:
      - 25565:25565 # For Java Edition (TCP)
      - 8125:8123
      - 19132:19132/udp # For Bedrock Edition (UDP)
      - 25570:8080 # Maybe you already have something running on 8080, so we could map to 25570. Remove if you want to use 8080.
    volumes:
      -  $USERDIR/docker/amp/data:/home/amp/.ampdata
    environment:
      TZ: ${TZ}
      UID: ${PUID}
      GID: ${PGID}
      LICENCE: ""
      MODULE: Minecraft

Minecraft 1.17 Error:

java.lang.RuntimeException: java.nio.file.FileSystemException: .: Operation not permitted
at dib.<init>(SourceFile:98) ~[minecraft_server.jar:?]
at dib.a(SourceFile:105) ~[minecraft_server.jar:?]
at net.minecraft.server.Main.main(SourceFile:122) [minecraft_server.jar:?]
Caused by: java.nio.file.FileSystemException: .: Operation not permitted
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:100) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
at sun.nio.fs.UnixPath.toRealPath(UnixPath.java:852) ~[?:?]
at dib.<init>(SourceFile:96) ~[minecraft_server.jar:?]

Factorio Error

Error Util.cpp:83: filesystem error: cannot make canonical path: Operation not permitted [/home/amp/.ampdata/instances/ATM601/factorio/bin/x64/../../data]

Minecraft Not broadcasting to LAN/ Unraid

I have noticed that everything I try to do on unraid to get the port 25565-25566 to broadcast to the local machines does not work. I have disabled firewalls and changed IP's but it still does not show. Is this not supported? I tried with a host and a Bonded interface.
Capture

SFTP: Unsupported File Open Mode

When I try to connect via SFTP I get a "Unsupported File Open Mode" by my FTP Client, Cyberduck.

That's my docker-compose.yml

version: "3.8"

services:
  amp:
    image: mitchtalmadge/amp-dockerized
    mac_address: 02:42:AC:6A:CF:39
    volumes:
      - mc_data:/home/amp/.ampdata
    ports:
      - 25565:25565
      - 127.0.0.1:8080:8080
      - 127.0.0.1:2223:2223/udp
      - 127.0.0.1:2223:2223/tcp
    environment:
      LICENCE: "X"
      MODULE: "Minecraft"
      TZ: "Europe/Berlin"

volumes:
  minecraft_jahrgangsprojekt:

include xz-utils

Be great if this container included xz-utils. Need it so the Factorio server can extract. The package is small, less than 1 MB.

Detect invalid licence key on startup

Right now if the Main instance fails to be created due to an invalid licence key, the entrypoint will assume things went fine and will continue running even though no Main instance is ever created.

amp_1  | Making sure Main instance exists...
amp_1  | Creating Main instance... (This can take a while)
amp_1  | [Info] AMP Instance Manager v2.0.8.10 built 15/12/2020 17:10
amp_1  | [Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
amp_1  | [Error] X is not a valid licence key.

We should detect the error and shut down the container.

Valheim and possibly all steamcmd instances fail to update/start on unraid.

I've poke at this a bit on and off, and can't seem to pin it down. It seems to me some of the init scripts are having issues.
It falls into a loop of attempting to run steamcmd possibly from a wrong path or without dealing with the extract correctly?
then launching fails if I try to workaround the install phase.

This is on unraid with the AMP instance working fine to host a minecraft and factorio instance.

on a new instance creation it just falls into a fail loop when I hit update in the gui.

[13:29:39] [Core Info]            : Running in a Docker environment.
[13:29:39] [Core Warning]         : Current time zone is set to MST - Servers should ideally be UTC to avoid time-zone related issues
[13:29:39] [Core Info]            : OS: Linux / x86_64
[13:29:39] [Core Info]            : CPU: AMD Ryzen Threadripper 3960X 24-Core Processor (24C/48T)
[13:29:39] [Core Info]            : AMP Instance ID: REDACTED
[13:29:39] [ModuleLoader Info]    : Loaded GenericModule version 1.0.0.0 by CubeCoders Limited
[13:29:39] [Core Info]            : Metrics publishing is enabled at udp://localhost:12820.
[13:29:39] [ModuleLoader Info]    : Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
[13:29:39] [ModuleLoader Info]    : Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
[13:29:39] [ModuleLoader Info]    : Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
[13:29:39] [ModuleLoader Info]    : Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
[13:29:39] [ModuleLoader Info]    : Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
[13:29:39] [ModuleLoader Info]    : GenericModule requests dependency steamcmdplugin...
[13:29:39] [ModuleLoader Info]    : Loaded steamcmdplugin version 1.0.0.0 by CubeCoders Limited
[13:29:39] [Core Info]            : Licence Present: AMP Professional Edition (Licenced to REDACTED)
[13:29:39] [FileManager Notice]   : No SSH keypair available for embedded server, generating new keypair...
[13:29:39] [FileManager Notice]   : Generated new keypair with fingerprint REDACTED
[13:29:39] [FileManager Notice]   : Using keypair with fingerprint REDACTED
[13:29:39] [FileManager Info]     : SFTP Server started on 0.0.0.0:2226
[13:29:39] [WebServer Info]       : Websockets are enabled.
[13:29:39] [WebServer Info]       : Webserver started on http://127.0.0.1:8083
[13:29:39] [Logger Warning]       : RouterTimer@10Hz with 2 jobs started
[13:29:39] [Core Info]            : Checking for AMP updates...
[13:29:40] [Core Info]            : AMP is up-to-date.
[13:29:55] [RemoteAMPAuth:Anonymous Activity] : Authentication attempt for user admin from 127.0.0.1
[13:29:55] [RemoteAMPAuth:Anonymous Activity] : Authentication success
[13:30:04] [API:admin Activity]   : Updating the application.
Redirecting stderr to '/home/amp/Steam/logs/stderr.txt'
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[  0%] Checking for available update...
[  0%] Downloading update (0 of 80,449 KB)...
[  0%] Downloading update (5,110 of 80,449 KB)...
[  6%] Downloading update (11,675 of 80,449 KB)...
[ 14%] Downloading update (16,663 of 80,449 KB)...
[ 20%] Downloading update (22,106 of 80,449 KB)...
[ 27%] Downloading update (27,011 of 80,449 KB)...
[ 33%] Downloading update (32,017 of 80,449 KB)...
[ 39%] Downloading update (36,915 of 80,449 KB)...
[ 45%] Downloading update (42,397 of 80,449 KB)...
[ 52%] Downloading update (47,400 of 80,449 KB)...
[ 58%] Downloading update (51,849 of 80,449 KB)...
[ 64%] Downloading update (54,553 of 80,449 KB)...
[ 67%] Downloading update (57,193 of 80,449 KB)...
[ 71%] Downloading update (59,598 of 80,449 KB)...
[ 74%] Downloading update (61,957 of 80,449 KB)...
[ 77%] Downloading update (64,652 of 80,449 KB)...
[ 80%] Downloading update (67,107 of 80,449 KB)...
[ 83%] Downloading update (69,531 of 80,449 KB)...
[ 86%] Downloading update (72,208 of 80,449 KB)...
[ 89%] Downloading update (74,631 of 80,449 KB)...
[ 92%] Downloading update (77,108 of 80,449 KB)...
[ 95%] Downloading update (79,783 of 80,449 KB)...
[ 99%] Downloading update (80,449 of 80,449 KB)...
[100%] Download Complete.
[----] Applying update...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Cleaning up...
[----] Failed to remove temporary unzip folder, continuing anyway
[----] Update complete, launching...
Redirecting stderr to '/home/amp/Steam/logs/stderr.txt'
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[  0%] Checking for available update...
[  0%] Download Complete.
[----] Verifying installation...
[  0%] Downloading Update...
[  0%] Checking for available update...
[  0%] Download Complete.
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Cleaning up...
[----] Failed to remove temporary unzip folder, continuing anyway
[----] Update complete, launching...

so then I did roughly

su amp
cd home/amp/.ampdata/instances/ServerName/Valheim
rm -rf linux32
mv package/tmp/* ./

from there I ran the update from amp gui again.

[13:41:38] [RemoteAMPAuth:Anonymous Activity] : Authentication attempt for user admin from 127.0.0.1
[13:41:38] [RemoteAMPAuth:Anonymous Activity] : Authentication success
[13:41:42] [API:admin Activity]   : Updating the application.
Redirecting stderr to '/home/amp/Steam/logs/stderr.txt'
/tmp/dumps is not owned by us - delete and recreate
Unable to delete /tmp/dumps. Continuing anyway.
[  0%] Checking for available updates...
[----] Downloading update (137 of 53,972 KB)...
[  0%] Downloading update (3,691 of 53,972 KB)...
[  6%] Downloading update (7,544 of 53,972 KB)...
[ 13%] Downloading update (10,026 of 53,972 KB)...
[ 18%] Downloading update (12,524 of 53,972 KB)...
[ 23%] Downloading update (15,264 of 53,972 KB)...
[ 28%] Downloading update (17,718 of 53,972 KB)...
[ 32%] Downloading update (20,214 of 53,972 KB)...
[ 37%] Downloading update (22,957 of 53,972 KB)...
[ 42%] Downloading update (25,432 of 53,972 KB)...
[ 47%] Downloading update (27,906 of 53,972 KB)...
[ 51%] Downloading update (30,632 of 53,972 KB)...
[ 56%] Downloading update (33,095 of 53,972 KB)...
[ 61%] Downloading update (35,096 of 53,972 KB)...
[ 65%] Downloading update (36,805 of 53,972 KB)...
[ 68%] Downloading update (38,021 of 53,972 KB)...
[ 70%] Downloading update (39,273 of 53,972 KB)...
[ 72%] Downloading update (40,623 of 53,972 KB)...
[ 75%] Downloading update (41,855 of 53,972 KB)...
[ 77%] Downloading update (43,101 of 53,972 KB)...
[ 79%] Downloading update (44,464 of 53,972 KB)...
[ 82%] Downloading update (45,707 of 53,972 KB)...
[ 84%] Downloading update (47,059 of 53,972 KB)...
[ 87%] Downloading update (48,299 of 53,972 KB)...
[ 89%] Downloading update (49,534 of 53,972 KB)...
[ 91%] Downloading update (50,884 of 53,972 KB)...
[ 94%] Downloading update (52,116 of 53,972 KB)...
[ 96%] Downloading update (53,365 of 53,972 KB)...
[ 98%] Downloading update (53,972 of 53,972 KB)...
[100%] Download complete.
[----] Installing update...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steamcmd...
Redirecting stderr to '/home/amp/Steam/logs/stderr.txt'
/tmp/dumps is not owned by us - delete and recreate
Unable to delete /tmp/dumps. Continuing anyway.
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK
Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
 Update state (0x11) preallocating, progress: 22.27 (235839406 / 1059006974)
 Update state (0x61) downloading, progress: 0.00 (0 / 1059006974)
 Update state (0x61) downloading, progress: 6.57 (69594853 / 1059006974)
 Update state (0x61) downloading, progress: 39.25 (415708222 / 1059006974)
 Update state (0x61) downloading, progress: 58.53 (619860849 / 1059006974)
 Update state (0x61) downloading, progress: 72.43 (767065361 / 1059006974)
 Update state (0x61) downloading, progress: 87.41 (925713225 / 1059006974)
 Update state (0x81) verifying update, progress: 5.58 (59127591 / 1059006974)
 Update state (0x81) verifying update, progress: 54.53 (577476890 / 1059006974)
 Update state (0x101) committing, progress: 22.87 (242227237 / 1059006974)
Success! App '896660' fully installed.

then hit start.

[13:43:19] [API:admin Activity]   : Starting the application.
[13:43:19] [APIService:admin Warning] : Returned exception from API call Core/Start
[13:43:19] [Core:admin Error]     : ArgumentException
[13:43:19] [Core:admin Error]     : [0] (ArgumentException) : An item with the same key has already been added. Key: ServerName
[13:43:19] [Core:admin Error]     :   at Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, Collections.Generic.InsertionBehavior behavior) 
  at Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) 
  at ModuleShared.EnumerableExtensions.AddRange[K,V] (Collections.Generic.IDictionary`2[TKey,TValue] source, Collections.Generic.IEnumerable`1[T] values) 
  at GenericModule.GenericModuleConfig+ApplicationConfig.GetCommandLineArgs (ModuleShared.SupportedOS OS, String FormattedArgs) 
  at GenericModule.GenericApp.SetupProcess () 
  at GenericModule.GenericApp.Start () 
  at GSMyAdmin.WebServer.WebMethods.Start () 
  at GSMyAdmin.WebServer.WebAttributes.InvokeMethod (String MethodName, Newtonsoft.Json.Linq.JObject Data, m.Http.IHttpRequest request, ModuleShared.IWebSession Session, ModuleShared.WebMethodsBase MethodsClass, String RawRequest) 
  at GSMyAdmin.WebServer.APIService.InvokeAPI (m.Http.IHttpRequest request, ModuleShared.IWebSession Session, Newtonsoft.Json.Linq.JObject Data, String RequestModule, String RequestMethod, String RawRequest) 

Source (TF2, GMod, etc) Support

Source games seem to start up just fine, but I can't find them in the server lists and the ports don't seem to be open (at least through ADS -- will have to test them standalone).

Licences invalidated

Every time the container is restarted, all instances are disabled because their licences are detected as invalid:
Here's the AMPLOG:

[12:28:14] [Core Warning]         : Unrecognised argument: 127.0.0.1 +filemanagerplugin.sftp.sftpportnumber. See -help for arguments list.
[12:28:14] [Core Warning]         : Unrecognised argument: 2225 +minecraftmodule.minecraft.portnumber. See -help for arguments list.
[12:28:14] [Core Warning]         : Unrecognised argument: 25566\. See -help for arguments list.
[12:28:14] [Core Info]            : Running in a Docker environment.
[12:28:14] [Core Warning]         : Current time zone is set to CET - Servers should ideally be UTC to avoid time-zone related issues
[12:28:14] [Core Info]            : OS: Linux / x86_64
[12:28:14] [Core Info]            : CPU: Intel(R) Xeon(R) CPU X5560 @ 2.80GHz (4C/8T)
[12:28:14] [Core Info]            : AMP Instance ID: c96d5461-ce5c-4883-9f39-00942b6093c9
[12:28:18] [ModuleLoader Info]    : Loaded MinecraftModule version 1.0.0.3 by CubeCoders Limited
[12:28:18] [ModuleLoader Info]    : Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
[12:28:18] [ModuleLoader Info]    : Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
[12:28:18] [ModuleLoader Info]    : Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
[12:28:18] [ModuleLoader Info]    : Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
[12:28:18] [ModuleLoader Info]    : Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
[12:28:18] [Core Error]           : Unable to set Core.Webserver.Port (Int32) to 8082 +Core.Webserver.IPBinding
[12:28:18] [Core Error]           : Input string was not in a correct format.
[12:28:18] [FileManager Notice]   : Using keypair with fingerprint UI5kSme6puWKipMki8UQZTFUlGWm8jhBrKVWwYVO5NY=
[12:28:18] [FileManager Info]     : SFTP Server started on 0.0.0.0:2225
[12:28:18] [Core Error]           : No valid AMP licence was found. Please run `ampinstmgr reactivate BKK` to reactivate this instance.

Proposal: Release AMP Updates as Docker Images; Remove Auto-Update

Problem:

Right now this image automatically pulls updates to AMP and ampinstmgr on startup. This can make startup take ~10 minutes every time AMP releases an update because of how they throttle download speeds.

Proposed Solution:

I propose that we use GitHub Actions continuous integration to detect AMP updates on a cron schedule to automatically release new AMP-Dockerized images on a rolling basis as updates are released.

These auto-generated images would come with the latest AMP version (including ampinstmgr) pre-installed so that updating containers is as easy as running docker pull mitchtalmadge/amp-dockerized:latest or docker-compose pull.

This would be accomplished by the GitHub Actions CI making a commit to the master branch with the latest version number hard-coded into the Dockerfile. Then it would tag the commit so that a release is generated in a format similar to this:

mitchtalmadge/amp-dockerized:v6-amp2.0.8.6

which will also be deployed to the :latest image tag.

  • The Dockerfile will automatically download and install ampinstmgr from the CubeCoders Debian repository (see https://cubecoders.com/AMPInstall)
    • The Debian repository contains old images which we can select by version number.
  • Ideally, the image should download the latest version of the actual AMP software from https://cubecoders.com/Downloads/AMP_Latest.zip (e.g. AMPCache-2086.zip), store it in /opt somewhere, and on startup the entrypoint script should copy that downloaded file into /home/amp/.ampdata/instances/.
    • The reason for not downloading straight to /home/amp/.ampdata/instances/ is because this is part of a volume which can only be accessed once the image is started on the machine where the volume is created. We will not have access during CI.

AMP versions can be obtained from https://cubecoders.com/AMPVersions.json

Concerns:

  • My primary concern is for users who rely on container restarts to get automatic AMP updates and who will not be aware of the requirement to pull new images to keep getting updates for future versions of the container. However, since auto-update will continue working for the images that already exist before these changes, these users will be un-affected until they update. If they do update, then they should hopefully check the changelog and understand that image updates are important from then on.
    • Ideally, our users should be updating their containers on a regular basis anyway.
    • We could also add a startup message about the new way to get updates, or even detect that the container is running an old AMP version and prompt them to update their image.
  • This would increase our image size by ~105MB
    • However, this amount of data is downloaded anyway (65MB for ampinstmgr, 40MB for AMP itself) on startup, so all we are doing is shifting it to the image, which will download a lot faster than from CubeCoders.

Proposal Changelog:

  1. Changed download method of ampinstmgr based on @Joly0's suggestion to use the CubeCoders Debian repo.

Please let me know what you think of this and of any pitfalls I may have not thought of. I am open to ideas!

/cc @Joly0

AMP Instance has an error while starting up

Hey, I am having a bit of a problem here, I've tried to set up AMP but after a successful download of AMP it won't configure itself correctly.

amp    | ----------------------
amp    | Starting AMP-Dockerized...
amp    | ----------------------
amp    | Note: This is an UNOFFICIAL IMAGE for CubeCoders AMP. This was created by the community, NOT CubeCoders.
amp    | Please, DO NOT contact CubeCoders (Discord or otherwise) for technical support when using this image.
amp    | They do not support nor endorse this image and will not help you.
amp    | Instead, please direct support requests to https://github.com/MitchTalmadge/AMP-dockerized/issues.
amp    | We are happy to help you there!
amp    | Thank you!!
amp    | ----------------------
amp    |
amp    | Copying AMP Core...
amp    | Ensuring AMP user exists...
amp    | Ensuring correct file permissions...
amp    | Setting timezone from TZ env var...
amp    |
amp    | Current default time zone: 'Europe/Berlin'
amp    | Local time is now:      Sun Aug 22 13:27:35 CEST 2021.
amp    | Universal Time is now:  Sun Aug 22 11:27:35 UTC 2021.
amp    |
amp    | Making sure Main instance exists...
amp    | Creating Main instance... (This can take a while)
amp    | [Info] AMP Instance Manager v2.2.0.4 built 05/08/2021 12:57
amp    | [Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
amp    | [Warning] Instance will be created under its own system user. Ideally you should use the --docker flag to create the instance in a container.
amp    | [Info] Testing internet connection...
amp    | [Info] Checking licence key...
amp    | [Info] Licence Type:  AMP Network Standard
amp    | [Info] Current Usage: 0
amp    | [Info] Creating Instance: 'Main'
amp    | [Info] Performing Step: Creating Environment
amp    | [Activity] Audit: Unknown/None [CreateInstance] Created instance Main using ADS module on port 8080.
amp    | [Info] Performing Step: Downloading AMP
amp    | [Info] No cache exists for 2204
amp    | [Info] Downloading AMP from https://cubecoders.com/Downloads/AMP_Latest.zip...
amp    |
amp    | [Info] Complete
amp    | [Info] Performing Step: Unpacking
amp    | [Info] Performing Step: Configuring AMP
amp    | [Error] Configuration Failed: AMP configuration failed with return code 1
amp    | [Info] Instance creation failed. AMP configuration failed with return code 1
amp    | Setting all instances to use MainLine updates...
amp    | Upgrading Instances...
amp    | [Info] AMP Instance Manager v2.2.0.4 built 05/08/2021 12:57
amp    | [Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
amp    | [Warning] The user you're logged in as has no instances, but you have a separate 'amp' system user - did you mean to run ampinstmgr as that user instead?
amp    | [Warning] If you used the one-line quick install from the installation guide, you should login as the AMP user using the details you specified during setup to modify and manage AMP instances.
amp    | [Warning] If you're logged in as root, you can do `su -l amp` to switch over, or if you're a non-root admin user you can use `sudo su -l amp`.
amp    | [Info] There are no instances to update.
amp    | Ensuring Main Instance will Start on Boot...
amp    | Starting AMP...
amp    | [Info] AMP Instance Manager v2.2.0.4 built 05/08/2021 12:57
amp    | [Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
amp    | [Info] No AMP instances are currently set to start automatically on boot.
amp    | AMP Started.
amp    | ----------------------
amp    | NOTICE: Java 16 is now included in this image, but Java 11 is still the default. Use the Java Configuration section in the AMP Web UI to select a specific version. Otherwise, Java 11 will be used automatically.
amp    | ----------------------
amp    | Entrypoint Sleeping. Logs can be viewed through AMP web UI or at ampdata/instances/Main/AMP_Logs

Java Version 11

Tonight the Paper MC team announced that they will be bumping the minimum Java version to 11 when Minecraft 1.17 is released in Summer of 2021.

Info here: https://papermc.io/forums/t/java-11-mc-1-17-and-paper/5615

This means that if we do not update to v11, then many servers using our container will not be able to update to the latest Minecraft version. We currently use v8.

A problem is that some older versions of Minecraft do not work with Java 11. So we have two options:

  1. Drop support for Java 8 in this container and potentially cause problems for people using it.
  2. Find a way to support both versions.

Option 2 is ideal, and my only idea right now is to install both versions, with Java 11 being the default, and find some way for people who want to use Java 8 to somehow specify the binary to use.

There is a modified JDK as suggested earlier by @Joly0, but I don't feel comfortable forcing this unofficial build of Java on all the users of this container. I would prefer to find a solution using official builds.

Ideas are welcome!

Multiple Minecraft Servers?

Diagnostic Info

OS | Linux
Platform | Ubuntu 20.04.2 LTS
System Type | x86_64
Virtualization | Docker
Module | MinecraftModule
Loaded Plugins | FileManagerPlugin, EmailSenderPlugin, WebRequestPlugin, LocalFileBackupPlugin, CommonCorePlugin
Application Name | AMP
Application Version | 2.2.0.2
Release Stream | Release
Build Date | 26/07/2021 12:53

So far the Docker container has been working great, aside from something I think I'm missing. I've been using itzg/minecraft-server for a while and saw AMP as a way to consolidate all of my servers into an admin panel/runner. However, when I log into the AMP Panel, I only have the option to work with a single Minecraft Server. Do I need to run different instances of the image in my compose network to be able to use more than one? IE I have a vanilla, a Pixelmon, and a creative server, am I supposed to only have access to one server with this container?

If not, that's cool too, just didn't see an issue that mentioned this.

Instances no longer auto updating

I have the container restart daily for backup purposes which until recently has always kept my AMP up to date. However lately, having first noticed it for 2.0.6.4 and now also 2.0.6.6, the instances aren't upgrading on their own. Looking in the docker log, AmpInstMgr itself is updating but the instance update does not appear to be triggering. This is the case both for the "Main" ADS instance and all game instances.

I've attached container start log below, wondering if anyone else has encountered this same issue or if I'm somehow broken it. I don't see anything obvious in the log aside from the Creating "Main" for ADS which fails as it already exists.

Simplying docker exec'ing into the container as the amp user and running ampinstmgr upgradeall upgrades successfully, as you would do if not running via docker. Just not sure why the behaviour has changed.

Ensuring AMP User Exists...
Checking for ampinstmgr updates...
2020-09-24 12:01:00 URL:https://cubecoders.com/AMPVersions.json [336/336] -> "/tmp/AMPVersions.json" [1]
Latest Version: 2.0.6.6
Current Version: 2.0.6.6
No updates needed.
Creating Main Instance... (This can take a while)
[Info] AMP Instance Manager v2.0.6.6 built 18/09/2020 11:41
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Testing internet connection...
[Info] Checking licence key...
[Info] Licence Type: AMP Network Standard
[Info] Current Usage: 1
[Info] Creating Instance: 'Main'
[Info] Instance creation failed. You may not create multiple ADS instances within the same OS.
Ensuring Main Instance will Start on Boot...
Starting AMP...
[Info] AMP Instance Manager v2.0.6.6 built 18/09/2020 11:41
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Waiting for AMP instance to start...
[Notice] AMP instance Main is now running.
[Info] Waiting for AMP instance to start...
[Notice] AMP instance Minecraft08 is now running.
[Info] Waiting for AMP instance to start...
[Notice] AMP instance Minecraft07 is now running.
[Info] Waiting for AMP instance to start...
[Notice] AMP instance MattyEternal is now running.
AMP Started.
Entrypoint Sleeping. Logs can be viewed through AMP web UI or at ampdata/instances/Main/AMP_Logs

Got a ploblem with Valheim

I haven't tried much else then Minecraft and Valheim, but for some reason i have to run docker exec --user amp amp-linux ampinstmgr --nocache upgradeall after every time i restart the container or the Valheim instances wont start. would it be possible to have the instance upgraded on container start?

It already updates everything else :)

Cant login!

I have a question about the docker container in unraid not sure if anyone can answer it but having trouble I was able to get the key installed and a static mac address for the container but it will not allow me to login at all.

Instance update issue

Instances will start but get this error string when updating

"Redirecting stderr to '/home/amp/Steam/logs/stderr.txt'
Looks like steam didn't shutdown cleanly, scheduling immediate update check
src/tier0/threadtools.cpp (4044) : Assertion Failed: Probably deadlock or failure waiting for thread to initialize.
[ 0%] Checking for available updates...
Thread failed to initialize
src/tier0/threadtools.cpp (4044) : Assertion Failed: Probably deadlock or failure waiting for thread to initialize.
Thread failed to initialize
CWorkThreadPool::StartWorkThread: Thread creation failed.
Exiting on SPEW_ABORT"

Can't update any servers to newest version (Valheim and ARK)

Thank you.

AMP cannot clone Spigot code if you only map the .ampdata volume

I found that when setting up a Minecraft Spigot instance, when I chose the Spigot server type, the notification would disappear very quickly with no status shown. Looking in the Console, I found that there was a Permission Denied error on /home/amp/.gitconfig; this would be inside the container if (as I did) followed the instructions and only mapped the /home/amp/.ampdata volume.

To fix it, I mapped /home/amp to to a persistent volume - this created a .ampdata folder as well as a .config folder - but more importantly, ensured that the /home/amp folder had the right permissions for the user running AMP to be able to create the /home/amp/.gitconfig folder and clone the Spigot tools down into it.

Session ID uses localhost (127.0.0.1) as IP address sometimes

I started getting a lot of warnings in my console when playing with an ADS instance after trying to start a gmod server:

[07:10:21] [APIService Warning]    :  ###.###.###.### tried to use session ID ######-####-####-####-########  - but that session belongs to 127.0.0.1

Blanked out the actual IP and session ID, but essentially the session "belongs" to localhost when it should belong to the public IP of the user. Very odd.

Java 16

What is the easiest way for me to upgrade this docker to include java 16? I need it for Minecraft version 21w19a

Getting no ip

Greetings,

I am currently testing before i am doing an upgrade,
But it seems like my contrainer does not seem to pickup the right ip adres should be 192.168.0.108:8081

[09:09:07] [Core Info]            : Running in a Docker environment.
[09:09:07] [Core Info]            : OS: Linux / x86_64
[09:09:07] [Core Info]            : CPU: Intel(R) Celeron(R) CPU J3355 @ 2.00GHz (2C/2T)
[09:09:07] [Core Info]            : AMP Instance ID: xxxx-xxxx-xxxx-xxxx
[09:09:08] [ModuleLoader Info]    : Loaded ADSModule version 1.0.0.0 by CubeCoders Limited
[09:09:08] [ModuleLoader Info]    : Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
[09:09:08] [ModuleLoader Info]    : Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
[09:09:08] [ModuleLoader Info]    : Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
[09:09:08] [ModuleLoader Info]    : Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
[09:09:08] [ModuleLoader Info]    : Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
[09:09:08] [ModuleLoader Info]    : ADSModule requests dependency InstanceManagerPlugin...
[09:09:09] [ModuleLoader Info]    : Loaded InstanceManagerPlugin version 1.0.0.0 by CubeCoders Limited
[09:09:09] [ModuleLoader Info]    : ADSModule requests dependency SystemUserManagerPlugin...
[09:09:09] [ModuleLoader Info]    : Loaded SystemUserManagerPlugin version 1.0.0.0 by CubeCoders Limited
[09:09:09] [ModuleLoader Info]    : Loaded steamcmdplugin version 1.0.0.0 by CubeCoders Limited
[09:09:09] [WebServer Info]       : Websockets are enabled.
[09:09:09] [Logger Warning]       : RouterTimer@10Hz with 2 jobs started
[09:09:09] [WebServer Info]       : Webserver started on 0.0.0.0:8081
[09:09:09] [Core Info]            : Checking for AMP updates...
[09:09:10] [Core Info]            : AMP is up-to-date.

Any idea what i might be doing wrong?
image

Incorrect CPU Usage?

It seems that the CPU usage reported by AMP is much lower than the real CPU usage at all times. This might be a docker thing or it might be just my server. Can anyone confirm?

server update not saved when AMP container restarted

I set up this container today in unraid and installed a Minecraft server with in AMP and updated the server. when the docker container was restarted, the Minecraft server had to be updated again.

Where does the Minecraft server save when installed in AMP ? I want to make sure its in a file store location vs in the container some where.

unRAID Support

Not an issue, but wanted to say THANK YOU for your work on this first and foremost.

I took the liberty of getting a template for this container setup for unRAID users!

If you want to create a note about it being available on unRAID under Community Applications you can.

unRAID specific support: https://forums.unraid.net/topic/98290-support-amp-application-management-panel-corneliousjd-repo/

Thanks again for doing this - made getitng a template for unRAID setup to use AMP pretty trivial :)

ADS Support / Testing

ADS is one of the most important modules to get working. So far I am able to get it to run, but the main instance is not seen as running.

image

Cant get amp to run in rancher

when trying to get AMP to run in rancher, it seems to stop and not fully run? not sure what the issue may be. it also says it has no internet connection but all of my other dockers do in the same VM, i think that may be the issue

here is the console log https://pastebin.com/wPK1HA23

and my EV
image

Main auto-boot toggles on and off with each reboot.

I have noticed that this line in the entrypoint.sh file, which is meant to ensure that the Main instance is always set to auto-boot, may be disabling auto-boot for Main when it is already set to auto-boot. Like a toggle command, rather than a set command. This was unexpected behavior. Hopefully a fix is not too difficult.

su amp --command "ampinstmgr SetStartBoot Main"

Garry's mod instance fails to start

attempting to run the server manually:

************** WARNING ***************
Running the dedicated server as root  
is highly discouraged. It is generally
unnecessary to use root privileges to 
execute the dedicated server.         
**************************************


WARNING: No map specified! Defaulting to gm_construct
Auto detecting CPU
Using default binary: ./srcds_linux
Enabling debug mode
./srcds_run: 182: ulimit: error setting limit (Operation not permitted)
Server will auto-restart if there is a crash.
tcmalloc: large alloc 4286955520 bytes == (nil) @ 
Failed to load keyvalues file cfg/mount.cfg!
tcmalloc: large alloc 4286955520 bytes == (nil) @ 
Couldn't load shader dll: game_shader_generic_garrysmod_srv.soConVarRef mat_dxlevel doesn't point to an existing ConVar
Game_srv.so loaded for "Garry's Mod"
Setting breakpad minidump AppID = 4000
tcmalloc: large alloc 4286955520 bytes == (nil) @ 
---------------
Paths:
--- ENGINECORE ---
"/home/amp/.ampdata/instances/test/srcds/4020/bin/" "EXECUTABLE_PATH" 
"/home/amp/.ampdata/instances/test/srcds/4020/" "BASE_PATH" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/bin/" "GAMEBIN" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/" "LOGDIR" 
--- GMODCORE ---
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/workshop/" "GAME" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/workshop/" "workshop" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/workshop/" "thirdparty" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/garrysmod.vpk" "MOD" (VPK)
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/garrysmod.vpk" "GAME" (VPK)
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/garrysmod.vpk" "garrysmod" (VPK)
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/overrides/" "MOD" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/overrides/" "GAME" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/overrides/" "garrysmod" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/" "MOD" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/" "MOD_WRITE" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/" "DEFAULT_WRITE_PATH" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/" "GAME" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/" "GAME_WRITE" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/" "garrysmod" 
--- SOURCESDK ---
"/home/amp/.ampdata/instances/test/srcds/4020/sourceengine/hl2_misc.vpk" "GAME" (VPK)
"/home/amp/.ampdata/instances/test/srcds/4020/sourceengine/hl2_sound_misc.vpk" "GAME" (VPK)
"/home/amp/.ampdata/instances/test/srcds/4020/sourceengine/hl2_sound_vo_english.vpk" "GAME" (VPK)
"/home/amp/.ampdata/instances/test/srcds/4020/sourceengine/hl2_textures.vpk" "GAME" (VPK)
"/home/amp/.ampdata/instances/test/srcds/4020/sourceengine/" "GAME" 
"/home/amp/.ampdata/instances/test/srcds/4020/platform/platform_misc.vpk" "GAME" (VPK)
"/home/amp/.ampdata/instances/test/srcds/4020/platform/" "GAME" 
--- DOWNLOADS ---
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/download/" "GAME" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/download/" "DOWNLOAD" 
--- FALLBACKS ---
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/fallbacks.vpk" "GAME" (VPK)
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/fallbacks.vpk" "MOD" (VPK)
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/fallbacks/" "GAME" 
"/home/amp/.ampdata/instances/test/srcds/4020/garrysmod/fallbacks/" "MOD" 
LOAD FROM FILE FAILED resource/serverevents.res
LOAD FROM FILE FAILED resource/serverevents.res

LOAD FROM FILE FAILED resource/serverevents.res

Segmentation fault
cat: hlds.4481.pid: No such file or directory
email debug.log to [email protected]
Thu Jun 17 04:48:40 AM EDT 2021: Server restart in 10 seconds

AMPLOG 2021-06-17 03-43-36.log

Failed to unpack AMP when volume bind is set

Hi, first thanks for making this container. Suits my needs perfectly, just having one issue with it at the moment which im 100% sure is my error but can't figure it out with my lack of experience.

Whenever I have the volume bind setup AMP is failing to start with an access to path is denied error. In this case I have the host volume as /opt/amp following what my other containers are using and the path in container as /home/amp/.ampdata.

useradd: warning: the home directory already exists.,
Not copying any file from skel directory into it.,
[Info] AMP Instance Manager v1.9.1.0 built 12/12/2019 15:04,
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV,
[Info] Testing internet connection...,
[Info] Checking licence key...,
[Info] Licence Type: AMP Professional,
[Info] Current Usage: 4,
[Info] Creating Instance: 'Main',
[Info] Performing Step: Creating Environment,
[Error] Failed to unpack AMP.,
[Error] UnauthorizedAccessException,
[Error] [0] (UnauthorizedAccessException) : Access to the path '/home/amp/.ampdata/instances/Main' is denied.,
[Error] at IO.FileCreateDirectory (String fullPath) ,
at IO.Directory.CreateDirectory (String path) ,
at InstanceManagerPlugin.LocalInstanceManager.DownloadAndUnpack (InstanceManagerPlugin.LocalAMPInstance Spec, Boolean ModuleOnly, Boolean SkipCache) ,
[Error] IOException,
[Error] [1] (IOException) : Permission denied,
[Info] Performing Step: Failed,
[Info] Instance creation failed. The core archive failed to download or unpack,
Starting AMP...,
[Info] AMP Instance Manager v1.9.1.0 built 12/12/2019 15:04,
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV,
[Error] No such instance matching name: 'Main',

I attempted changing the host location such as to /home/<user>/amp but no amount of changes to the host volume seemed to make a difference. However if I have no volume bind set, or one that does not affect the relevant folder inside the container such as simply /.ampdata in this case, AMP launches fine.

[Info] AMP Instance Manager v1.9.1.0 built 12/12/2019 15:04,
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV,
[Info] Testing internet connection...,
[Info] Checking licence key...,
[Info] Licence Type: AMP Professional,
[Info] Current Usage: 4,
[Info] Creating Instance: 'Main',
[Info] Performing Step: Creating Environment,
[Info] Performing Step: Downloading AMP,
[Info] No cache exists for 1912,
[Info] Downloading AMP from https://cubecoders.com/Downloads/AMP_Latest.zip...,
[Info] Complete,
[Info] Performing Step: Unpacking,
[Info] Performing Step: Configuring AMP,
[23:24:17] [Core Info]            : Starting AMP version 1.9.1.2 (Lapetus), built 17/12/2019 14:25,
[23:24:17] [Core Info]            : Stream: Mainline (Release) - built by CUBECODERS/buildbot on CCL-DEV,
[23:24:18] [Core Warning]         : Specified password is very weak. Change it ASAP.,
[23:24:18] [Core Info]            : Running in a Docker environment.,
[23:24:18] [Core Info]            : OS: Linux / x86_64,
[23:24:18] [Core Info]            : CPU: Intel(R) Xeon(R) CPU @ 2.20GHz (1C/1T),
[23:24:18] [Core Info]            : AMP Instance ID: 785d7962-5316-4cdc-a893-a54c4015eec2,
[23:24:18] [Core Info]            : Checking for AMP updates...,
[23:24:19] [ModuleLoader Info]    : Loaded ADSModule version 1.0.0.0 by CubeCoders Limited,
[23:24:19] [ModuleLoader Info]    : Loaded FileManager version 1.0.0.0 by CubeCoders Limited,
[23:24:19] [ModuleLoader Info]    : Loaded EmailSender version 1.0.0.0 by CubeCoders Limited,
[23:24:19] [ModuleLoader Info]    : Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited,
[23:24:19] [ModuleLoader Info]    : Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited,
[23:24:19] [ModuleLoader Info]    : ADSModule requests dependency InstanceManagerPlugin...,
[23:24:19] [ModuleLoader Info]    : Loaded InstanceManagerPlugin version 1.0.0.0 by CubeCoders Limited,
[23:24:19] [ModuleLoader Info]    : ADSModule requests dependency SystemUserManagerPlugin...,
[23:24:19] [ModuleLoader Info]    : Loaded SystemUserManagerPlugin version 1.0.0.0 by CubeCoders Limited,
[23:24:19] [ModuleLoader Info]    : Loaded steamcmdplugin version 1.0.0.0 by CubeCoders Limited,
[23:24:19] [Core Info]            : -configonly specified or activation performed. Saving settings and shutting down. This is perfectly normal.,
[Info] Performing Step: Finished,
[Info] Instance created successfully!,
Starting AMP...,
[Info] AMP Instance Manager v1.9.1.0 built 12/12/2019 15:04,
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV,
[Info] Starting Instance: 'Main',
[Info] Waiting for AMP instance to start...,
[Notice] AMP instance Main is now running.,
[Info] You can browse to this instance at http://172.18.0.8:8080/,
[Info] Instance started in new session. Run 'ampinstmgr View Main' to view this instances console.,�
AMP Started.,
Entrypoint Sleeping. Logs can be viewed through AMP web UI or at ampdata/instances/Main/AMP_Logs,

However as I am unable to get the bind working, my changes are lost if I need to make any adjustments to the container itself. As far as user profiles go, I am using UID 1002 and GID 1004 in following my other containers, but have also tried with 1000 on both to see if it made a difference.

It's probably something very easy I'm just missing, very much still learning as I go. If you could point me in the direction of what I'm doing wrong that would be appreciated.

Graceful Shutdown

Currently, if the docker container is stopped, it does not appear that AMP gets a SIGTERM and it just sort of... dies. This is not desirable. Perhaps we can find a way to shut it down gracefully so that game servers can clean up, backups can run, etc.

Issues adding Mods to Ark

Hello, I know this is not one of the listed supported apps but I was able to get an ark server up and running after figuring out some of the ports needed to be mapped as UDP. The server is currently up and running but I am trying to add mods, I followed the guide here: https://github.com/CubeCoders/AMP/wiki/Adding-mods-to-an-ARK:-Survival-Evolved-server

I chose option 2 to have it automated. I ran this command after docker exec into the container and su amp:

INSTANCE=Arkl2 LINUXDIR=/opt/AMP/instances/${INSTANCE}/arkSE/376030/Engine/Binaries/ThirdParty/SteamCMD/Linux/ mkdir -m 700 ${LINUXDIR} ln -s /opt/AMP/instances/${INSTANCE}/arkSE/steamcmd.sh /opt/AMP/instances/${INSTANCE}/arkSE/linux32 /opt/AMP/instances/Arkl2/arkSE/376030/steamapps ${LINUXDIR}

Before running that my Ark server would not launch and then I realized I needed to be in the container to run it. I also added the [ModInstaller] to the game.ini and the ActiveMods= to the GameUserSettings.ini, I also added the -automanagedmods to a custom flag in the instance, the server will now boot normally but doesn't seem to actually download the mods as it is supposed to, every time I try to connect it says please ensure the server has up to date mods, any chance you have experience with this and are able to assist me?

Main failed to unpack as non-root user

When creating the Main instance for the first time, there is an error when the user is not root (UID/GID > 0).

I suspect this is caused by the AMP core that is copied over being owned by root. Its permissions should be set properly after copying.

amp_1  | Copying AMP Core...
amp_1  | Making sure Main instance exists...
amp_1  | Creating Main instance... (This can take a while)
amp_1  | [Info] AMP Instance Manager v2.0.8.10 built 15/12/2020 17:10
amp_1  | [Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
amp_1  | [Info] Testing internet connection...
amp_1  | [Info] Checking licence key...
amp_1  | [Info] Licence Type:  AMP Professional
amp_1  | [Info] Current Usage: 0
amp_1  | [Info] Creating Instance: 'Main'
amp_1  | [Info] Performing Step: Creating Environment
amp_1  | [Activity] Audit: Unknown/None [CreateInstance] Created instance Main using Minecraft module on port 8080.
amp_1  | [Error] Failed to unpack AMP.
amp_1  | [Error] UnauthorizedAccessException
amp_1  | [Error] [0] (UnauthorizedAccessException) : Access to the path '/home/amp/.ampdata/instances/Main' is denied.
amp_1  | [Error]   at IO.FileCreateDirectory (String fullPath)
amp_1  |   at IO.Directory.CreateDirectory (String path)
amp_1  |   at InstanceManagerPlugin.LocalInstanceManager.DownloadAndUnpack (InstanceManagerPlugin.LocalAMPInstance Spec, Boolean SkipCache)
amp_1  | [Error] IOException
amp_1  | [Error] [1] (IOException) : Permission denied
amp_1  | [Info] Performing Step: Failed
amp_1  | [Info] Instance creation failed. The core archive failed to download or unpack

File Manager Not Working

Attempting to open a folder in the file manager (like plugins folder in Minecraft) throws this error in the Chrome Debugger JavaScript console:

Common.js:4 Uncaught (in promise) TypeError: Cannot read property 'constructor' of undefined
    at parseDate (Common.js:4)
    at new fileEntryVM (eval at scriptLoaded (PluginHandler.js:69), <anonymous>:812:20)
    at fileListVM.refresh (eval at scriptLoaded (PluginHandler.js:69), <anonymous>:1095:26)

I debugged it and found that in the function called fileEntryVM, the parseDate function is invoked with listing.Created as the one argument (which it attempts to parse). This value exists on the root folder but for seemingly any subfolder it becomes null.

A listing appears to be a menu item inside the built-in file manager. For example, when viewing the contents of the root directory, the listings might be "plugins," "Cache," "world," "world_nether," ...

Inside a subfolder, there is a ".." listing which has no timestamp and thus crashes:

{"Filename":"..","IsDirectory":true,"SizeBytes":0,"IsDownloadable":false,"Modified":"","IsEditable":false}

For reference, here is a normal listing inside the root folder:

{"IsDirectory":true,"IsVirtualDirectory":true,"Filename":"LocalBackups","SizeBytes":0,"Created":"/Date(1576702016008)/","Modified":"/Date(1576702016008)/","IsDownloadable":false,"IsEditable":false,"IsArchive":false,"IsExcludedFromBackups":false}

I'm on version 1.9.5.0, latest is 1.9.5.6 so I'm gonna upgrade and see if this goes away.

Ensuring Correct File Permissions Takes Too Long

On startup, the container resets all permissions in the volume to the UID/GID provided in the ENV vars. This makes sure there are no permission errors during operation. However, this process takes a very long time on large volumes. I wonder if we can find a faster method. Does chown check if the permissions are equal before setting them? If not, that might be room for improvement.

Feature Request: ARM64/aarch builds

At the moment I am upgrading to Proxmox 7.x and reworking some parts of my homlab.
I found you container and thought that sounds like a good AMP controller.
Then I realized there are currently no ARM64/aarch images

Now I like to give you a hint that a dockerized amp controller on a Raspberry Pi could be a good solution.
Also with the current development towards ARM on the part of Apple & more, ARM builds could become more interesting.

I think crossbuild should be possible through Github actions but I am not sure

Greetings 😉

Automated Licence Renewal

Sometimes instances can have their licences go unactivated. I'm not sure what causes this; it's unrelated to Docker. Either way, when it happens, it would be nice to have an automatic renewal system. The command to do this is:

sudo -u amp ampinstmgr Reactivate Main "${LICENCE}"

A staff member of CubeCoders suggested looking for the 0x20 exit code which means that a licence needs to be renewed:

image

Right now we exec to start the instance, so it's hard to catch any kind of exit codes. May need to start the instance in a different way.

Possible to add dependency to clear console warning in Valheim?

Valhiem gives console errors due to the absence of the 32-bit SDL library.

The errors look like this;

Loading Steam API...Failed to init SDL priority manager: SDL not found
Failed to set thread priority: per-thread setup failed
Failed to set thread priority: per-thread setup failed

This should be fixable by installing libsdl2-2.0-0:i386.

I'm not sure if your image has Debian's multi-arch support enabled or not, but if it isn't, it my be necessary to dpkg --add-architecture i386.

Reference

Can't download/compile spigot

Hi there, i'm having some issues running the container on Unraid - the AMP container starts normally and i'm able to log in and start a minecraft instance. However, once i set it to use spigot as the server, i get the following in the instance/spigotbuild/BuildTools.log.txt

1 packages, 0 classes, 0 fields, 0 methods
Remapping final jar
Remapping jar...  0%
Remapping jar... 10%
Remapping jar... 20%
Remapping jar... 30%
Remapping jar... 40%
Remapping jar... 50%
Remapping jar... 60%
Remapping jar... 70%
Remapping jar... 80%
Remapping jar... 90%
Remapping jar... 100%
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [sh, /home/amp/.ampdata/instances/FeezoniaMinecraft/Minecraft/spigotbuild/apache-maven-3.6.0/bin/mvn, -Dbt.name=3096, install:install-file, -Dfile=work/mapped.d7866d9c.jar, -Dpackaging=jar, -DgroupId=org.spigotmc, -DartifactId=minecraft-server, -Dversion=1.16.5-SNAPSHOT]
        at org.spigotmc.builder.Builder.runProcess0(Builder.java:899)
        at org.spigotmc.builder.Builder.runProcess(Builder.java:841)
        at org.spigotmc.builder.Builder.runMaven(Builder.java:819)
        at org.spigotmc.builder.Builder.main(Builder.java:494)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)

How do i fix the java configuration?

Not really an Issue

Hey, just wanted to say, that you should maybe add a full cleanup of apt after every apt install as this is considered good docker "coding" style. And maybe you should consider not installing sudo at all, its overall not best to install it, there are better, docker-friendly, alternatives to sudo, and so far i cant see anything that really needs sudo in your files.

Minecraft Bedrock Edition Support

Getting a lot of errors when trying to start Minecraft Bedrock:

/home/amp/.ampdata/instances/Minecraft01/./Minecraft/bedrock_server: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /home/amp/.ampdata/instances/Minecraft01/./Minecraft/bedrock_server)
/home/amp/.ampdata/instances/Minecraft01/./Minecraft/bedrock_server: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /home/amp/.ampdata/instances/Minecraft01/./Minecraft/bedrock_server)
/home/amp/.ampdata/instances/Minecraft01/./Minecraft/bedrock_server: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by ./libCrypto.so)

Might have to switch to an Ubuntu image from Debian, trying that now.

Ubuntu 20.04 Support

We should look into updating to Ubuntu 20.04. Work has already started on this in the staging-20.04 branch.

I have currently updated the base Ubuntu image tag to 20.04, updated Java to version 11, and updated the srcds (TF2, GMod) dependencies based on those found in the getamp.sh script from the official CubeCoders AMP install page: https://cubecoders.com/AMPInstall (http://getamp.sh/)

Specifically, line 69 of getamp.sh lists these dependencies relating to srcds:

LIB32_PACKAGES="lib32gcc1 lib32stdc++6 lib32z1 libncurses5:i386 libbz2-1.0:i386 libtinfo5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386"

Unfortunately, steamcmd, which is used to download and launch srcds games and is created by Valve, seems to not work well in the 20.04 docker container. This error is received when checking for updates to TF2 and other srcds games:

Redirecting stderr to '/home/amp/Steam/logs/stderr.txt'
Looks like steam didn't shutdown cleanly, scheduling immediate update check
/data/src/tier0/threadtools.cpp (4149) : Assertion Failed: Probably deadlock or failure waiting for thread to initialize.
[ 0%] Checking for available updates...
Thread failed to initialize
/data/src/tier0/threadtools.cpp (4149) : Assertion Failed: Probably deadlock or failure waiting for thread to initialize.
Thread failed to initialize
CWorkThreadPool::StartWorkThread: Thread creation failed.
Exiting on SPEW_ABORT

This is seen in other 20.04 images found in other projects on GitHub, e.g. steamcmd/docker#30

It seems like there may be some incompatibility between steamcmd, Ubuntu 20.04, and Docker. I don't yet know what it is.

Help is appreciated to get this working. I have tested Minecraft and Factorio, they seem to work.

/cc @Joly0 I know you were interested in this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.