Content
Openproject Install issue
Added by Shriram Fowkar over 3 years ago
Hi,
I am installing Openproject using RPM repository on CentOS 7. Since I was getting some issue in installing PostgreSQL10, I installed and configured it manually. The wizard also detects it. Even for apache2, the wizard downloaded and installed apache2. Now after completing the wizard I get the following message and am unable to configure openproject.
sh-4.2# openproject configure
Launching installer for openproject...
Selected addons: legacy-installer openproject-edition postgres apache2 repositories smtp memcached openproject
[legacy-installer] ./bin/configure
[openproject-edition] ./bin/configure
DONE
[postgres] ./bin/configure
Trying to connect through password-based authentication...
?column?
----------
1
(1 row)
Connection OK
Postgres connection OK
DONE
[apache2] ./bin/configure
DONE
[repositories] ./bin/configure
DONE
[smtp] ./bin/configure
DONE
[memcached] ./bin/configure
DONE
[openproject] ./bin/configure
DONE
[legacy-installer] ./bin/preinstall
[openproject-edition] ./bin/preinstall
[postgres] ./bin/preinstall
INFO: autoinstall=reuse. Skipping to next step.
[apache2] ./bin/preinstall
getsebool: SELinux is disabled
setsebool: SELinux is disabled.
Note: Forwarding request to 'systemctl enable httpd.service'.
[repositories] ./bin/preinstall
[smtp] ./bin/preinstall
[memcached] ./bin/preinstall
Note: Forwarding request to 'systemctl enable memcached.service'.
[openproject] ./bin/preinstall
[legacy-installer] ./bin/postinstall
[openproject-edition] ./bin/postinstall
[postgres] ./bin/postinstall
[apache2] ./bin/postinstall
Last prefix was /openproject/
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/server/rewrite_mod.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/vhost/compression.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/vhost/expiration.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/vhost/sys.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/vhost/assets.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/vhost/00_prefix_redirect.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/server/proxy_mod.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/server/proxy_http_mod.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/server/headers_mod.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/server/expires_mod.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/server/deflate_mod.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/openproject/addons/apache2/includes/server/filter_mod.conf’
chcon: can't apply partial context to unlabeled file ‘/etc/httpd/conf.d/openproject.conf’
[Mon Apr 12 17:43:14.318239 2021] [so:warn] [pid 48505] AH01574: module deflate_module is already loaded, skipping
[Mon Apr 12 17:43:14.318392 2021] [so:warn] [pid 48505] AH01574: module expires_module is already loaded, skipping
[Mon Apr 12 17:43:14.318455 2021] [so:warn] [pid 48505] AH01574: module filter_module is already loaded, skipping
[Mon Apr 12 17:43:14.318503 2021] [so:warn] [pid 48505] AH01574: module headers_module is already loaded, skipping
[Mon Apr 12 17:43:14.318576 2021] [so:warn] [pid 48505] AH01574: module proxy_http_module is already loaded, skipping
[Mon Apr 12 17:43:14.318636 2021] [so:warn] [pid 48505] AH01574: module proxy_module is already loaded, skipping
[Mon Apr 12 17:43:14.318719 2021] [so:warn] [pid 48505] AH01574: module rewrite_module is already loaded, skipping
Syntax OK
Redirecting to /bin/systemctl restart httpd.service
[repositories] ./bin/postinstall
No repositories have been configured. Skipping configuration.
[smtp] ./bin/postinstall
[memcached] ./bin/postinstall
[openproject] ./bin/postinstall
Server prefix is set. Need to recompile rails assets. Setting RECOMPILE_RAILS_ASSETS=true
W, [2021-04-12T17:43:52.376531 #49353] WARN -- : Creating scope :not_locked. Overwriting existing method Principal.not_locked.
/opt/openproject/lib/tasks/database.rake:49:in `rescue in block (3 levels) in <top (required)>': ---------------------------------------------------
DATABASE UNSUPPORTED ERROR
Database server is not PostgreSql. As OpenProject uses non standard ANSI-SQL for performance optimizations, using a different DBMS will break and is thus prevented.
For more information, see the system requirements.
https://www.openproject.org/system-requirements/
---------------------------------------------------
(StructuredWarnings::StandardWarning)
sh-4.2#
Below is the output of openproject config command :
sh-4.2# openproject config
APP_GROUP=openproject
APP_HOME=/opt/openproject
APP_NAME=openproject
APP_RUNNER_CLI=systemctl
APP_RUNNER_TYPE=systemd
APP_SAFE_NAME=openproject
APP_USER=openproject
APP_WIZARDS=legacy-installer,openproject-edition,postgres,apache2,repositories,smtp,memcached,openproject
ATTACHMENTS_STORAGE_PATH=/var/db/openproject/files
DATABASE_URL=postgresql://openproject:openproject@localhost:5432/openproject
EXECJS_RUNTIME=Node
GEM_PATH=/opt/openproject/vendor/bundle/ruby/2.7.0:
GIT_REPOSITORIES=
HOME=/home/openproject
HOST=127.0.0.1
LANG=en_US.UTF-8
MALLOC_ARENA_MAX=2
MEMCACHED_SERVERS=tcp://127.0.0.1:11211
MEMORY_AVAILABLE=14336
NODE_ENV=production
NODE_HOME=/opt/openproject/.heroku/node
OLDPWD=/
OPENPROJECT_INSTALLATION__TYPE=packager
ORIGINAL_PWD=/root
PATH=bin:/opt/openproject/vendor/bundle/bin:/opt/openproject/vendor/bundle/ruby/2.7.0/bin:/opt/openproject/.heroku/node/bin:/opt/openproject/.heroku/yarn/bin:/usr/local/bin:/usr/bin:/usr/sbin:/opt/openproject/bin:/opt/openproject/node_modules/.bin
PORT=6000
PWD=/opt/openproject
RACK_ENV=production
RAILS_CACHE_STORE=memcache
RAILS_ENV=production
RAILS_LOG_TO_STDOUT=enabled
RAILS_RELATIVE_URL_ROOT=/openproject
RAILS_SERVE_STATIC_FILES=enabled
RECOMPILE_RAILS_ASSETS=true
ROOT_PATH=/
SECRET_KEY_BASE=87a95bbb054fd6fbedb343d0ea29051a799e3ff3732e566280b952afca914c8cd2b6e31b8e0907c5a20f7edef99c5a1a8e852594e20c67ef04e1afeb14c2aefc
SECRET_TOKEN=87a95bbb054fd6fbedb343d0ea29051a799e3ff3732e566280b952afca914c8cd2b6e31b8e0907c5a20f7edef99c5a1a8e852594e20c67ef04e1afeb14c2aefc
SERVER_GROUP=apache
SERVER_HOSTNAME=lab-linuxoss
SERVER_PATH_PREFIX=/openproject/
SERVER_PATH_PREFIX_PREVIOUS=/openproject/
SERVER_PROTOCOL=http
SERVER_USER=apache
SHLVL=0
SVN_REPOSITORIES=
SYS_API_KEY=1efERjfN02BkE0hqWvoUr8AwC1ChjVL1
WEB_CONCURRENCY=28
WEB_MEMORY=512
WEB_TIMEOUT=300
sh-4.2#
Can anybody point out what am I doing wrong ? Any help is overcoming this last hurdle will be extremely helpful.
Thanks in advance.
Replies (20)
Looks like this is some kind of a Major issue in deploying OpenProject. No revert received means nobody has earlier got any response for the similar issue. Some OSS communities are very helpful, some are very rude, some are very helpful for newcomers, some never bother to reply and help.
Similar issue was faced by a fellow community member 1 year back and he posted here but received no reply unfortunatly.
https://community.openproject.org/topics/11580
Hi Shriram,
could you check and comment here the output of the following command?
openproject run bundle exec rails runner "puts ActiveRecord::Base.connection.name"
I think what happens here is that your database does not exist, and OpenProject falls back into a null db to operate. This is meant for things like the first migration where the database connection might not exist yet. In your case, this is shadowing your actual error that your specified database is not available.
You can double check with a psql client installed and
psql $(openproject config:get DATABASE_URL)
Best
Oliver
Oliver Günther wrote:
Thanks Oliver for the help. If I use psql client (psql -U openproject openproject -W) it prompts me for the password and it gives me the psql prompt. See output below :
sh-4.2# psql -U openproject openproject -W
Password for user openproject:
psql (10.16)
Type "help" for help.
openproject=>
Thus both openproject db along with user is already there. I had created it myself.
Below is the output of the command mentioned by you :
sh-4.2# openproject run bundle exec rails runner "puts ActiveRecord::Base.connection.name"
W, [2021-04-13T18:10:49.442402 #66141] WARN -- : Creating scope :not_locked. Overwriting existing method Principal.not_locked.
Traceback (most recent call last):
76: from bin/rails:9:in `<main>'
75: from bin/rails:9:in `require'
74: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/commands.rb:18:in `<top (required)>'
73: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/command.rb:50:in `invoke'
72: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/command/base.rb:69:in `perform'
71: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
70: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
69: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
68: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/commands/runner/runner_command.rb:33:in `perform'
67: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
66: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/command/actions.rb:28:in `require_environment!'
65: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/application.rb:360:in `require_environment!'
64: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.2.1/lib/active_support/dependencies.rb:332:in `require'
63: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.2.1/lib/active_support/dependencies.rb:299:in `load_dependency'
62: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.2.1/lib/active_support/dependencies.rb:332:in `block in require'
61: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
60: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
59: from /opt/openproject/config/environment.rb:34:in `<top (required)>'
58: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/railtie.rb:207:in `method_missing'
57: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/railtie.rb:207:in `public_send'
56: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/application.rb:384:in `initialize!'
55: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/initializable.rb:60:in `run_initializers'
54: from /opt/openproject/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
53: from /opt/openproject/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
52: from /opt/openproject/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
51: from /opt/openproject/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `call'
50: from /opt/openproject/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `each'
49: from /opt/openproject/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
48: from /opt/openproject/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
47: from /opt/openproject/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
46: from /opt/openproject/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
45: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
44: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/initializable.rb:32:in `run'
43: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/initializable.rb:32:in `instance_exec'
42: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.2.1/lib/rails/application/finisher.rb:133:in `block in <module:Finisher>'
41: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:508:in `eager_load_all'
40: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:508:in `each'
39: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:393:in `eager_load'
38: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:393:in `synchronize'
37: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:404:in `block in eager_load'
36: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:725:in `ls'
35: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:725:in `foreach'
34: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:733:in `block in ls'
33: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:416:in `block (2 levels) in eager_load'
32: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/loader.rb:416:in `const_get'
31: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
30: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
29: from /opt/openproject/app/models/queries/users.rb:31:in `<top (required)>'
28: from /opt/openproject/app/models/queries/users.rb:32:in `<module:Users>'
27: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
26: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
25: from /opt/openproject/app/models/queries/users/filters/name_filter.rb:31:in `<top (required)>'
24: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
23: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
22: from /opt/openproject/app/models/queries/users/filters/user_filter.rb:31:in `<top (required)>'
21: from /opt/openproject/app/models/queries/users/filters/user_filter.rb:32:in `<class:UserFilter>'
20: from /opt/openproject/app/models/principals/scopes/user.rb:40:in `user'
19: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/querying.rb:22:in `where'
18: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/scoping/named.rb:32:in `all'
17: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/scoping/named.rb:45:in `default_scoped'
16: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/core.rb:469:in `relation'
15: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/inheritance.rb:90:in `finder_needs_type_condition?'
14: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/inheritance.rb:84:in `descends_from_active_record?'
13: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/model_schema.rb:392:in `columns_hash'
12: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/model_schema.rb:536:in `load_schema'
11: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/model_schema.rb:536:in `synchronize'
10: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/model_schema.rb:539:in `block in load_schema'
9: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/attributes.rb:250:in `load_schema!'
8: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/model_schema.rb:553:in `load_schema!'
7: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/connection_adapters/schema_cache.rb:111:in `columns_hash'
6: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/connection_adapters/schema_cache.rb:111:in `fetch'
5: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/connection_adapters/schema_cache.rb:112:in `block in columns_hash'
4: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/connection_adapters/schema_cache.rb:103:in `columns'
3: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/connection_adapters/schema_cache.rb:103:in `fetch'
2: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/connection_adapters/schema_cache.rb:104:in `block in columns'
1: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-nulldb-adapter-0.7.0/lib/active_record/connection_adapters/nulldb_adapter/core.rb:143:in `columns'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-nulldb-adapter-0.7.0/lib/active_record/connection_adapters/nulldb_adapter/core.rb:143:in `load': cannot load such file -- /opt/openproject/db/schema.rb (LoadError)
sh-4.2#
sh-4.2# psql $(openproject config:get DATABASE_URL)
psql: FATAL: no pg_hba.conf entry for host "::1", user "openproject", database "openproject", SSL off
As you can see from the last output line, your pg_hba.conf contains an error. It is not an OpenProject installation issue.
Best
Oliver
Oliver Günther wrote:
Thanks Oliver for the heads up. I already had
host all all 127.0.0.1/32 md5
in my pg_hba.conf. But in DATABASE_URL I had the following.
DATABASE_URL=postgresql://openproject:openproject@localhost:5432/openproject
After setting DATABASE_URL pointing to 127.0.0.1 insread of saying locahost, it went through.
DATABASE_URL=postgresql://openproject:openproject@127.0.0.1:5432/openproject
Openproject service is started and portal opened.
Thanks again for all the help. Stay Safe.
Hi Shriram,
thanks for getting back and great that you could resolve it.
Best
Oliver
Hi Oliver and All OP Team,
As I do not want to open a new thread, let me put it here.
I have a very serious and persisting issue while install OP on clean Ubuntu 20.04 LTS (only CSF is working, obviously), and the domain has commercial SSL cert, but finally, used no https, to avoid problems. To no avail :)
I went through the installation manual, obviously, this is one of my many OP installations, and after the first "install and create new db", it fails to connect to PostgreSQL on next reconfigurations.
Usually, psql is installed along with OP, and I get this:
psql $(openproject config:get DATABASE_URL)
psql: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 45432?
So I cannot even enter psql which has been installed along with OP to see databases name nor users. Which now should be only two: postgres and openproject (everything was set default).
Finally, considering the above request of port 45432, I manually changed the port in postgresql.conf
from 5432 to the above 45432.
No idea if it was needed nor OK, but neither of them work. I get the same output.
Also during OP install output I got this:
PG::ConnectionBad: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 45432?
Same with openproject run bundle exec rails runner:
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': could not connect to server: Connection refused (ActiveRecord::ConnectionNotEstablished)
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 45432?
And, obviously, during reconfigure the connection to PostgreSQL fails. Even if I did everything default, just default on clean Ubuntu.
After run check I get this:
[ko] MySQL connection is NOT working
[ok] Web server is running
[ok] openproject server is running
[ok] openproject background job worker is running
No idea why there is MySQL here (maybe just a typo of a dev).
But openproject.service also seems not working:
service openproject status
Unit openproject.service could not be found
Pretty much frustrating.
No need to add that if we drop OP to use something else, hundreds of hours spent on setting config would be wasted.
If anybody could just check if your packages are properly made or something. It already happened (to me), that the OP backup/restore manual was simply incorrect, and following it would never end OK.
Would be very grateful if someone checks step by step default noSSL install on default Ubuntu 20.04.
In my opinion, doing as above, just default, should always work.
Cheers,
Piotr
Hi Piotr,
could you append your
/etc/openproject/installer.dat
(removing any passwords) please? It looks like your Database URL is configured to an automatic PostgreSQL installation but your server already runs postgres, perhaps on a different port.Please check
pg_lsclusters
for the clusters you have installed locally. It will tell you its status and the port it is running under. Please also append this output here.As you cannot connect to your database through psql, your database server is definitely not running at this port or not allowing connections with that identification method. It is not directly connected to OpenProject probably.
I've added a PR to remove the reference to MySQL, it was simply forgotten.
Best
Oliver
Hello Oliver,
Thanks a lot!
installer.dat
server/ssl_cert /etc/ssl/certs/name123.com_bundle.crt
server/ssl_key etc/ssl/private/name123.com.key
server/ssl_ca /etc/ssl/certs/name123.com_bundle.crt
smtp/authentication login
smtp/host name123.com
smtp/port 587
smtp/username username@name123.com
smtp/password xxx
smtp/domain name123.com
smtp/admin_email username2@name123.com
#[empty space cut off]
openproject/edition default
postgres/autoinstall reuse
postgres/db_host 127.0.0.1
postgres/db_port 5432
postgres/db_username openproject
postgres/db_password xxx
postgres/db_name openproject
postgres/retry ignore
server/autoinstall install
server/variant apache2
server/hostname name123.com
server/server_path_prefix /op
server/ssl no
repositories/api-key wzZlkdMI1MTUblabla
repositories/svn-install skip
repositories/git-install skip
smtp/autoinstall skip
memcached/autoinstall install
pg_lsclusters
10 main 45432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
postgresql-10-main.log (the newest entries)
2021-04-18 16:34:29.906 CEST [19701] FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": No such file or directory
2021-04-18 16:34:29.906 CEST [19701] LOG: database system is shut down
pg_ctl: could not start server
Examine the log output.
Oliver Gunther wrote:
I am not familiar with this, but to put it simply: how is it possible if I do a clean default install? Have no idea.
And there is no other postgresql db on the computer, otherwise installer would complain when I choose "new".
Also, I can see some inconsistencies in the outputs:
pg_lsclusters outputs port 45432
while OP installer.dat has 5432.
Hi Piotr,
you have incorrectly configured PostgreSQL to use SSL connections:
2021-04-18 16:34:29.906 CEST [19701] FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": No such file or directory
That's why it cannot start and OpenProject cannot use it. If you'd like to start over and let OpenProject handle the database, please use these steps:
apt remove postgresql
openproject reconfigure
), selectinstall
for the PostgreSQL step as defined in https://docs.openproject.org/installation-and-operations/installation/packaged/#step-2-postgresql-database-configurationBest
Oliver
Hello Oliver,
Thanks a lot! Will be very grateful for any clues, as I do only standard things (I suppose).
What you recommended, I have been doing previously. So did now, as you said, once again, here is the output:
apt remove postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'postgresql' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
So, looks like no postgresql, hence
openproject reconfigure
using "install a new PostgreSQL server...", and here is the output:
Postgres connection OK
DONE
[apache2] ./bin/configure
And at the end I get this:
[legacy-installer] ./bin/preinstall
[openproject-edition] ./bin/preinstall
[postgres] ./bin/preinstall
INFO: autoinstall=install. A new PostgreSQL v10 server will be installed locally unless a conflicting installation is found.
ERROR: It seems like you already have PostgreSQL v10 installed. Please run 'openproject reconfigure' and choose to use the existing installation instead.
So I do:
openproject run check
[ko] MySQL connection is NOT working
[ok] Web server is running
[ok] openproject server is running
[ok] openproject background job worker is running
Then
pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
10 main 45432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
The logfile output exactly same as before, the last entry yesterday.
So I did
sudo apt-get --purge remove postgresql\*
(as yesterday) The operation is now longer than just remove postgresql (this is how ignorant:me can desribe it :). And I choose the option to remove directories, as this is completely empty db, I have backups from Ubuntu 18.04, so don't have to worry about them.
After that looks like it's clean, pg_lsclusters returns correct info (no files or folders).
So now I run
openproject reconfigure
Looks good, better than before, output:
Postgres connection OK
DONE
[apache2] ./bin/configure
[...]
INFO: autoinstall=install. A new PostgreSQL v10 server will be installed locally unless a conflicting installation is found.
INFO: Checking whether port 5432 is available... OK
INFO: Adding repository signing key from PostgreSQL... OK
INFO: Installing PostgreSQL v10...
Reading package lists... Done
Building dependency tree
Reading state information... Done
[...]
Now default db with OP works!
But:
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctlcluster 10 main start
Ver Cluster Port Status Owner Data directory Log file
10 main 45432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
update-alternatives: using /usr/share/postgresql/10/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.6) ...
waiting for server to shut down.... done
server stopped
pg_ctl: PID file "/var/lib/postgresql/10/main/postmaster.pid" does not exist
Is server running?
starting server anyway
waiting for server to start.... done
server started
I do not know that it means above (main 45432 down) as it works, but now I need to restore from backup, and maybe later will try to use SSL commercial cert.
Thank you, Oliver!
I hope there is something from the above which could be useful for you, guys. For example, how to definitely remove postgresql.
Cheers,
Piotr
Just a solution for those who could have a similar problem with pg_lsclusters returning DOWN.
Here is the situation:
pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
10 main 5432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
but everything works, www with OP is displayed.
Steps to do:
sudo chmod 700 -R /var/lib/postgresql/10/main
# make sure the correct version number is used here;sudo -i -u postgres
postgres@servername:~$ /usr/lib/postgresql/10/bin/pg_ctl restart -D /var/lib/postgresql/10/main
# make sure as above, that this is a correct path;\q
exit
pg_lsclusters
# should work now.Hi Piotr,
Thanks for the update. What was the missing information? Do we need to update the docs?
Best
Niels
Niels Lindenthal wrote:
Hello Niels,
No, thank you, I don't think so, in regard to this content.
The update in the manual would be probably needed though, referring to this:
https://community.openproject.org/topics/13441
and, if you would like to check the backup and restore problems:
https://community.openproject.org/topics/13454
Maybe based upon the latter, docs should be somehow updated.
Have a great day,
Piotr
Hi Piotr,
Thanks for the info. Would it be possible for you to prepare a PR for this improvement?
Best
Niels
Niels Lindenthal wrote:
Niels, got this :) Problem Report :) OK, but as what type: bug, idea, task...? Sorry for those silly questions.
Sorry, we have this OpenProject slang. We use PR for Pull Request on Github. So I am asking for a contribution to the docs so it is easier for other user. An example of such an PR could be somthing like this.
OK, looks crazy :) but I will try to do it.
W dniu 20.04.2021 o 10:17, notifications@openproject.org pisze:
Hello Niels, my first commit, sorry for any mistakes, spent 2 hours on learning how to do it :)
Error in guide: absolute path needed to restore pg_dump by Piotr-Fr · Pull Request #9177 · opf/openproject (github.com)