MitchTalmadge / AMP-dockerized

CubeCoders AMP in a Docker Image. Easily create game servers for games like Minecraft, GMod, TF2, Factorio, and StarBound!
https://hub.docker.com/r/mitchtalmadge/amp-dockerized
Other
89 stars 21 forks source link

AMP container won't start anymore... Main instance error #193

Closed XRayBarnabey closed 4 months ago

XRayBarnabey commented 4 months ago

Hello !

Everything was working since like 2-3 years, and I recently faced this issue... Any advice to solve it ? Volumes still assigned correctly too.

image

The path is still full of data too :

image

Thx a lot ! Matthieu

MitchTalmadge commented 4 months ago

Hey! This looks like a server side error on AMP. Like the license server is not working. I'll check with them to see what's going on

IceOfWraith commented 4 months ago

What's going on that points to a license error?

MitchTalmadge commented 4 months ago

Ah never mind it is an issue with the su command. Looks like it's not finding the amp user. Based on the logs it looks like it's trying to create the wrong user

MitchTalmadge commented 4 months ago

What's going on that points to a license error?

I was mislead by "This account is currently not available" which is actually an error from su, sorry!

MitchTalmadge commented 4 months ago

@XRayBarnabey Can you tell me the id of the admin user on your host system? Is it 998? The container is trying to create a user with id 998 which is being used already by systemd-network inside the system.

XRayBarnabey commented 4 months ago

Hey @MitchTalmadge ! Nice to meet you !

Recently messed up with my e1000e driver and start to use a dedicated pcie ethernet card, that might correspond to the start of my problems, but i've ~50 containers running and none of them seams to have any issues. virtual MAC address is still ok tho !

admin is actually 998 : image

systemd-network correspond to 102 on my side :/ image

Here is my environment variable : image

And as you may have seen before, files are owned by admin:users, so 998:100 for me :)

Thx guys !

MitchTalmadge commented 4 months ago

Thanks @XRayBarnabey! It looks like what happened was when we moved from an Ubuntu image to a Debian image, some of the user IDs got changed.

Before (Ubuntu):

``` root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin man:x:6:12:man:/var/cache/man:/usr/sbin/nologin lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin mail:x:8:8:mail:/var/mail:/usr/sbin/nologin news:x:9:9:news:/var/spool/news:/usr/sbin/nologin uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin proxy:x:13:13:proxy:/bin:/usr/sbin/nologin www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin _apt:x:100:65534::/nonexistent:/usr/sbin/nologin systemd-timesync:x:101:101:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin systemd-network:x:102:103:systemd Network Management,,,:/run/systemd:/usr/sbin/nologin systemd-resolve:x:103:104:systemd Resolver,,,:/run/systemd:/usr/sbin/nologin messagebus:x:104:105::/nonexistent:/usr/sbin/nologin ```

After (Debian):

``` root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin man:x:6:12:man:/var/cache/man:/usr/sbin/nologin lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin mail:x:8:8:mail:/var/mail:/usr/sbin/nologin news:x:9:9:news:/var/spool/news:/usr/sbin/nologin uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin proxy:x:13:13:proxy:/bin:/usr/sbin/nologin www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin _apt:x:42:65534::/nonexistent:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin systemd-network:x:998:998:systemd Network Management:/:/usr/sbin/nologin systemd-timesync:x:997:997:systemd Time Synchronization:/:/usr/sbin/nologin messagebus:x:100:101::/nonexistent:/usr/sbin/nologin polkitd:x:995:995:polkit:/nonexistent:/usr/sbin/nologin ```

Difference:

diff --git a/ubuntu.passwd b/debian.passwd
index 2921454..ca85449 100644
--- a/ubuntu.passwd
+++ b/debian.passwd
@@ -13,11 +13,10 @@ proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
 www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
 backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
 list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
-irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
+irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
+_apt:x:42:65534::/nonexistent:/usr/sbin/nologin
 nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
-_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
-systemd-timesync:x:101:101:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin
-systemd-network:x:102:103:systemd Network Management,,,:/run/systemd:/usr/sbin/nologin
-systemd-resolve:x:103:104:systemd Resolver,,,:/run/systemd:/usr/sbin/nologin
-messagebus:x:104:105::/nonexistent:/usr/sbin/nologin
\ No newline at end of file
+systemd-network:x:998:998:systemd Network Management:/:/usr/sbin/nologin
+systemd-timesync:x:997:997:systemd Time Synchronization:/:/usr/sbin/nologin
+messagebus:x:100:101::/nonexistent:/usr/sbin/nologin
+polkitd:x:995:995:polkit:/nonexistent:/usr/sbin/nologin
\ No newline at end of file

I'll need to investigate what I can do about it.

MitchTalmadge commented 4 months ago

So it's probably best to use a user with ID >= 1000 with AMP, but I know that changing it now is a pain, so I created this script for you which should let your server keep working as usual:

echo "Removing systemd-network user"
userdel -f systemd-network && echo "Removed" || echo "Already gone"

Make a directory called scripts on your host and put that script in a file at scripts/startup.sh. Then mount the scripts directory to /home/amp/scripts. It will run at startup and get rid of the conflicting user, which is not used by this container anyway (Docker doesn't use systemd). I tested this and it is working for me. Let me know if you have trouble with it!

Here's the README for scripts if you're interested.

XRayBarnabey commented 4 months ago

Hey, sorry for the delay...

I'm not sure about that way :/ system-network user could be used by my omv host...

On my host system (Debian 10) : image

Isn't it simpler than deleting systemd-network user to just : Create user amp:x:1111:100 Do a recursive chown with this user on the ampdata folder Ask the container to use amp UID

Did I not understand the problem? Thx for the advice !

MitchTalmadge commented 4 months ago

Yes you can do that too if you want (it's actually the better way). But the script is not deleting systemd-network from your host, it deletes it from the container. Doesn't affect your host at all :)

XRayBarnabey commented 4 months ago

Done mate !

Working like a charm !

Thx for all the advice and have a great day :)