Rockstor Developer Box - Postgres failure

I’ve been following the docs for creating a developer machine after installing the 3.18-4 build and the following is the entire output that I receive when I run the buildout command.

./bin/buildout -N -c buildout.cfg
Setting socket time out to 120 seconds.
Develop: '/root/rockstor-core/.'
Getting distribution for 'plone.recipe.command'.
Got plone.recipe.command 1.1.
Getting distribution for 'djangorecipe==1.9'.
Got djangorecipe 1.9.
Getting distribution for 'Django==1.6.11'.
Got Django 1.6.11.
Getting distribution for 'zc.recipe.egg>=2.0.0a3'.
Got zc.recipe.egg 2.0.3.
Getting distribution for 'collective.recipe.template'.
Got collective.recipe.template 1.13.
Getting distribution for 'hexagonit.recipe.download'.
Got hexagonit.recipe.download 1.7.1.
Getting distribution for 'collective.recipe.cmd'.
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'bootstrap.py'
warning: no previously-included files found matching 'buildout.cfg'
warning: no previously-included files found matching 'tox.ini'
Got collective.recipe.cmd 0.11.
Unused options for buildout: 'include-site-packages'.
Installing stop-rockstor.
stop-rockstor: Running 'systemctl stop rockstor'
Unused options for stop-rockstor: 'update-command'.
Installing rpm-deps.
rpm-deps: Running '        sudo /usr/bin/yum install --setopt=timeout=600 -y samba samba-client ypbind rpcbind \
	systemtap-runtime gcc-c++ python-devel kernel-debuginfo \
	kernel-devel systemtap at samba-winbind samba-winbind-clients \
	oddjob-mkhomedir pam_krb5 krb5-workstation postgresql \
	postgresql-server postgresql-devel kernel-ml btrfs-progs rsync \
	nfs-utils kernel-ml avahi netatalk smartmontools net-tools sos hdparm \
	postfix cyrus-sasl-plain yum-cron nano usbutils pciutils shellinabox \
	epel-release'
Loaded plugins: changelog, fastestmirror
rockstor                                                                                                        | 2.9 kB  00:00:00
Loading mirror speeds from cached hostfile
 * base: linux.mirrors.es.net
 * epel: mirror.sfo12.us.leaseweb.net
 * extras: mirrors.kernel.org
 * updates: linux.mirrors.es.net
Installing rpm-deps-nut.
rpm-deps-nut: Running 'sudo /usr/bin/yum install --setopt=timeout=600 -y nut nut-xml'
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * base: linux.mirrors.es.net
 * epel: mirror.sfo12.us.leaseweb.net
 * extras: mirrors.kernel.org
 * updates: linux.mirrors.es.net
Package nut-2.7.2-3.el7.x86_64 already installed and latest version
Package nut-xml-2.7.2-3.el7.x86_64 already installed and latest version
Nothing to do
Installing rpm-deps-ad.
rpm-deps-ad: Running 'sudo /usr/bin/yum install --setopt=timeout=600 -y realmd sssd oddjob oddjob-mkhomedir adcli \
samba-common'
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * base: linux.mirrors.es.net
 * epel: mirror.sfo12.us.leaseweb.net
 * extras: mirrors.kernel.org
 * updates: linux.mirrors.es.net
Package realmd-0.16.1-5.el7.x86_64 already installed and latest version
Package sssd-1.13.0-40.el7_2.12.x86_64 already installed and latest version
Package oddjob-0.31.5-4.el7.x86_64 already installed and latest version
Package oddjob-mkhomedir-0.31.5-4.el7.x86_64 already installed and latest version
Package adcli-0.7.5-4.el7.x86_64 already installed and latest version
Package samba-common-4.2.10-7.el7_2.noarch already installed and latest version
Nothing to do
Installing delete-prod-rpm.
delete-prod-rpm: Running 'if [[ -d /opt/rockstor ]]; then
systemctl stop rockstor;
systemctl disable rockstor;
rm -rf /var/lib/pgsql/data;
sudo /usr/bin/yum remove -y rockstor;
rm -rf /opt/rockstor
fi'
Unused options for delete-prod-rpm: 'update-command'.
Installing django.
Getting distribution for 'chardet==2.3.0'.
warning: no files found matching 'COPYING'
warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.png' under directory 'docs'
warning: no files found matching '*.gif' under directory 'docs'
zip_safe flag not set; analyzing archive contents...
Got chardet 2.3.0.
Getting distribution for 'psutil==3.3.0'.
warning: no previously-included files matching '*' found under directory 'docs/_build'
warning: manifest_maker: MANIFEST.in, line 18: 'recursive-include' expects <dir> <pattern1> <pattern2> ...

zip_safe flag not set; analyzing archive contents...
psutil.__init__: module references __file__
Got psutil 3.3.0.
Getting distribution for 'psycogreen==1.0'.
zip_safe flag not set; analyzing archive contents...
Got psycogreen 1.0.
Getting distribution for 'gevent-socketio==0.3.6'.
Got gevent-socketio 0.3.6.
Getting distribution for 'gevent-websocket==0.9.5'.
Got gevent-websocket 0.9.5.
Getting distribution for 'gevent==1.0.2'.
Running '/bin/sh /tmp/easy_install-X2l8TF/gevent-1.0.2/libev/configure > configure-output.txt' in /tmp/easy_install-X2l8TF/gevent-1.0.2/build/temp.linux-x86_64-2.7/libev
In file included from gevent/libev.h:2:0,
                 from gevent/gevent.core.c:249:
libev/ev.c:483:48: warning: "/*" within comment [-Wcomment]
 /*#define MIN_INTERVAL  0.00000095367431640625 /* 1/2**20, good till 2200 */
 ^
In file included from gevent/libev.h:2:0,
                 from gevent/gevent.core.c:249:
libev/ev.c:1625:31: warning: ‘ev_default_loop_ptr’ initialized and declared ‘extern’ [enabled by default]
   EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a definition despite extern */
                               ^
In file included from gevent/libev.h:2:0,
                 from gevent/gevent.core.c:249:
libev/ev.c: In function ‘ev_io_start’:
libev/ev.c:3648:34: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
   fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
                                  ^
libev/ev.c: At top level:
libev/ev.c:4889:27: warning: "/*" within comment [-Wcomment]
 /* EV_STAT     0x00001000 /* stat data changed */
 ^
libev/ev.c:4890:27: warning: "/*" within comment [-Wcomment]
 /* EV_EMBED    0x00010000 /* embedded event loop needs sweep */
 ^
In file included from gevent/libev.h:2:0,
                 from gevent/gevent.core.c:249:
libev/ev.c: In function ‘evpipe_write’:
libev/ev.c:2254:17: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
           write (evpipe [1], &counter, sizeof (uint64_t));
                 ^
libev/ev.c:2266:17: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
           write (evpipe [1], &(evpipe [1]), 1);
                 ^
libev/ev.c: In function ‘pipecb’:
libev/ev.c:2287:16: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
           read (evpipe [1], &counter, sizeof (uint64_t));
                ^
libev/ev.c:2301:16: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
           read (evpipe [0], &dummy, sizeof (dummy));
                ^
Linking /tmp/easy_install-X2l8TF/gevent-1.0.2/build/lib.linux-x86_64-2.7/gevent/core.so to /tmp/easy_install-X2l8TF/gevent-1.0.2/gevent/core.so
Running '/bin/sh /tmp/easy_install-X2l8TF/gevent-1.0.2/c-ares/configure CONFIG_COMMANDS= CONFIG_FILES= > configure-output.txt' in /tmp/easy_install-X2l8TF/gevent-1.0.2/build/temp.linux-x86_64-2.7/c-ares
In file included from gevent/gevent.ares.c:250:0:
gevent/dnshelper.c: In function ‘gevent_append_addr’:
gevent/dnshelper.c:51:5: warning: implicit declaration of function ‘inet_ntop’ [-Wimplicit-function-declaration]
     if (ares_inet_ntop(family, src, tmpbuf, tmpsize)) {
     ^
gevent/dnshelper.c: In function ‘gevent_make_sockaddr’:
gevent/dnshelper.c:137:5: warning: implicit declaration of function ‘inet_pton’ [-Wimplicit-function-declaration]
     if ( ares_inet_pton(AF_INET, hostp, &((struct sockaddr_in*)sa6)->sin_addr.s_addr) > 0 ) {
     ^
Linking /tmp/easy_install-X2l8TF/gevent-1.0.2/build/lib.linux-x86_64-2.7/gevent/ares.so to /tmp/easy_install-X2l8TF/gevent-1.0.2/gevent/ares.so
Linking /tmp/easy_install-X2l8TF/gevent-1.0.2/build/lib.linux-x86_64-2.7/gevent/_semaphore.so to /tmp/easy_install-X2l8TF/gevent-1.0.2/gevent/_semaphore.so
Linking /tmp/easy_install-X2l8TF/gevent-1.0.2/build/lib.linux-x86_64-2.7/gevent/_util.so to /tmp/easy_install-X2l8TF/gevent-1.0.2/gevent/_util.so
zip_safe flag not set; analyzing archive contents...
gevent.monkey: module references __file__
Got gevent 1.0.2.
Getting distribution for 'coverage'.
warning: no previously-included files found matching 'ci/appveyor.token'
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'tests/eggsrc/build'
no previously-included directories found matching 'tests/eggsrc/dist'
no previously-included directories found matching 'tests/eggsrc/*.egg-info'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
Got coverage 4.2.
Getting distribution for 'mock==1.0.1'.
warning: no files found matching '*.png' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.js' under directory 'docs'
zip_safe flag not set; analyzing archive contents...
Got mock 1.0.1.
Getting distribution for 'django-ztask==0.1.5'.
zip_safe flag not set; analyzing archive contents...
Got django-ztask 0.1.5.
Getting distribution for 'six==1.7.3'.
no previously-included directories found matching 'documentation/_build'
zip_safe flag not set; analyzing archive contents...
six: module references __path__
Got six 1.7.3.
Getting distribution for 'django-oauth-toolkit==0.9.0'.
Got django-oauth-toolkit 0.9.0.
Getting distribution for 'psycopg2==2.6'.
zip_safe flag not set; analyzing archive contents...
psycopg2.tests.test_types_basic: module references __file__
psycopg2.tests.test_module: module references __file__
Got psycopg2 2.6.
Getting distribution for 'South==1.0.2'.
zip_safe flag not set; analyzing archive contents...
south.migration.base: module references __file__
south.tests.__init__: module references __file__
Got South 1.0.2.
Getting distribution for 'pyzmq==15.0.0'.
warning: no files found matching 'tox.ini'
no previously-included directories found matching 'docs/build'
no previously-included directories found matching 'docs/gh-pages'
warning: no previously-included files found matching 'bundled/zeromq/src/Makefile*'
warning: no previously-included files found matching 'bundled/zeromq/src/platform.hpp'
warning: no previously-included files found matching 'zmq/libzmq*'
warning: no previously-included files matching '__pycache__/*' found anywhere in distribution
warning: no previously-included files matching '.deps/*' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
warning: no previously-included files matching '.mailmap' found anywhere in distribution
warning: no previously-included files matching 'Makefile.am' found anywhere in distribution
warning: no previously-included files matching 'Makefile.in' found anywhere in distribution
Did not find libzmq via pkg-config.
{'libraries': ['zmq'], 'extra_link_args': [], 'runtime_library_dirs': [], 'library_dirs': [], 'include_dirs': []}
************************************************
Configure: Autodetecting ZMQ settings...
    Custom ZMQ dir:
build/temp.linux-x86_64-2.7/scratch/tmp/easy_install-xfOT9r/pyzmq-15.0.0/temp/timer_create1i2ceY.o: In function `main':
timer_create1i2ceY.c:(.text+0x15): undefined reference to `timer_create'
collect2: error: ld returned 1 exit status
build/temp.linux-x86_64-2.7/scratch/vers.c:4:17: fatal error: zmq.h: No such file or directory
 #include "zmq.h"
                 ^
compilation terminated.

error: command 'gcc' failed with exit status 1

Failed with default libzmq, trying again with /usr/local
{'libraries': ['zmq'], 'extra_link_args': [], 'runtime_library_dirs': [], 'library_dirs': ['/usr/local/lib'], 'include_dirs': ['/usr/local/include']}
************************************************
Configure: Autodetecting ZMQ settings...
    Custom ZMQ dir:       /usr/local
Assembler messages:
Fatal error: can't create build/temp.linux-x86_64-2.7/scratch/tmp/easy_install-xfOT9r/pyzmq-15.0.0/temp/timer_create9I5nyW.o: No such file or directory
build/temp.linux-x86_64-2.7/scratch/vers.c:4:17: fatal error: zmq.h: No such file or directory
 #include "zmq.h"
                 ^
compilation terminated.

error: command 'gcc' failed with exit status 1

************************************************
Warning: Couldn't find an acceptable libzmq on the system.

If you expected pyzmq to link against an installed libzmq, please check to make sure:

    * You have a C compiler installed
    * A development version of Python is installed (including headers)
    * A development version of ZMQ >= 3.2 is installed (including headers)
    * If ZMQ is not in a default location, supply the argument --zmq=<path>
    * If you did recently install ZMQ to a default location,
      try rebuilding the ld cache with `sudo ldconfig`
      or specify zmq's location with `--zmq=/usr/local`

You can skip all this detection/waiting nonsense if you know
you want pyzmq to bundle libzmq as an extension by passing:

    `--zmq=bundled`

I will now try to build libzmq as a Python extension
unless you interrupt me (^C) in the next 10 seconds...

 1...
************************************************
Using bundled libzmq
already have bundled/zeromq
attempting ./configure to generate platform.hpp
Warning: failed to configure libzmq:
/bin/sh: ./configure: No such file or directory

staging platform.hpp from: /tmp/easy_install-xfOT9r/pyzmq-15.0.0/buildutils/include_linux
************************************************
checking for timer_create
build/temp.linux-x86_64-2.7/tmp/easy_install-xfOT9r/pyzmq-15.0.0/temp/timer_createLxBjIz.o: In function `main':
timer_createLxBjIz.c:(.text+0x15): undefined reference to `timer_create'
collect2: error: ld returned 1 exit status
no timer_create, linking librt
************************************************
Using bundled libsodium
already have bundled/libsodium
already have crypto_scalarmult_curve25519.h
already have crypto_stream_salsa20.h
staging /tmp/easy_install-xfOT9r/pyzmq-15.0.0/buildutils/include_sodium/version.h to bundled/libsodium/src/libsodium/include/sodium/version.h
************************************************
bundled/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c:59:5: warning: missing braces around initializer [-Wmissing-braces]
     SODIUM_C99(.random_data_source_fd =) -1,
     ^
bundled/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c:59:5: warning: (near initialization for ‘stream.key’) [-Wmissing-braces]
bundled/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c: In function ‘randombytes_salsa20_random_getword’:
bundled/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c:311:14: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     int      ret;
              ^
bundled/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c: In function ‘randombytes_salsa20_random_buf’:
bundled/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c:371:12: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     int    ret;
            ^
bundled/libsodium/src/libsodium/sodium/utils.c:45:15: warning: ‘page_size’ defined but not used [-Wunused-variable]
 static size_t page_size;
               ^
zmq/backend/cython/socket.c: In function ‘__pyx_f_3zmq_7backend_6cython_6socket__send_copy.constprop.28’:
zmq/backend/cython/socket.c:2587:13: warning: ‘__pyx_v_rc2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   __pyx_t_2 = __pyx_f_3zmq_7backend_6cython_7checkrc__check_rc(__pyx_v_rc2); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             ^
  File "build/bdist.linux-x86_64/egg/zmq/tests/_test_asyncio.py", line 37
    yield from a.send(b'hi')
             ^
SyntaxError: invalid syntax

  File "/root/rockstor-core/eggs/tmpnA8tvt/pyzmq-15.0.0-py2.7-linux-x86_64.egg/zmq/tests/_test_asyncio.py", line 37
    yield from a.send(b'hi')
             ^
SyntaxError: invalid syntax

Got pyzmq 15.0.0.
Getting distribution for 'requests==1.1.0'.
Got requests 1.1.0.
Getting distribution for 'django-pipeline==1.2.23'.
Got django-pipeline 1.2.23.
Getting distribution for 'pytz==2014.3'.
Got pytz 2014.3.
Getting distribution for 'djangorestframework==3.1.1'.
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Got djangorestframework 3.1.1.
Getting distribution for 'URLObject==2.1.1'.
zip_safe flag not set; analyzing archive contents...
Got URLObject 2.1.1.
Getting distribution for 'distribute>=0.6.35'.
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

Got distribute 0.7.3.
Getting distribution for 'greenlet>=0.4.7'.
Got greenlet 0.4.10.
Getting distribution for 'oauthlib==1.0.1'.
zip_safe flag not set; analyzing archive contents...
Got oauthlib 1.0.1.
Getting distribution for 'django-braces>=1.2.2'.
Got django-braces 1.9.0.
Generated script '/root/rockstor-core/bin/django'.
Generated script '/root/rockstor-core/bin/test'.
Installing scripts.
Generated script '/root/rockstor-core/bin/rockon-json'.
Generated script '/root/rockstor-core/bin/backup-plugin'.
Generated script '/root/rockstor-core/bin/qgroup-test'.
Generated script '/root/rockstor-core/bin/prep_db'.
Generated script '/root/rockstor-core/bin/ovpn-client-gen'.
Generated script '/root/rockstor-core/bin/delete-api-key'.
Generated script '/root/rockstor-core/bin/pwreset'.
Generated script '/root/rockstor-core/bin/initrock'.
Generated script '/root/rockstor-core/bin/ovpn-initpki'.
Generated script '/root/rockstor-core/bin/data-collector'.
Generated script '/root/rockstor-core/bin/docker-wrapper'.
Generated script '/root/rockstor-core/bin/rcli'.
Generated script '/root/rockstor-core/bin/st-snapshot'.
Generated script '/root/rockstor-core/bin/mnt-share'.
Generated script '/root/rockstor-core/bin/replicad'.
Generated script '/root/rockstor-core/bin/qgroup-maxout-limit'.
Generated script '/root/rockstor-core/bin/delete-rockon'.
Generated script '/root/rockstor-core/bin/bootstrap'.
Generated script '/root/rockstor-core/bin/ovpn-client-print'.
Generated script '/root/rockstor-core/bin/send-replica'.
Generated script '/root/rockstor-core/bin/flash-optimize'.
Generated script '/root/rockstor-core/bin/qgroup-clean'.
Generated script '/root/rockstor-core/bin/st-pool-scrub'.
Installing django-settings-conf.
Unused options for django-settings-conf: 'datastore' 'reppubport' 'reprecvport' 'repsinkport' 'smartdb'.
Installing postgres-setup.
postgres-setup: Running 'if [[ ! -d /var/lib/pgsql/data ]]; then
echo "postgres not setup";
systemctl enable postgresql;
postgresql-setup initdb;
systemctl restart postgresql;
su - postgres -c "createdb smartdb";
su - postgres -c "createdb storageadmin";
sudo -u postgres psql -c "CREATE ROLE rocky WITH SUPERUSER LOGIN PASSWORD 'rocky'";
sudo -u postgres psql storageadmin < /root/rockstor-core/conf/storageadmin.sql.in;
sudo -u postgres psql smartdb < /root/rockstor-core/conf/smartdb.sql.in;
sudo -u postgres psql storageadmin -c "select setval('south_migrationhistory_id_seq', (select max(id) from south_migrationhistory))";
sudo -u postgres psql smartdb -c "select setval('south_migrationhistory_id_seq', (select max(id) from south_migrationhistory))";
fi'
Unused options for postgres-setup: 'update-command'.
Installing postgres-conf.
postgres-conf: Running 'su - postgres -c "cp -f /root/rockstor-core/conf/postgresql.conf /var/lib/pgsql/data/";
su - postgres -c "cp -f /root/rockstor-core/conf/pg_hba.conf /var/lib/pgsql/data/";
systemctl restart postgresql;'
cp: cannot stat ‘/root/rockstor-core/conf/postgresql.conf’: Permission denied
cp: cannot stat ‘/root/rockstor-core/conf/pg_hba.conf’: Permission denied
Unused options for postgres-conf: 'update-command'.
Installing gunicorn.
Getting distribution for 'gunicorn==0.16.1'.
Got gunicorn 0.16.1.
Generated script '/root/rockstor-core/bin/rockon-json'.
Generated script '/root/rockstor-core/bin/backup-plugin'.
Generated script '/root/rockstor-core/bin/qgroup-test'.
Generated script '/root/rockstor-core/bin/prep_db'.
Generated script '/root/rockstor-core/bin/ovpn-client-gen'.
Generated script '/root/rockstor-core/bin/delete-api-key'.
Generated script '/root/rockstor-core/bin/pwreset'.
Generated script '/root/rockstor-core/bin/initrock'.
Generated script '/root/rockstor-core/bin/ovpn-initpki'.
Generated script '/root/rockstor-core/bin/data-collector'.
Generated script '/root/rockstor-core/bin/docker-wrapper'.
Generated script '/root/rockstor-core/bin/rcli'.
Generated script '/root/rockstor-core/bin/st-snapshot'.
Generated script '/root/rockstor-core/bin/mnt-share'.
Generated script '/root/rockstor-core/bin/replicad'.
Generated script '/root/rockstor-core/bin/qgroup-maxout-limit'.
Generated script '/root/rockstor-core/bin/delete-rockon'.
Generated script '/root/rockstor-core/bin/bootstrap'.
Generated script '/root/rockstor-core/bin/ovpn-client-print'.
Generated script '/root/rockstor-core/bin/send-replica'.
Generated script '/root/rockstor-core/bin/flash-optimize'.
Generated script '/root/rockstor-core/bin/qgroup-clean'.
Generated script '/root/rockstor-core/bin/st-pool-scrub'.
Generated script '/root/rockstor-core/bin/gunicorn_paster'.
Generated script '/root/rockstor-core/bin/gunicorn'.
Generated script '/root/rockstor-core/bin/gunicorn_django'.
Generated script '/root/rockstor-core/bin/chardetect'.
Generated script '/root/rockstor-core/bin/coverage2'.
Generated script '/root/rockstor-core/bin/coverage-2.7'.
Generated script '/root/rockstor-core/bin/coverage'.
Generated script '/root/rockstor-core/bin/django-admin.py'.
Installing init-gunicorn.
Installing nginx-conf.
Installing shellinabox-conf.
Installing stop-shellinabox.
stop-shellinabox: Running 'systemctl stop shellinaboxd'
Installing mime-types.
Installing extra-stuff.
extra-stuff: Running 'mkdir -p /root/rockstor-core/var/log &&
mkdir -p /root/rockstor-core/src/rockstor/logs &&
usermod -a -G root nginx &&
systemctl disable nginx'
Unused options for extra-stuff: 'update-command'.
Installing js-clean.
js-clean: Running 'rm -rf /root/rockstor-core/static/js/lib.bkp &&
mv -f /root/rockstor-core/static/js/lib /root/rockstor-core/static/js/lib.bkp'
mv: cannot stat ‘/root/rockstor-core/static/js/lib’: No such file or directory
Unused options for js-clean: 'update-command'.
Installing js-libraries.
js-libraries: Extracting package to /root/rockstor-core/static/js/lib
Installing js-sync.
js-sync: Running 'rsync -avz /root/rockstor-core/static/js/lib.bkp/ /root/rockstor-core/static/js/lib/'
sending incremental file list
rsync: change_dir "/root/rockstor-core/static/js/lib.bkp" failed: No such file or directory (2)

sent 12 bytes  received 12 bytes  48.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
Unused options for js-sync: 'update-command'.
Installing supervisord-conf.
Unused options for supervisord-conf: 'host' 'jd_cmd' 'port' 'sm_cmd' 'smart_manager_cmd'.
Installing db-migrate.
db-migrate: Running 'export DJANGO_SETTINGS_MODULE=settings &&
/root/rockstor-core/bin/django migrate storageadmin --database=default --noinput &&
/root/rockstor-core/bin/django migrate oauth2_provider --database=default --noinput &&
/root/rockstor-core/bin/django migrate django_ztask --database=default --noinput &&
/root/rockstor-core/bin/django migrate smart_manager --database=smart_manager --noinput &&
/root/rockstor-core/bin/prep_db'
Traceback (most recent call last):
  File "/root/rockstor-core/bin/django", line 41, in <module>
    sys.exit(djangorecipe.manage.main('rockstor.settings'))
  File "/root/rockstor-core/eggs/djangorecipe-1.9-py2.7.egg/djangorecipe/manage.py", line 9, in main
    management.execute_from_command_line(sys.argv)
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/root/rockstor-core/eggs/South-1.0.2-py2.7.egg/south/management/commands/migrate.py", line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File "/root/rockstor-core/eggs/South-1.0.2-py2.7.egg/south/migration/__init__.py", line 200, in migrate_app
    applied_all = check_migration_histories(applied_all, delete_ghosts, ignore_ghosts)
  File "/root/rockstor-core/eggs/South-1.0.2-py2.7.egg/south/migration/__init__.py", line 79, in check_migration_histories
    for h in histories:
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/models/query.py", line 96, in __iter__
    self._fetch_all()
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/models/sql/compiler.py", line 785, in execute_sql
    cursor = self.connection.cursor()
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/backends/__init__.py", line 160, in cursor
    cursor = self.make_debug_cursor(self._cursor())
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/backends/__init__.py", line 132, in _cursor
    self.ensure_connection()
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/backends/__init__.py", line 127, in ensure_connection
    self.connect()
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/backends/__init__.py", line 127, in ensure_connection
    self.connect()
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/backends/__init__.py", line 115, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/root/rockstor-core/eggs/Django-1.6.11-py2.7.egg/django/db/backends/postgresql_psycopg2/base.py", line 115, in get_new_connection
    return Database.connect(**conn_params)
  File "/root/rockstor-core/eggs/psycopg2-2.6-py2.7-linux-x86_64.egg/psycopg2/__init__.py", line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: FATAL:  Peer authentication failed for user "rocky"

Unused options for db-migrate: 'update-command'.
Installing create-cert.
create-cert: Running 'if [[ ! -d /root/rockstor-core/certs ]]; then
mkdir /root/rockstor-core/certs;
openssl req -nodes -newkey rsa:2048 -keyout /root/rockstor-core/certs/first.key -out /root/rockstor-core/certs/rockstor.csr -subj "/C=US/ST=Rockstor user's state/L=Rockstor user's city/O=Rockstor user/OU=Rockstor dept/CN=rockstor.user" &&
openssl rsa -in /root/rockstor-core/certs/first.key -out /root/rockstor-core/certs/rockstor.key &&
openssl x509 -in /root/rockstor-core/certs/rockstor.csr -out /root/rockstor-core/certs/rockstor.cert -req -signkey /root/rockstor-core/certs/rockstor.key -days 3650
fi'
Generating a 2048 bit RSA private key
.........+++
..........................................................+++
writing new private key to '/root/rockstor-core/certs/first.key'
-----
writing RSA key
Signature ok
subject=/C=US/ST=Rockstor user's state/L=Rockstor user's city/O=Rockstor user/OU=Rockstor dept/CN=rockstor.user
Getting Private key
Unused options for create-cert: 'update-command'.
Installing docker-conf.
Installing rockstor-pre-systemd-conf.
Installing rockstor-systemd-conf.
Installing bootstrap-systemd-conf.
Installing def-kernel.
def-kernel: Running 'grubby --set-default=/boot/vmlinuz-'4.6.0-1.el7.elrepo.x86_64''
Unused options for def-kernel: 'update-command'.
Installing start-rockstor.
start-rockstor: Running 'cp -f /root/rockstor-core/conf/rockstor-pre.service /etc/systemd/system/rockstor-pre.service &&
systemctl enable rockstor-pre.service &&
systemctl daemon-reload &&
systemctl restart rockstor-pre
systemctl start rockstor'
Job for rockstor-pre.service failed because the control process exited with error code. See "systemctl status rockstor-pre.service" and "journalctl -xe" for details.
A dependency job for rockstor.service failed. See 'journalctl -xe' for details.
Unused options for start-rockstor: 'update-command'.

As you can see above, the authentication fails for the postgres user. How can this be? I’ve tried running the command as super user with no luck. Am I supposed to start the postgres service separately? Also, as a side note, is the installation for the various packages supposed to be that verbose?

Thanks for the help debugging :slight_smile:

Postgres won’t start because of these earlier issues:

cp: cannot stat ‘/root/rockstor-core/conf/postgresql.conf’: Permission denied
cp: cannot stat ‘/root/rockstor-core/conf/pg_hba.conf’: Permission denied

Since you’re installing from /root, which has permissions of 550, the regular postgres user doesn’t have access. Please move the source directory over to /opt or any other world-readable directory in order to fix this.

1 Like

That worked, @sfranzen! Now my only issue is that after the buildout command is done, trying to connect to the web ui is failing. Any ideas there? I can ssh into the box.

Ok I was able to get the service running but for some reason now the web UI is throwing some errors. Here’s a picture of the dashboard

That’s… interesting. Anything more detailed in var/log/rockstor.log inside your build dir?

Looks like there is a hint at what’s going on in the logs. Here’s the contents

DEBUG [smart_manager.data_collector:807] Listening on port http://127.0.0.1:8080 and on port 10843 (flash policy server)
[24/Aug/2016 11:06:56] ERROR [storageadmin.util:33] Error running a command. cmd = ['/usr/bin/rpm', '-qi', 'rockstor']. rc = 1. stdout = ['package rockstor is not installed', '']. stderr = ['']
Traceback (most recent call last):
  File "/opt/rockstor-core/src/rockstor/storageadmin/util.py", line 31, in <module>
    version, date = rpm_build_info('rockstor')
  File "/opt/rockstor-core/src/rockstor/system/pkg_mgmt.py", line 92, in rpm_build_info
    o, e, rc = run_command([RPM, '-qi', pkg])
  File "/opt/rockstor-core/src/rockstor/system/osi.py", line 104, in run_command
    raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = ['/usr/bin/rpm', '-qi', 'rockstor']. rc = 1. stdout = ['package rockstor is not installed', '']. stderr = ['']

@gkadillak Hello again and welcome back.

I don’t think this is your problem area as it’s just a complaint about no rockstor rpm package and is usual when installing from source. The normal check for package version doesn’t make sense but is harmless in a development environment. Ie “rpm query info rockstor” which isn’t installed. The build scripts remove the existing rpm to avoid clashes.

I’d start a fresh now you are building outside of /root and see how it goes and make sure to run everything as root from the start. I’ve been meaning to re-visit the build docs so if you find stuff missing please open new issues in the rockstor-docs repo.

Good to see you back again.

2 Likes

Ok I’ll give it another shot, @phillxnet and report back :slight_smile:

Just wanted to give a quick update to both @phillxnet and @sfranzen - my development box is up and running! Thanks again for your help :slight_smile:

3 Likes

Great! And apparently, welcome back :wink:. I’ve only recently started watching these forums and set up a development VM, though my rockstor home NAS has been running for over a year now. Trying to learn-by-doing some of this strange web development stuff.