Vagrant VM: no module named paramiko

82 views
Skip to first unread message

Craig Sylvester

unread,
May 13, 2016, 11:28:32 AM5/13/16
to Greenplum Developers
Downloaded the latest source from githup today (May 13, 2016).

cd gpdb-master/vagrant/centos
vagrant up gpdb

...

vagrant ssh gpdb

[vagrant@gpdbvagrant ~]$ psql template1
psql: FATAL:  System was started in master-only utility mode - only utility mode connections are allowed
[vagrant@gpdbvagrant ~]$ PGOPTIONS='-c gp_session_role=utility' psql template1
psql (8.3devel)
Type "help" for help.

template1=# select version();

       version

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----------------------
 PostgreSQL 8.3devel (Greenplum Database 4.3.99.00 build dev) on x86_64-unknown-
linux-gnu, compiled by GCC cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4) compiled on
 May 13 2016 14:13:00
(1 row)

template1=# \q
[vagrant@gpdbvagrant ~]$ gpstop -m
Error: unable to import module: No module named paramiko

Anyone else have this problem? I tried doing a 'pip install paramiko' and it fails to build because of a missing include file (ffi.h).

/Craig

Dan Baskette

unread,
May 13, 2016, 12:30:11 PM5/13/16
to Craig Sylvester, Greenplum Developers
Normally that error is associated with the wrong python being used.   Did you source the Greenplum path?

———————
Dan Baskette
Technical Marketing

770-355-6006  - Cell
@dbbaskette   - Twitter

Craig Sylvester

unread,
May 13, 2016, 12:43:46 PM5/13/16
to Greenplum Developers, csylv...@pivotal.io
Hi Dan,

Yes, it is sourced. Here are the contents of the greenplum_path.sh file:

GPHOME=/usr/local/gpdb

# Replace with symlink path if it is present and correct
if [ -h ${GPHOME}/../greenplum-db ]; then
    GPHOME_BY_SYMLINK
=`(cd ${GPHOME}/../greenplum-db/ && pwd -P)`
   
if [ x"${GPHOME_BY_SYMLINK}" = x"${GPHOME}" ]; then
        GPHOME
=`(cd ${GPHOME}/../greenplum-db/ && pwd -L)`/.
   
fi
    unset GPHOME_BY_SYMLINK
fi
#setup PYTHONHOME
if [ -x $GPHOME/ext/python/bin/python ]; then
    PYTHONHOME
="$GPHOME/ext/python"
fi
PYTHONPATH
=$GPHOME/lib/python
PATH
=$GPHOME/bin:$PYTHONHOME/bin:$PATH
LD_LIBRARY_PATH
=$GPHOME/lib:$PYTHONHOME/lib:$LD_LIBRARY_PATH
OPENSSL_CONF
=$GPHOME/etc/openssl.cnf
export GPHOME
export PATH
export LD_LIBRARY_PATH
export PYTHONPATH
export PYTHONHOME
export OPENSSL_CONF
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH


There is no $GPHOME/ext/python/bin/python directory (in fact, there is no $GPHOME/ext directory). The python executable used is /usr/python (2.7)
But, PYTHONPATH=$GPHOME/lib/python does exist.

And I made no changes to what I downloaded. Just fired up vagrant, ssh'ed in and tried restarting the db.

/Craig

On Friday, May 13, 2016 at 12:30:11 PM UTC-4, Daniel Baskette wrote:
Normally that error is associated with the wrong python being used.   Did you source the Greenplum path?

———————
Dan Baskette
Technical Marketing

Craig Sylvester

unread,
May 13, 2016, 2:28:52 PM5/13/16
to Greenplum Developers
Decided to start over and keep the output from the vagrant up command.
Attached is the output from running 'vagrant up gpdb'

But here is the tail end of the output file:

==> gpdb: 20160513:18:09:26:015918 gpinitsystem:gpdbvagrant:vagrant-[INFO]:-Starting the Master in admin mode
==> gpdb: Error: unable to import module: No module named paramiko
==> gpdb: 20160513:18:09:30:gpinitsystem:gpdbvagrant:vagrant-[FATAL]:-Unknown host  Script Exiting!
==> gpdb: 20160513:18:09:30:015918 gpinitsystem:gpdbvagrant:vagrant-[WARN]:-Script has left Greenplum Database in an incomplete state
==> gpdb: 20160513:18:09:30:015918 gpinitsystem:gpdbvagrant:vagrant-[WARN]:-Run command /bin/bash /home/vagrant/gpAdminLogs/backout_gpinitsystem_vagrant_20160513_180854 to remove these changes
==> gpdb: 20160513:18:09:30:015918 gpinitsystem:gpdbvagrant:vagrant-[INFO]:-Start Function BACKOUT_COMMAND
==> gpdb: 20160513:18:09:30:015918 gpinitsystem:gpdbvagrant:vagrant-[INFO]:-End Function BACKOUT_COMMAND
==> gpdb: ========================================
==> gpdb: gpinitsystem returned: 2
==> gpdb: ========================================
==> gpdb: ======================================================================
==> gpdb:                            OPTIMIZER STATE
==> gpdb: ----------------------------------------------------------------------
==> gpdb:   Optimizer state .. : psql: FATAL:  System was started in master-only utility mode - only utility mode connections are allowed
==> gpdb: ======================================================================
==> gpdb: psql: FATAL:  System was started in master-only utility mode - only utility mode connections are allowed
==> gpdb: ======================================================================
==> gpdb: make[1]: Leaving directory `/home/vagrant/gpdb/gpAux/gpdemo'
==> gpdb: make[1]: *** [cluster] Error 2
==> gpdb: make: *** [all] Error 2
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
vagrant_up.out

Craig Sylvester

unread,
May 13, 2016, 3:07:05 PM5/13/16
to Greenplum Developers
I think I found what was missing. Testing it now. The libffi-devel package is needed. Added it to the vagrant-setup.sh file and will see if it builds correctly.


On Friday, May 13, 2016 at 11:28:32 AM UTC-4, Craig Sylvester wrote:

Craig Sylvester

unread,
May 13, 2016, 5:40:13 PM5/13/16
to Greenplum Developers
Adding this line to the gpdb-master/vagrant/centos/vagrant-setup.sh file solves the problem:

sudo yum -y install libffi-devel

Xin Zhang

unread,
May 20, 2016, 3:33:11 PM5/20/16
to Craig Sylvester, Greenplum Developers
Thanks. Is there any PR on it?
--
SHIN
Reply all
Reply to author
Forward
0 new messages