This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Running sav-protect/update in Ubuntu 16.04 docker container. Problem: "WARNING: No OS Version"

Is there any way to fool the installer or update scripts to have it work within a restricted Ubuntu 16.04 docker image.

I'm trying to connect amavisd-new with savdi over a SOPHIE unix socket, to verify email attachments.  I don't really need the online protection (sav-protect) on my mailserver, as on-demand scanning is sufficient for my use case. But it would be nice to get the sav-update cron job wokring.

 

root@mailsav:/opt/sophos-av/bin# ./savupdate -v 5
+ dirname /opt/sophos-av/update/savupdate.sh
+ CIDREPDIR=/opt/sophos-av/update
+ cd /opt/sophos-av/update
+ pwd
+ CIDREPDIR=/opt/sophos-av/update
+ INSTALLORCOMMONDIR=/opt/sophos-av/update/..
+ PythonInterpreter=/opt/sophos-av/update/../engine/python
+ [ -f /opt/sophos-av/update/../engine/python ]
+ ORIGINAL_PYTHONPATH=
+ ORIGINAL_LD_LIBRARY_PATH=
+ ORIGINAL_PYTHONHOME=
+ export ORIGINAL_PYTHONPATH
+ export ORIGINAL_LD_LIBRARY_PATH
+ export ORIGINAL_PYTHONHOME
+ APPPATH=/opt/sophos-av/update:/opt/sophos-av/update/cidrep.zip:/opt/sophos-av/update/installer.zip:/opt/sophos-av/update/../engine/util.zip
+ INSTDIR=/opt/sophos-av/update/..
+ PYTHONHOME=/opt/sophos-av/update/..
+ PythonStdModules=/opt/sophos-av/update/../engine/python27.zip
+ [ ! -f /opt/sophos-av/update/../engine/python27.zip ]
+ PythonModsDir=/opt/sophos-av/update/../engine/_
+ LD_LIBRARY_PATH=/opt/sophos-av/update/../lib64:/opt/sophos-av/update/../lib32:/opt/sophos-av/update/../lib
+ [ -d /lib/nptl ]
+ PYTHONHOME=/opt/sophos-av/update/..
+ PYTHONPATH=/opt/sophos-av/update/../engine/_:/opt/sophos-av/update/../engine/python27.zip:/opt/sophos-av/update:/opt/sophos-av/update/cidrep.zip:/opt/sophos-av/updat
e/installer.zip:/opt/sophos-av/update/../engine/util.zip
+ export PYTHONPATH
+ export PYTHONHOME
+ export LD_LIBRARY_PATH
+ chmod 0755 /opt/sophos-av/update/../engine/python
+ /opt/sophos-av/update/../engine/python -c import sys; sys.exit(0)
+ cd /opt/sophos-av/update/..
+ exec /opt/sophos-av/update/../engine/python -c import savupdate.Updater,sys; sys.exit(savupdate.Updater.main(sys.argv)) /opt/sophos-av/update -v 5
WARNING: No OS Version
root@mailsav:/opt/sophos-av/bin# echo $?
51
root@mailsav:/opt/sophos-av/bin#

 

 I'm getting "WARNING: No OS Version", and the update script fails with error code 51. I also received the same warning during installation, but installation proceeded.

Is that a curl error code 51 buried deep down (SSL error)?

I've added (see attachments) an strace -ff output, but I'm afraid it doesn't reveal much.

How is the OS detection done?

root@mailsav:/# python -c 'import os; print os.uname()'
('Linux', 'mailsav.domain.com', '4.4.0-79-generic', '#100-Ubuntu SMP Wed May 17 19:58:14 UTC 2017', 'x86_64')
root@mailsav:/# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"

*edit *

I've also noticed that there's a log file savupdate-debug.log indicates that I have a missing config file. 

...(/opt/sophos-av/log/savupdate-debug.log)...
2017-08-26 23:18:41,144 DEBUG savupdate.util.Logger: Logging to /opt/sophos-av/log/savupdate-debug.log
2017-08-26 23:18:41,700 DEBUG savupdate.util.Logger: NO-UPDATE-CONFIGURATION

... (strace logs)...
stat("/opt/sophos-av/etc/updateBackup.conf", 0x7ffef7b49900) = -1 ENOENT (No such file or directory)

This is the command I used to install sophos-av:

    ./install.sh /opt/sophos-av --automatic \
       --acceptlicence --autostart=False \
       --enableOnBoot=False --update-source-type=s \
       --update-period=24 --live-protection=False

 

*edit 2*

I also notice, by comparing with a working setup on a different host, that my automated install setup is missing config files with credentials user/password for updating the system (e.g. savd.cfg). Copying those over to my docker container seem to fix the savupdate problem, and I'm able to download up-to-date definitions. Any clue how to get the automated install generate the config files properly from the get-go ?

 

 

savupdate.strace.log



This thread was automatically locked due to age.
  • oops! I missed the '_'

     

    You're correct. the file is there in /etc/lsb-release, but I had to install the package `lsb-release` to get that binary.

    root@mx1:/# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 16.04.3 LTS
    Release: 16.04
    Codename: xenial
    

     

    installing the package got rid of the "No OS Version" warning at least.