Knowledge Document: GMS services do not start after online updates of SLES server

1 Likes

Environment

GMS 18.x
GMS 23.4
GMS 24.x

Situation

Your GMS was installed and ran well. Over time you want to update SLES server modules but after that, GMS services do not start.
You might see a complaint like:
Service error "RuntimeError: Bad magic number in .pyc file"!

Cause

Online updates modified the server`s default symbol link settings to python3 modules which is not compatible with PYC file header information. The pyc files are compiled GMS files written in a specific version of the python modules.

Resolution

The easiest way is to check the installer.log file which can be found under /var/log/datasync directory. Here you can find out what version of python was used when the GMS was installed. The GMS install process pulls a needed version of python modules to run if these are not yet installed on the server.
For instance, GMS version 23.4 uses python3.6 version, whilst GMS 24.x uses the python3.11 version.
 

gms-techpreview:/usr/bin # cd /usr/bin
gms-techpreview:/usr/bin # ll | grep python3
lrwxrwxrwx 1 root root         10 Feb  8 11:55 python3 -> python3.11
-rwxr-xr-x 1 root root       6392 Sep 18 22:53 python3.11
-rwxr-xr-x 2 root root      10560 Sep 13 14:47 python3.6
-rwxr-xr-x 2 root root      10560 Sep 13 14:47 python3.6m
gms-techpreview:/usr/bin #


This is an example of GMS 24.1 version and here you can see that a symbolic link to python3 is pointing to the correct version pyhon3.11.
In a bad server condition after the server online update, you could find the python3 link file pointing, for instance, to an older, python3.6 version which is not compatible with GMS 24.1, example below:
 

gms-techpreview:/usr/bin # ll | grep python3
lrwxrwxrwx 1 root root          9 Feb 13 14:32 python3 -> python3.6
-rwxr-xr-x 1 root root       6392 Sep 18 22:53 python3.11
-rwxr-xr-x 2 root root      10560 Sep 13 14:47 python3.6
-rwxr-xr-x 2 root root      10560 Sep 13 14:47 python3.6m
gms-techpreview:/usr/bin #


You will need first delete the wrong symbol link file and then create a new one:
 

gms-techpreview:/usr/bin # rm python3
gms-techpreview:/usr/bin # ln -s python3.11 python3
gms-techpreview:/usr/bin # ll | grep python3
lrwxrwxrwx 1 root root         10 Feb 13 14:35 python3 -> python3.11
-rwxr-xr-x 1 root root       6392 Sep 18 22:53 python3.11
-rwxr-xr-x 2 root root      10560 Sep 13 14:47 python3.6
-rwxr-xr-x 2 root root      10560 Sep 13 14:47 python3.6m


After that correction, you can start GMS services without a "bad magic error".

Access article on support portal

Labels:

Knowledge Docs
Comment List
Related
Recommended