Error while installing Automation during the "Getting SELinux" step

Discussion in 'Plesk Automation Suggestions and Feedback' started by AaronMcH, Jul 5, 2013.

  1. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Hello

    I am trying to install Automation, and I keep getting an error after the "Getting SELinux" step, here is a log of the process so far:

    Code:
    [INFO]: Checking current user privileges...
    [INFO]: Checking critical environment requirements...
    [INFO]: Determining OS parameters...
    [INFO]: Detected OS: CentOS-5-x86_64
    [INFO]: Getting SELinux state...
    [ERROR]: Unexpected error: ''
    Traceback (most recent call last):
      File "./ppa_installer.sh", line 503, in ?
        bootstrapper.checkEnv()
      File "./ppa_installer.sh", line 215, in checkEnv
        self.checkRes['selinux'] = self._checkSelinux()
      File "./ppa_installer.sh", line 261, in _checkSelinux
        logger.info('SELinux: %s', statusMap[selinuxStatus])
    KeyError: ''
    
    Any help with this would be appreciated,
    Thank you

    Update: I have tried running the installation on a different server and the same issue came up
     
    Last edited: Jul 6, 2013
  2. IgorG

    IgorG Guru

    Messages:
    19,081
    What sort of output command

    # getenforce

    before PPA installation?

    Try to set SELinux to Permissive mode with

    # setenforce 0

    and start installation again.
     
  3. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Hi, thanks for the response.

    I did try disabling SELinux, and just to check I tried disabling it again and running the installer, however the same issue comes up.

    Any ideas?
    Thanks
     
  4. IgorG

    IgorG Guru

    Messages:
    19,081
    Could you please post here output of following commands:

    # cat /etc/*release*
    # cat /selinux/enforce
     
  5. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Hi, I only received an output for cat /etc/*release*, but here it is:

    # cat /etc/*release*
    CentOS release 5.9 (Final)
    # cat /selinux/enforce

    Thanks
     
  6. IgorG

    IgorG Guru

    Messages:
    19,081
    Hmm... there should be 0 or 1 in /selinux/enforce
    Try to run following command:

    # echo 0 > /selinux/enforce

    and then start PPA installation again.
     
  7. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Hi, thanks for the reply,

    That worked, however further into the installation it generated a similar error regarding SELinux:

    [INFO]: Setting SELinux mode to 'Permissive'...
    [ERROR]: Failed to execute command: ['/usr/sbin/setenforce', '0']

    Any idea how I could work around this?

    If it's any help I'm running this on a server rented from OVH, which is installed with their Kernel, I've never had an issue with it before, although could it be the cause of this issue?

    Thank you

    P.S. I won't receive any replies for roughly two weeks, so expect a delay in responding to any replies, thank you.
     
    Last edited: Jul 17, 2013
  8. IgorG

    IgorG Guru

    Messages:
    19,081
    What sort of output of following command:

    # setenforce 0

    And yes, this strange SELinux behaviour can be related to custom kernel. Is it possible to reboot server in OS vendor kernel and try installation with it?
     
  9. Andrew Andriatis

    Andrew Andriatis Odin Team

    Messages:
    437
    I always edit the selinux configuration file, put "disabled" there and reboot the server. So far had no problems with this procedure.

    Regards,
    Andrey Andriatis
     
  10. Richard Maynard

    Richard Maynard Kilo Poster

    Messages:
    23
    I had the identical problem to the OP and the suggestions from Igor all failed as well. This last suggestion worked. Despite selinux showing as "disabled" before editing the selinux configuration file and reboot, the edit/creation of this file and reboot allowed the PPA installer to continue. I can only surmise this is a bug in the PPA installer.

    Cheers

    Richard.
     
  11. Richard Maynard

    Richard Maynard Kilo Poster

    Messages:
    23
    As soon as I got past the problem above I then smashed into the next one:

    [LOGTEE]: NOTICE: Creating repo for CentOS-5-i386
    [LOGTEE]: NOTICE: Creating repo for CentOS-6-i386
    [LOGTEE]: NOTICE: Creating repo for CentOS-5-x86_64
    [LOGTEE]: NOTICE: Creating repo for CentOS-6-x86_64
    [LOGTEE]: NOTICE: Creating repo for PSBM-5.0.0-x86_64
    [LOGTEE]: NOTICE: Creating repo for RHEL-5-i386
    [LOGTEE]: NOTICE: Creating repo for RHEL-6-i386
    [LOGTEE]: NOTICE: Creating repo for RHEL-5-x86_64
    [LOGTEE]: NOTICE: Creating repo for RHEL-6-x86_64
    [LOGTEE]: NOTICE: Waiting for repositories to be created
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ==> Updating native repositories
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ===> Updating repository 1 at /usr/local/pem/install/tarballs/CentOS/5/i386/YUM
    [LOGTEE]: NOTICE: Updating repository 1 at /usr/local/pem/install/tarballs/CentOS/5/i386/YUM
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] <=== Finished updating repository 1 at /usr/local/pem/install/tarballs/CentOS/5/i386/YUM (0.0352728366852 sec)
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ===> Updating repository 2 at /usr/local/pem/install/tarballs/CentOS/6/i386/YUM
    [LOGTEE]: NOTICE: Updating repository 2 at /usr/local/pem/install/tarballs/CentOS/6/i386/YUM
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] <=== Finished updating repository 2 at /usr/local/pem/install/tarballs/CentOS/6/i386/YUM (0.00654888153076 sec)
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ===> Updating repository 3 at /usr/local/pem/install/tarballs/CentOS/5/x86_64/YUM
    [LOGTEE]: NOTICE: Updating repository 3 at /usr/local/pem/install/tarballs/CentOS/5/x86_64/YUM
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] <=== Finished updating repository 3 at /usr/local/pem/install/tarballs/CentOS/5/x86_64/YUM (0.0046808719635 sec)
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ===> Updating repository 4 at /usr/local/pem/install/tarballs/CentOS/6/x86_64/YUM
    [LOGTEE]: NOTICE: Updating repository 4 at /usr/local/pem/install/tarballs/CentOS/6/x86_64/YUM
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] <=== Finished updating repository 4 at /usr/local/pem/install/tarballs/CentOS/6/x86_64/YUM (0.00209712982178 sec)
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ===> Updating repository 5 at /usr/local/pem/install/tarballs/PSBM/5.0.0/x86_64/YUM
    [LOGTEE]: NOTICE: Updating repository 5 at /usr/local/pem/install/tarballs/PSBM/5.0.0/x86_64/YUM
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] <=== Finished updating repository 5 at /usr/local/pem/install/tarballs/PSBM/5.0.0/x86_64/YUM (0.00203704833984 sec)
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ===> Updating repository 6 at /usr/local/pem/install/tarballs/RHEL/5/i386/YUM
    [LOGTEE]: NOTICE: Updating repository 6 at /usr/local/pem/install/tarballs/RHEL/5/i386/YUM
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] <=== Finished updating repository 6 at /usr/local/pem/install/tarballs/RHEL/5/i386/YUM (0.0109357833862 sec)
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ===> Updating repository 7 at /usr/local/pem/install/tarballs/RHEL/6/i386/YUM
    [LOGTEE]: NOTICE: Updating repository 7 at /usr/local/pem/install/tarballs/RHEL/6/i386/YUM
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] <=== Finished updating repository 7 at /usr/local/pem/install/tarballs/RHEL/6/i386/YUM (0.00179314613342 sec)
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ===> Updating repository 8 at /usr/local/pem/install/tarballs/RHEL/5/x86_64/YUM
    [LOGTEE]: NOTICE: Updating repository 8 at /usr/local/pem/install/tarballs/RHEL/5/x86_64/YUM
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] <=== Finished updating repository 8 at /usr/local/pem/install/tarballs/RHEL/5/x86_64/YUM (0.00467801094055 sec)
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ===> Updating repository 9 at /usr/local/pem/install/tarballs/RHEL/6/x86_64/YUM
    [LOGTEE]: NOTICE: Updating repository 9 at /usr/local/pem/install/tarballs/RHEL/6/x86_64/YUM
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] <=== Finished updating repository 9 at /usr/local/pem/install/tarballs/RHEL/6/x86_64/YUM (0.00208592414856 sec)
    [LOGTEE]: NOTICE: [Wed Jul 31 19:30:47 2013] ===> Reindexing native repositories
    [LOGTEE]: NOTICE: Reindexing repository 1
    [LOGTEE]: ERROR: OpenAPIError Error during OpenAPI call: Cannot reindex YUM repository on host #1 Neither createrepo nor yum-arch is installed.
    [LOGTEE]: Using POA repo: file:///var/cache/ppa/dists/PPA_11.1.0/POA
    [ERROR]: Failed to execute command: ['/var/cache/ppa/dists/PPA_11.1.0/POA/install', '--config', '/var/cache/ppa/dists/PPA_11.1.0/POA/poa_config', '--batch', '--reinstall']

    # yum search yum-arch
    base | 1.1 kB 00:00
    extras | 2.1 kB 00:00
    updates | 1.9 kB 00:00
    Warning: No matches found for: yum-arch
    No Matches found

    # yum install createrepo
    Setting up Install Process
    Package createrepo-0.4.11-3.el5.noarch already installed and latest version
    Nothing to do

    Any ideas folks?
     
  12. IgorG

    IgorG Guru

    Messages:
    19,081
    The reason of this issue in absence of which package, because system tries to execute /usr/bin/which createrepo, but which package is absent.

    So to solve the issue, just install which with "yum install which" and after that PPA should be installed successfully.
     
  13. Richard Maynard

    Richard Maynard Kilo Poster

    Messages:
    23
    Thanks - that sorted it. The system is a minimal install created by "rinse". which is probably installed with a normal CentOS installation and therefore assumed to be present.

    Thanks again

    Richard.
     
  14. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Hi, I'm back, two weeks later than I intended to get back to this, but never the less.

    My service provider not long ago brought out a new range of dedicated servers, so I will be getting a different server and setting up PPA on that. I have a question though, if I setup PPA on one server, am I stuck with it on that server, or can I move the installation and all data to a new server later down the line, without any data being effected (such as customer accounts, invoices, service plans, servers, etc)?

    Thank you
    Aaron
     
  15. IgorG

    IgorG Guru

    Messages:
    19,081
    If I correctly understood you are talking about migration possibility for PPA management node from one server to another? We are working on it right now and corresponding manual will be added to Administrator's Guide a bit later, when it will be ready.
     
  16. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Hi thanks for the responses. On a different server, using CentOS 5.9 however SELinux is still playing up. I'm at this stage in the installation:

    [INFO]: Checking that Plesk Panel is not installed...
    [INFO]: Configuring critical environment parameters...
    [INFO]: Configuring Parallels Plesk Automation thirdparty YUM repo...
    [INFO]: Checking that following required packages are installed...
    [INFO]: PACKAGES: libselinux-utils,policycoreutils,httpd,python-simplejson,ppacommon,python-crypto,python-paramiko,pyOpenSSL,samba-client
    [INFO]: MISSING: None
    [INFO]: Setting SELinux mode to 'Permissive'...
    [ERROR]: Failed to execute command: ['/usr/sbin/setenforce', '0']

    When I run that command it runs without any issues. In /etc/selinux/config the setting SELINUX is set to disabled.

    Any ideas?
     
  17. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Note: not sure if it matters, but I'm running CentOS 5.9, and according to the docs it supports 5.8, could this be the source of the issue?
     
  18. IgorG

    IgorG Guru

    Messages:
    19,081
    Could you please post here output of following command:

    # uname -a
     
  19. AaronMcH

    AaronMcH Mega Poster

    Messages:
    130
    Sure:

    Linux <hostname> 3.10.9-xxxx-grs-ipv6-64 #1 SMP Wed Aug 21 11:51:59 CEST 2013 x86_64 x86_64 x86_64 GNU/Linux

    (Actual hostname masked with <hostname>)
     
  20. IgorG

    IgorG Guru

    Messages:
    19,081
    Well. As far as I know OVH uses grsecurity patch for Linux kernel:

    Unfortunately we do not support this patch and it is a reason of this installation issue.
     

Share This Page