SPADS autoinstaller failing to load unitsync library

SPADS autoinstaller failing to load unitsync library

SpringRTS Perl Autohost for Dedicated Server

Moderators: Moderators, Lobby Developers, SPADS AutoHost

Post Reply
lowdive
Posts: 9
Joined: 01 Dec 2010, 16:44

SPADS autoinstaller failing to load unitsync library

Post by lowdive »

Hi, so, I'm trying to run spads autohost on an oracle linux 8 instance
I went through most of the hurdles, installer failed to get and extract spring-105.0 so I got it there manually, but now I keep getting this error:
NOTICE - [SpadsInstaller] Loading Perl Unitsync interface module...
CRITICAL - [SpadsInstaller] Failed to load unitsync library "/home/opc/spads/var/spring/105.0-linux64/libunitsync.so" - /home/opc/spads/var/spring/105.0-linux64/libunitsync.so: cannot open shared object file: No such file or directory
I already added the "/home/opc/spads/var/spring/105.0-linux64" path to $ld_library_path and did ldconfig, did not work.
also copied the libunitsync.so file directly to usr/lib and it actually shows on ldconfig -v | less, I thought that would get it done but no, still getting same error from installer.

is there anything else I need to do for the installer to load the unitsync library?

thanks in advance for your time
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: SPADS autoinstaller failing to load unitsync library

Post by bibim »

Hi,
lowdive wrote: 03 Mar 2025, 00:02 I went through most of the hurdles
Can you detail the hurdles you encountered ? I re-tested SPADS installer right now and I was able to install a fully functional SPADS instance from scratch in less than one minute on a Linux 64-bit server.
lowdive wrote: 03 Mar 2025, 00:02 installer failed to get and extract spring-105.0
What exact error did you get ? Can you post a screenshot or copy-paste the output ?
lowdive wrote: 03 Mar 2025, 00:02 so I got it there manually
Installing the engine manually won't help if your system is not compatible with the engine anyway. Afaik Oracle Linux 8 is shipped with glibc 2.28 by default, which isn't supported by Spring engine 105.0 (see this and this for details).
Maybe you can upgrade your glibc version using this.
lowdive
Posts: 9
Joined: 01 Dec 2010, 16:44

Re: SPADS autoinstaller failing to load unitsync library

Post by lowdive »

bibim wrote: 03 Mar 2025, 08:09 Can you detail the hurdles you encountered ? I re-tested SPADS installer right now and I was able to install a fully functional SPADS instance from scratch in less than one minute on a Linux 64-bit server.
Sure thing, sorry I didn't mean it because of the installer itself, just from this instance of oracle linux 8.
Obtaining the perl modules, had to use cpan cause it wouldn't get them all with dnf, and well I did have to install 7zip, that distro doesn't even have the package for p7zip and p7zip-plugins included in the default reponames so I had to install EPEL repo for those.
bibim wrote: 03 Mar 2025, 08:09 What exact error did you get ? Can you post a screenshot or copy-paste the output ?
here you go (this is the message I got right now just telling it to do 106.0 because I didn't want to erase my manual 105.0 rn, but it gives the same error for 105.0):
NOTICE - [SpadsUpdater] Installing Spring 106.0 into "/home/opc/spads/var/spring/106.0-linux64"...
ERROR - [SpadsUpdater] Failed to extract "/home/opc/spads/var/spring/106.0-linux64/spring_106.0_minimal-portable-linux64-static.7z" (7zip exit code: 126)
ERROR - [SpadsUpdater] Unable to extract Spring archive "/home/opc/spads/var/spring/106.0-linux64/spring_106.0_minimal-portable-linux64-static.7z"
WARNING - [SpadsInstaller] Installation failed: unable to find, download and extract all required files for Spring 106.0, please choose a different version
bibim wrote: 03 Mar 2025, 08:09 Maybe you can upgrade your glibc version using this.
Right, ok, I guess it won't hurt if I try to follow that guide.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: SPADS autoinstaller failing to load unitsync library

Post by bibim »

lowdive wrote: 03 Mar 2025, 20:01 Obtaining the perl modules, had to use cpan cause it wouldn't get them all with dnf
Did you follow the installation procedure detailed here ?

Out of curiosity I tried to reproduce your problem with Oracle Linux 8, and I found that only the FFI::Platypus module had to be installed using cpan. Here are the commands I used to install SPADS on a brand new minimal Oracle Linux 8 system:

Code: Select all

sudo dnf -y install perl perl-IO-Socket-SSL perl-DBD-SQLite wget gcc
sudo cpan FFI::Platypus
mkdir $HOME/spads && cd $HOME/spads
wget http://planetspads.free.fr/spads/installer/spadsInstaller.tar -qO - | tar x
perl spadsInstaller.pl
lowdive wrote: 03 Mar 2025, 20:01and well I did have to install 7zip, that distro doesn't even have the package for p7zip and p7zip-plugins included in the default reponames so I had to install EPEL repo for those.
Normally you shouldn't need to install 7zip if you let SPADS manage the engine installation, but if I understand correctly you did that because of the next error:
lowdive wrote: 03 Mar 2025, 20:01
ERROR - [SpadsUpdater] Failed to extract "/home/opc/spads/var/spring/106.0-linux64/spring_106.0_minimal-portable-linux64-static.7z" (7zip exit code: 126)
It looks like there is a permission problem on the 7zip binary used by SPADS, as if it was unable to make it executable. Do you have a special/unconventional mechanism for managing rights on this system ? Or maybe you re-started the installation in the same directory as a different user ?
Anyway I didn't encounter this problem on my minimal install of Oracle Linux 8: SPADS installation worked perfectly in engine version auto-management mode.

However, as explained in my previous message, engine 105.0 requires glibc 2.29 whereas Oracle Linux 8 uses glibc 2.28, so the installer stops at the end if you select engine version 105.0. When selecting an older version the installation works perfectly and SPADS works as expected on Oracle Linux 8.
lowdive
Posts: 9
Joined: 01 Dec 2010, 16:44

Re: SPADS autoinstaller failing to load unitsync library

Post by lowdive »

bibim wrote: 03 Mar 2025, 22:16 Did you follow the installation procedure detailed here ?
Yes, indeed, there and in BAR's wiki subsection as well
https://github.com/Yaribz/SPADS/wiki/Be ... de-(Linux)
bibim wrote: 03 Mar 2025, 22:16 It looks like there is a permission problem on the 7zip binary used by SPADS, as if it was unable to make it executable. Do you have a special/unconventional mechanism for managing rights on this system ? Or maybe you re-started the installation in the same directory as a different user ?
Anyway I didn't encounter this problem on my minimal install of Oracle Linux 8: SPADS installation worked perfectly in engine version auto-management mode.
Maybe the problem stems from the fact it's an oracle instance, and I am connecting with ssh and all, permissions could be messy, idk... then also I don't remember if the oracle linux 8 version I have for the instance is the minimal, I'm guessing it isn't.

Anyhow, I will try to circumvent the permission problem and see if that alleviates the first issue, and I will try the glibc 2.29 upgrade after, just to track.
Thanks again for your time, sorry I couldn't answer/work on it these days but I'll be on it tomorrow.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: SPADS autoinstaller failing to load unitsync library

Post by bibim »

lowdive wrote: 10 Mar 2025, 08:07 Yes, indeed, there and in BAR's wiki subsection as well
https://github.com/Yaribz/SPADS/wiki/Be ... de-(Linux)
Afaik the engine binaries used by BAR don't require glibc 2.29, so if you followed the BAR guide for a full automatic SPADS installation you shouldn't encounter the glibc 2.29 problem.
lowdive wrote: 10 Mar 2025, 08:07 Maybe the problem stems from the fact it's an oracle instance, and I am connecting with ssh and all, permissions could be messy, idk... then also I don't remember if the oracle linux 8 version I have for the instance is the minimal, I'm guessing it isn't.
Using SSH shouldn't matter at all. The only thing I can see which could produce a permission problem would be if you launched the installer with one user first and then retried it from same directory using a different user.
If you are sure this didn't happen, I would be very curious to understand what happened.
Can you provide the output of this command launched from the SPADS installation directory, using same user as the one used to launch the installer:

Code: Select all

whoami; ls -l 7z*
lowdive wrote: 10 Mar 2025, 08:07 I will try the glibc 2.29 upgrade after, just to track.
I don't think this will work, it will just update your current glibc version if it's not the latest 2.28 subrelease but it will stay at 2.28-XXX.
lowdive
Posts: 9
Joined: 01 Dec 2010, 16:44

Re: SPADS autoinstaller failing to load unitsync library

Post by lowdive »

bibim wrote: 10 Mar 2025, 11:13 Afaik the engine binaries used by BAR don't require glibc 2.29, so if you followed the BAR guide for a full automatic SPADS installation you shouldn't encounter the glibc 2.29 problem.
Sadly I'm trying all this for the sake of S44 gaming weekends so... that BAR option is not useful to me. I did peek at those instructions to have 2x the install instructions, as it could result in 1/2 the time to install :b (bad joke, still truly why I read both guides though)
bibim wrote: 10 Mar 2025, 11:13 If you are sure this didn't happen, I would be very curious to understand what happened.
Can you provide the output of this command launched from the SPADS installation directory, using same user as the one used to launch the installer:
Sure thing:

Code: Select all

[opc@multis spads]$ sudo whoami; ls -l 7z*
root
lrwxrwxrwx. 1 root root       8 Mar  2 22:17 7za -> 7za-16.2
-rwxr-xr-x. 1 root root 1992876 Mar  2 22:17 7za-16.2
*I do use "sudo perl spadsInstaller.pl" when running the installer, figured I'd run the whoami just the same
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: SPADS autoinstaller failing to load unitsync library

Post by bibim »

lowdive wrote: 14 Mar 2025, 00:07 Sure thing:

Code: Select all

[opc@multis spads]$ sudo whoami; ls -l 7z*
root
lrwxrwxrwx. 1 root root       8 Mar  2 22:17 7za -> 7za-16.2
-rwxr-xr-x. 1 root root 1992876 Mar  2 22:17 7za-16.2
Ok so SELinux is very likely the culprit here. I suspect SELinux considers the SPADS installation directory as unsafe and prevents executing binary files from there (especially as root...).
Can you provide the output of this command (launched from the SPADS installation directory):

Code: Select all

pwd; ls -lZ 7z*
lowdive wrote: 14 Mar 2025, 00:07 *I do use "sudo perl spadsInstaller.pl" when running the installer, figured I'd run the whoami just the same
Why did you use sudo to install SPADS ?
SPADS doesn't need root privileges. SPADS shouldn't be installed nor executed as root.
lowdive
Posts: 9
Joined: 01 Dec 2010, 16:44

Re: SPADS autoinstaller failing to load unitsync library

Post by lowdive »

bibim wrote: 14 Mar 2025, 10:34 Can you provide the output of this command (launched from the SPADS installation directory):
Here it is:

Code: Select all

[opc@multis spads]$ pwd; ls -lZ 7z*
/home/opc/spads
lrwxrwxrwx. 1 root root unconfined_u:object_r:user_home_t:s0       8 Mar  2 22:17 7za -> 7za-16.2
-rwxr-xr-x. 1 root root unconfined_u:object_r:user_home_t:s0 1992876 Mar  2 22:17 7za-16.2
bibim wrote: 14 Mar 2025, 10:34 Why did you use sudo to install SPADS ?
I'm 80% sure I started doing it after it failed with the extractions and I thought it was permission issues.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: SPADS autoinstaller failing to load unitsync library

Post by bibim »

lowdive wrote: 14 Mar 2025, 15:31 Here it is:

Code: Select all

[opc@multis spads]$ pwd; ls -lZ 7z*
/home/opc/spads
lrwxrwxrwx. 1 root root unconfined_u:object_r:user_home_t:s0       8 Mar  2 22:17 7za -> 7za-16.2
-rwxr-xr-x. 1 root root unconfined_u:object_r:user_home_t:s0 1992876 Mar  2 22:17 7za-16.2
Thanks. Well actually I see nothing suspicious here apart from root being used for the installation.
But maybe you have a specific restrictive global SELinux configuration...
lowdive wrote: 14 Mar 2025, 15:31 I'm 80% sure I started doing it after it failed with the extractions and I thought it was permission issues.
I see.

Would it be possible, by any chance, to have a temporary unprivileged SSH access to this system ? I'm pretty sure I could quickly figure out what's going on, whereas it could be very tedious if I have to post the commands here every time and wait for you to post the results.

If not, you can do the following to help the investigations:
1) provide the output of the "getenforce" command
2) restart a new SPADS installation from a fresh directory, using an unprivileged user (and without using sudo)
3) when installation fails due to "Failed to extract ... (7zip exit code: 126)", check if you can run following command manually (from SPADS installation directory):

Code: Select all

LC_ALL=C ./7za
Regarding the glibc problem, the best way to solve that would be to upgrade your system to Oracle Linux 9 for example if you want to keep Oracle Linux. If this is not possible, you could also run a newer system inside a container or a VM on your base system.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: SPADS autoinstaller failing to load unitsync library

Post by bibim »

FYI I have improved the support for Spring: 1944 in SPADS installer: the installer is now able to download the latest test version of Spring: 1944 automatically (previously it was only able to download the stable version automatically). It is now also able to download all Spring: 1944 specific maps automatically.

Also, I have created an automatic SPADS installation template dedicated to Spring: 1944. This means one can add the "--auto Spring1944" parameter when launching the installer and it will automatically select all the appropriate options for a Spring: 1944 autohost, auto-downloading the correct engine version, the correct game version, all the Spring: 1944 specific maps etc. The only questions asked by the installer in this case are for the lobby credentials and the name of the autohost owner, which are necessarily specific to the SPADS instance being installed.

Finally, I have created a Dockerfile which automates the build of an image with a SPADS installation for Spring: 1944. This makes it possible to host Spring: 1944 games using Spring engine 105.0 even though the host system doesn't have the correct version of glibc. I have tested it on my minimal Oracle Linux 8 environment and it works perfectly.

If you are interested, here are the instructions to use this docker image on Oracle Linux 8 (only the first step requires sudo, other steps should be performed as a normal non-privileged user):

1) Install podman (the default container engine for Oracle Linux)

Code: Select all

sudo dnf -y install podman
2) Create the SPADS installation directory on host system

Code: Select all

mkdir $HOME/spads
This directory must be empty (it will be provisioned by the container using a bind mount).

3) Build the image of SPADS for Spring: 1944

In the command below, "<spadsLobbyLogin>" must be replaced by the lobby login that will be used by the autohost (the corresponding account must exist on the lobby server), "<spadsLobbyPassword>" must be replaced by the password of the lobby account used by the autohost, and "<adminLobbyName>" must be replaced by the lobby login of the owner of the autohost, who will have privileged access on the autohost

Code: Select all

podman build --tag spads-spring1944 --userns host --volume $HOME/spads:/opt/spads --security-opt label=disable --build-arg lobbyLogin=<spadsLobbyLogin> --build-arg lobbyPassword=<spadsLobbyPassword> --build-arg owner=<adminLobbyName> http://planetspads.free.fr/spads/installer/auto/Spring1944/Dockerfile

4) OPTIONAL: customize SPADS configuration

If needed, edit the files in $HOME/spads/etc

5) Create and start a temporary container using the local image created previously

Code: Select all

podman run --rm -t --userns keep-id --volume $HOME/spads:/opt/spads --security-opt label=disable --network host spads-spring1944
When SPADS is stopped the container will be automatically removed. Only step 5 must be performed to start SPADS again (this command could be put inside a "start_spads" shell script or alias for example to facilitate use). All previous steps are only needed once during installation, to initialize the image.

With this method, all SPADS files are available locally in $HOME/spads exactly like a normal local SPADS installation. The only difference is the command used to start SPADS ("podman run ..." instead of "perl spads.pl etc/spads.conf")

Note: as for any SPADS installation, if the system is behind a router and/or firewall, the UDP port used by the engine (8452 by default) will have to be open and/or forwarded.
Post Reply

Return to “SPADS AutoHost”