Some notes re installations (& waiting for keyspaces infomation):
Under Ubuntu 14.04:
run 'npm install' under /front
Problem: /usr/bin/env: node: No such file or directory
Solved by running:
sudo ln -s /usr/bin/nodejs /usr/bin/node
run 'composer install' under /engine
Problem:
- Installation request for mongodb/mongodb 1.0.2 -> satisfiable by mongodb/mongodb[1.0.2].
- mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
Reason:
PHP mongodb extension is not installed for 7.1 under ubuntu 14.04
Solved by:
remove php 7.1, use php 7.0
change php_version="7.1" to php_version="7.0" in bootstrap-ubuntu.sh under /bin
change server unix:/run/php/php7.1-fpm.sock; to server unix:/run/php/php7.0-fpm.sock; in nginx.conf under /conf
run 'composer install' under /engine
Problem:
[RuntimeException]
Failed to execute git clone --no-checkout 'https://:[email protected]/m
inds/minds-php-sdk.git' '/home/admin/Documents/Minds/minds/engine/vendo
r/minds/minds-php-sdk' && cd '/home/admin/Documents/Minds/minds/engine/
vendor/minds/minds-php-sdk' && git remote add composer 'https://:_
@github.com/minds/minds-php-sdk.git' && git fetch composer
Cloning into '/home/admin/Documents/Minds/minds/engine/vendor/minds/min
ds-php-sdk'...
remote: Repository not found.
fatal: repository 'https://:***@github.com/minds/minds-php-sdk.git/'
not found
Solved by:
delete
"minds/minds-php-sdk": "dev-master@dev",
repository for minds-php-sdk
from composer.json and delete composer.lock
rerun composer install
run 'gulp build && gulp build.indexfront' under /front
Problem:
Error: EPERM, chmod '/home/admin/Documents/Minds/minds/front/app/src/plugins/Groups/card'
Solved by run:
sudo npm install -g npm-check-updates
sudo npm install npm@latest -g
sudo npm update
sudo chown admin -R front
cd front
gulp build && gulp build.index
open http://localhost/minds/ or http://10.54.0.111/ under Vagrant
Problem:
nginx error log:
[Thu Aug 18 10:08:58.311591 2016] [:error] [pid 2889] [client 127.0.0.1:38308] Error connecting to 127.0.0.1: cassandra\InvalidRequestException:
[Thu Aug 18 10:08:58.312365 2016] [:error] [pid 2889] [client 127.0.0.1:38308] Error connecting to 127.0.0.1: cassandra\InvalidRequestException:
[Thu Aug 18 10:08:58.313457 2016] [:error] [pid 2889] [client 127.0.0.1:38308] Error connecting to 127.0.0.1: cassandra\InvalidRequestException:
[Thu Aug 18 10:08:58.313890 2016] [:error] [pid 2889] [client 127.0.0.1:38308] Error connecting to 127.0.0.1: cassandra\InvalidRequestException:
[Thu Aug 18 10:08:58.314410 2016] [:error] [pid 2889] [client 127.0.0.1:38308] Exception #1471478938: exception 'InstallationException' with message 'Unable to handle this request. This site is not configured or the database is down.' in /var/www/html/minds/engine/lib/configuration.php:531\nStack trace:\n#0 /var/www/html/minds/engine/lib/elgglib.php(2056): _elgg_load_site_config()\n#1 [internal function]: _elgg_engine_boot('boot', 'system', NULL)\n#2 /var/www/html/minds/engine/Core/Events/Dispatcher.php(131): call_user_func_array('_elgg_engine_bo...', Array)\n#3 /var/www/html/minds/engine/lib/elgglib.php(623): Minds\Core\Events\Dispatcher::trigger('boot', 'elgg/event/syst...', NULL, true)\n#4 /var/www/html/minds/engine/Core/Minds.php(74): elgg_trigger_event('boot', 'system')\n#5 /var/www/html/minds/engine/start.php(23): Minds\Core\Minds->start()\n#6 /var/www/html/minds/index.php(3): require_once('/var/www/html/m...')\n#7 {main}
Solved by
add and change in settings.php
$CONFIG->installed = true;
$CONFIG->path = '/var/www/Minds/';
$CONFIG->plugins_path = '/var/www/Minds/plugins/';
$CONFIG->pluginspath = '/var/www/Minds/plugins/';
$CONFIG->dataroot = '/home/vagrant/tmpdata/'; //create the folder
$CONFIG->default_site = '1';
$CONFIG->site_id = '1';
$CONFIG->site_secret = '8c4e4baf87bb8681e67f3668b02fb86b';
$CONFIG->site_guid = '0';
$CONFIG->site_name = 'Test minds';
$CONFIG->site_url = '127.0.0.1';
$CONFIG->wwwroot = 'localhost/Minds';
$CONFIG->site_email = '';
$CONFIG->site_description = 'Test12';
Problem:
PHP message: Error connecting to 127.0.0.1: Thrift\Exception\TException: TSocket: Could not connect to 127.0.0.1:9160 (Connection refused [111])
PHP message: Error connecting to 127.0.0.1: Thrift\Exception\TException: TSocket: Could not connect to 127.0.0.1:9160 (Connection refused [111])
PHP message: Error connecting to 127.0.0.1: Thrift\Exception\TException: TSocket: Could not connect to 127.0.0.1:9160 (Connection refused [111])
PHP message: PHP WARNING: 2016-08-26 05:58:09 (UTC): "socket_connect(): unable to connect [111]: Connection refused" in file /var/www/Minds/engine/vendor/duoshuo/php-cassandra/src/Connection/Socket.php (line 57)
PHP message: PHP WARNING: 2016-08-26 05:58:09 (UTC): "Declaration of Minds\Core\Data\indexes::get($key_id, array $options = Array) should be compatible with Minds\Core\Data\Call::get($offset = '', $limit = 10)" in file /var/www/Minds/engine/Core/Data/indexes.php (line 0)
PHP message: Error connecting to 127.0.0.1: Thrift\Exception\TException: TSocket: Could not connect to 127.0.0.1:9160 (Connection refused [111])
PHP message: Error connecting to 127.0.0.1: Thrift\Exception\TException: TSocket: Could not connect to 127.0.0.1:9160 (Connection refused [111])" while reading response header from upstream, client: 10.54.0.1, server: _, request: "GET /api/v1/blog/featured?limit=4 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "10.54.0.111", referrer: "http://10.54.0.111/"
Solved by install
php-curl
elasticsearch
restart cassandra
check:
nodetool status
Cassandra keyspaces data and structure need to be set up
See engine/settings.php:
$CONFIG->cassandra = (object) [
'keyspace' => 'minds',
'servers' => [ '127.0.0.1' ],
'cql_servers' => [ '127.0.0.1:9042' ]
];
and engine/Spec/bootstrap.php:
$CONFIG->cassandra->keyspace = 'phpspec';
$CONFIG->cassandra->servers = array('127.0.0.1');
$CONFIG->cassandra->cql_servers = array('127.0.0.1:9042');
cqlsh> CREATE KEYSPACE minds WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'datacenter1' : 3 };
cqlsh> CREATE KEYSPACE phpspec WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'datacenter1' : 3 };
Waiting for keyspaces information for next step