Unable to install and run openpaas on cent os

OS : CentOS

I am following Openpaas Documentation to install openpaas in Centos.

following steps correctly as per the Documentation.but openpaas not running after last step i.e

systemctl restart {james,openpaas}

Since Openpass is configured with hostname openpass.local , openpaas cannot be accessed with IP , so changed to hostname as per documentation.

when i point browser to http://openpaas.local ,i get bad gateway.

Openpass creates a nginx configuration at /etc/nginx/conf.d/openpaas.conf as below

upstream openpaas {
	server 127.0.0.1:8080;
}

server {
	listen 80;
	server_name openpaas.local;

	access_log /var/log/openpaas/access.log;
	error_log /var/log/openpaas/error.log;

	keepalive_timeout 70;

	location / {
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "Upgrade";
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header Host $http_host;
		proxy_set_header X-NginX-Proxy true;

		proxy_pass http://openpaas/;

		proxy_redirect off;
		proxy_buffering off;
	}
}

so

curl openpaas.local 

will be reverse proxied to 127.0.0.1:8080, the result i am get for above command is as below

<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.12.2</center>
</body>
</html>

when i check

netstat -pln

post 8080 is free and openpaas is not running.

result of netstat -pln is as below

[root@openpaas ~]# netstat -pln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:25672           0.0.0.0:*               LISTEN      4936/beam
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      4941/php-fpm: maste
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      5213/mongod
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      4943/redis-server 1
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      5155/nginx: master
tcp        0      0 0.0.0.0:4369            0.0.0.0:*               LISTEN      5038/epmd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      4944/sshd
tcp        0      0 127.0.0.1:7000          0.0.0.0:*               LISTEN      5562/java
tcp        0      0 127.0.0.1:7199          0.0.0.0:*               LISTEN      5562/java
tcp        0      0 127.0.0.1:38341         0.0.0.0:*               LISTEN      5562/java
tcp6       0      0 :::5672                 :::*                    LISTEN      4936/beam
tcp6       0      0 127.0.0.1:9200          :::*                    LISTEN      4950/java
tcp6       0      0 ::1:9200                :::*                    LISTEN      4950/java
tcp6       0      0 :::80                   :::*                    LISTEN      5155/nginx: master
tcp6       0      0 :::4369                 :::*                    LISTEN      5038/epmd
tcp6       0      0 127.0.0.1:9042          :::*                    LISTEN      5562/java
tcp6       0      0 127.0.0.1:9300          :::*                    LISTEN      4950/java
tcp6       0      0 ::1:9300                :::*                    LISTEN      4950/java
tcp6       0      0 :::22                   :::*                    LISTEN      4944/sshd
raw6       0      0 :::58                   :::*                    7           4487/NetworkManager
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name     Path
unix  2      [ ACC ]     STREAM     LISTENING     112765   18465/nvim           /tmp/nvimMgTy3a/0
unix  2      [ ACC ]     STREAM     LISTENING     27165    4431/VGAuthService   /var/run/vmware/guestServicePipe
unix  2      [ ACC ]     STREAM     LISTENING     17461    1/systemd            /run/systemd/private
unix  2      [ ACC ]     SEQPACKET  LISTENING     17749    1/systemd            /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     17549    1/systemd            /run/lvm/lvmetad.socket
unix  2      [ ACC ]     STREAM     LISTENING     31153    5213/mongod          /tmp/mongodb-27017.sock
unix  2      [ ACC ]     STREAM     LISTENING     17837    1/systemd            /run/lvm/lvmpolld.socket
unix  2      [ ACC ]     STREAM     LISTENING     26031    1/systemd            /run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     7407     1/systemd            /run/systemd/journal/stdout

To Show some code

Since Openpass not starting, tried to start openpaas manually,
CD to openpaas installation folder and started openpaas server manullay and result is as below. application is exiting without any error. i can see a warning only

[root@openpaas ~]# cd /usr/share/openpaas
[root@openpaas openpaas]# npm start

> linagora-rse@1.2.2 start /usr/share/openpaas
> node server.js

Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
[root@openpaas openpaas]#

added console.log in server.js to check

'use strict';

var async = require('async');
var moduleManager = require('./backend/module-manager');
var core = require('./backend/core');
var logger = core.logger;
var config = core.config('default');

var modules = config.modules;

if (config.hasOwnProperty("modules_append")){
  modules = modules.concat(config.modules_append);
}

console.log("Before setup environment")
moduleManager.setupServerEnvironment();
console.log("after setup environment")

function fireESNState(state) {
  return function fireESN(callback) {
	moduleManager.manager.fire(state, modules).then(function() {
	  callback(null);
	}, function(err) {
	  callback(err);
	});
  };
}

function initCore(callback) {
  core.init(function(err) {
	if (!err) {
	  logger.info('OpenPaaS Core bootstraped, configured in %s mode', process.env.NODE_ENV);
	}
	callback(err);
  });

}
console.log("Before async.series")
async.series([core.templates.inject, fireESNState('lib'), initCore, fireESNState('start')], function(err) {
  if (err) {
	logger.error('Fatal error:', err);
	if (err.stack) {
	  logger.error(err.stack);
	}
	process.exit(1);
  }
  logger.info('OpenPaas ESN is now started on node %s', process.version);
});

from above code

console.log("Before setup environment")
moduleManager.setupServerEnvironment();
console.log("after setup environment")

only Before setup environment is printed, after setup environment is not printed.

how to get it working.

i guess npm install may solve the problem, deleted node_modules and did npm install. but this was not a solution , no error and application does not start.

tried npm install again.

i getting this error:

npm WARN lifecycle linagora-rse@1.2.2~postinstall: cannot run in wd linagora-rse@1.2.2 bower install --allow-root (wd=/usr/share/openpaas)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

any one there? is this community still alive?

1 Like

Hello @manslogic
So sorry for the late reply.

From the info you provided, Iā€™m not sure about the error.

I will ask OpenPaaS team and will answer to you ASAP if we know the reason.