Andrew Onischuk created AMBARI-24495:
----------------------------------------

             Summary: ambari-server setup fails with postgresql >= 9.3 
                 Key: AMBARI-24495
                 URL: https://issues.apache.org/jira/browse/AMBARI-24495
             Project: Ambari
          Issue Type: Bug
            Reporter: Andrew Onischuk
            Assignee: Andrew Onischuk
             Fix For: 2.7.1
         Attachments: AMBARI-24495.patch

ambari-server setup with default postgres has been failing with

    
    
    OSError: [Errno 2] No such file or directory: '/usr/bin/postgresql-setup'
    

Looks like postgres packages/dependencies are not installed along with
installing ambari server install.  
below is output from ambari-server install from ambari-2.7.1 cluster

    
    
    2018-08-07 
11:17:56,106|executor.py.167|INFO|14260|MainThread|172.27.25.203|executing the 
command='yum -y install ambari-server'
    2018-08-07 11:17:56,432|executor.py.167|INFO|14260|Thread-191|stdout: 
Loaded plugins: ovl, priorities
    2018-08-07 11:17:57,971|executor.py.167|INFO|14260|Thread-191|stdout: 12711 
packages excluded due to repository priority protections
    2018-08-07 11:17:58,754|executor.py.167|INFO|14260|Thread-191|stdout: 
Resolving Dependencies
    2018-08-07 11:17:58,754|executor.py.167|INFO|14260|Thread-191|stdout: --> 
Running transaction check
    2018-08-07 11:17:58,755|executor.py.167|INFO|14260|Thread-191|stdout: ---> 
Package ambari-server.x86_64 0:2.7.1.0-63 will be installed
    2018-08-07 11:17:58,974|executor.py.167|INFO|14260|Thread-191|stdout: --> 
Finished Dependency Resolution
    2018-08-07 11:17:59,146|executor.py.167|INFO|14260|Thread-191|stdout: 
    2018-08-07 11:17:59,146|executor.py.167|INFO|14260|Thread-191|stdout: 
Dependencies Resolved
    2018-08-07 11:17:59,147|executor.py.167|INFO|14260|Thread-191|stdout: 
    2018-08-07 11:17:59,147|executor.py.167|INFO|14260|Thread-191|stdout: 
================================================================================
    2018-08-07 11:17:59,147|executor.py.167|INFO|14260|Thread-191|stdout:  
Package            Arch        Version            Repository              Size
    2018-08-07 11:17:59,147|executor.py.167|INFO|14260|Thread-191|stdout: 
================================================================================
    2018-08-07 11:17:59,147|executor.py.167|INFO|14260|Thread-191|stdout: 
Installing:
    2018-08-07 11:17:59,148|executor.py.167|INFO|14260|Thread-191|stdout:  
ambari-server      x86_64      2.7.1.0-63         ambari-2.7.1.0-63      366 M
    2018-08-07 11:17:59,148|executor.py.167|INFO|14260|Thread-191|stdout: 
    2018-08-07 11:17:59,148|executor.py.167|INFO|14260|Thread-191|stdout: 
Transaction Summary
    2018-08-07 11:17:59,148|executor.py.167|INFO|14260|Thread-191|stdout: 
================================================================================
    2018-08-07 11:17:59,148|executor.py.167|INFO|14260|Thread-191|stdout: 
Install  1 Package
    2018-08-07 11:17:59,149|executor.py.167|INFO|14260|Thread-191|stdout: 
    2018-08-07 11:17:59,149|executor.py.167|INFO|14260|Thread-191|stdout: Total 
download size: 366 M
    2018-08-07 11:17:59,149|executor.py.167|INFO|14260|Thread-191|stdout: 
Installed size: 434 M
    2018-08-07 11:17:59,152|executor.py.167|INFO|14260|Thread-191|stdout: 
Downloading packages:
    2018-08-07 11:18:03,735|executor.py.167|INFO|14260|Thread-191|stdout: 
Running transaction check
    2018-08-07 11:18:03,736|executor.py.167|INFO|14260|Thread-191|stdout: 
Running transaction test
    2018-08-07 11:18:04,048|executor.py.167|INFO|14260|Thread-191|stdout: 
Transaction test succeeded
    2018-08-07 11:18:04,049|executor.py.167|INFO|14260|Thread-191|stdout: 
Running transaction
    2018-08-07 11:18:21,843|executor.py.167|INFO|14260|Thread-191|stdout:   
Installing : ambari-server-2.7.1.0-63.x86_64                              1/1
    2018-08-07 11:18:22,568|executor.py.167|INFO|14260|Thread-191|stdout:  
    2018-08-07 11:18:22,569|executor.py.167|INFO|14260|Thread-191|stdout:   
Verifying  : ambari-server-2.7.1.0-63.x86_64                              1/1
    2018-08-07 11:18:22,676|executor.py.167|INFO|14260|Thread-191|stdout:  
    2018-08-07 11:18:22,676|executor.py.167|INFO|14260|Thread-191|stdout: 
    2018-08-07 11:18:22,676|executor.py.167|INFO|14260|Thread-191|stdout: 
Installed:
    2018-08-07 11:18:22,676|executor.py.167|INFO|14260|Thread-191|stdout:   
ambari-server.x86_64 0:2.7.1.0-63                                             
    2018-08-07 11:18:22,677|executor.py.167|INFO|14260|Thread-191|stdout: 
    2018-08-07 11:18:22,677|executor.py.167|INFO|14260|Thread-191|stdout: 
Complete!
    

where as on an ambari-2.7.0 cluster we do have postgres server packages and
lib and is being installed with ambari-server install

    
    
    [root@c7401 ~]# yum install -y ambari-server
    Loaded plugins: fastestmirror
    ambari-2.7.0.0                                                              
                                                                               
| 2.9 kB  00:00:00     
    ambari-2.7.0.0/primary_db                                                   
                                                                               
|  25 kB  00:00:00     
    Loading mirror speeds from cached hostfile
     * base: repos.lax.quadranet.com
     * extras: linux.mirrors.es.net
     * updates: mirror.keystealth.org
    Resolving Dependencies
    --> Running transaction check
    ---> Package ambari-server.x86_64 0:2.7.0.0-897 will be installed
    --> Processing Dependency: postgresql-server >= 8.1 for package: 
ambari-server-2.7.0.0-897.x86_64
    --> Running transaction check
    ---> Package postgresql-server.x86_64 0:9.2.23-3.el7_4 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 9.2.23-3.el7_4 for 
package: postgresql-server-9.2.23-3.el7_4.x86_64
    --> Processing Dependency: postgresql(x86-64) = 9.2.23-3.el7_4 for package: 
postgresql-server-9.2.23-3.el7_4.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: 
postgresql-server-9.2.23-3.el7_4.x86_64
    --> Running transaction check
    ---> Package postgresql.x86_64 0:9.2.23-3.el7_4 will be installed
    ---> Package postgresql-libs.x86_64 0:9.2.23-3.el7_4 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    
==================================================================================================================================================================================
     Package                                        Arch                        
        Version                                     Repository                  
                 Size
    
==================================================================================================================================================================================
    Installing:
     ambari-server                                  x86_64                      
        2.7.0.0-897                                 ambari-2.7.0.0              
                367 M
    Installing for dependencies:
     postgresql                                     x86_64                      
        9.2.23-3.el7_4                              base                        
                3.0 M
     postgresql-libs                                x86_64                      
        9.2.23-3.el7_4                              base                        
                234 k
     postgresql-server                              x86_64                      
        9.2.23-3.el7_4                              base                        
                3.8 M
    
    Transaction Summary
    
==================================================================================================================================================================================
    Install  1 Package (+3 Dependent packages)
    
    Total download size: 374 M
    Installed size: 468 M
    Downloading packages:
    (1/4): postgresql-libs-9.2.23-3.el7_4.x86_64.rpm                            
                                                                               
| 234 kB  00:00:00     
    (2/4): postgresql-server-9.2.23-3.el7_4.x86_64.rpm                          
                                                                               
| 3.8 MB  00:00:00     
    (3/4): postgresql-9.2.23-3.el7_4.x86_64.rpm                                 
                                                                               
| 3.0 MB  00:00:04     
    warning: 
/var/cache/yum/x86_64/7/ambari-2.7.0.0/packages/ambari-server-2.7.0.0-897.x86_64.rpm:
 Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY17 MB/s | 371 MB  00:00:00 
ETA 
    Public key for ambari-server-2.7.0.0-897.x86_64.rpm is not installed
    (4/4): ambari-server-2.7.0.0-897.x86_64.rpm                                 
                                                                               
| 367 MB  00:00:23     
    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                       
                                                                       16 MB/s 
| 374 MB  00:00:23     
    Retrieving key from 
http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.0.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Importing GPG key 0x07513CAD:
     Userid     : "Jenkins (HDP Builds) <[email protected]>"
     Fingerprint: df52 ed4f 7a3a 5882 c099 4c66 b973 3a7a 0751 3cad
     From       : 
http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.0.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : postgresql-libs-9.2.23-3.el7_4.x86_64                        
                                                                                
                  1/4 
      Installing : postgresql-9.2.23-3.el7_4.x86_64                             
                                                                                
                  2/4 
      Installing : postgresql-server-9.2.23-3.el7_4.x86_64                      
                                                                                
                  3/4 
      Installing : ambari-server-2.7.0.0-897.x86_64                             
                                                                                
                  4/4 
      Verifying  : postgresql-9.2.23-3.el7_4.x86_64                             
                                                                                
                  1/4 
      Verifying  : ambari-server-2.7.0.0-897.x86_64                             
                                                                                
                  2/4 
      Verifying  : postgresql-libs-9.2.23-3.el7_4.x86_64                        
                                                                                
                  3/4 
      Verifying  : postgresql-server-9.2.23-3.el7_4.x86_64                      
                                                                                
                  4/4 
    
    Installed:
      ambari-server.x86_64 0:2.7.0.0-897                                        
                                                                                
                      
    
    Dependency Installed:
      postgresql.x86_64 0:9.2.23-3.el7_4                     
postgresql-libs.x86_64 0:9.2.23-3.el7_4                     
postgresql-server.x86_64 0:9.2.23-3.el7_4                    
    
    Complete!
    






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to