decidim-install icon indicating copy to clipboard operation
decidim-install copied to clipboard

Installation failing

Open zedthehead opened this issue 4 years ago • 11 comments

Hi,

Just out of curiosity, are the installation instructions here still valid?

We've followed the steps multiple times, word for word, and on three different clean server installations, but cannot connect at the end of the installation process. The installation seems to go OK (no error messages) but when we point a browser to the server we either get a 404 or the Welcome to nginx! page.

Is there further configuration that needs to be done during installation?

We're trying to do a single server installation on Ubuntu 18.04.

Thanks

zedthehead avatar Mar 04 '20 21:03 zedthehead

Yes they should work. You might have some error with passenger configuration. Can you look for error messages from nginx logs?

microstudi avatar Mar 05 '20 08:03 microstudi

Thanks for getting back.

The nginx log has a few entries like this: 2020/03/04 22:47:02 [error] 30858#30858: *13 "/home/decidim/decidim-app/public/index.html" is not found (2: No such file or directory), client: 82.99.99.99, server: ourdomain.c$

Not really familiar with passenger and nginx so would appreciate some pointers. Thanks.

On Thu, Mar 5, 2020 at 8:20 AM Ivan Vergés [email protected] wrote:

Yes they should work. You might have some error with passenger configuration. Can you look for error messages from nginx logs?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Platoniq/decidim-install/issues/45?email_source=notifications&email_token=AJ7P2AKYSMWQZG4KMJ5NG3DRF5ODLA5CNFSM4LBZPKPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN4F3QQ#issuecomment-595090882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ7P2AIU33V7MKF7D5OGKITRF5ODLANCNFSM4LBZPKPA .

zedthehead avatar Mar 05 '20 09:03 zedthehead

Looks like you don't have properly configured passenger/nginx. Can you post show your configuration files?

microstudi avatar Mar 05 '20 10:03 microstudi

These are our conf files. mod-http-passenger.conf was modified according to the installation guide but no changes were made to nginx.conf or passenger-config.

mod-http-passenger.conf :

### Begin automatically installed Phusion Passenger config snippet ###
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /home/decidim/.rbenv/shims/ruby;
### End automatically installed Phusion Passenger config snippet ###

nginx.conf :

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##
		
  access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}

#mail {
#       # See sample authentication script at:
#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#       # auth_http localhost/auth.php;
#       # pop3_capabilities "TOP" "USER";
#       # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#       server {
#               listen     localhost:110;
#               protocol   pop3;
#               proxy      on;
#       }
#
#       server {
#               listen     localhost:143;
#               protocol   imap;
#               proxy      on;
#       }
#}

passenger-config

#!/usr/bin/passenger_free_ruby
#  Phusion Passenger - https://www.phusionpassenger.com/
#  Copyright (c) 2010-2017 Phusion Holding B.V.
#
#  "Passenger", "Phusion Passenger" and "Union Station" are registered
#  trademarks of Phusion Holding B.V.
#
#  Permission is hereby granted, free of charge, to any person obtaining a copy
#  of this software and associated documentation files (the "Software"), to deal
#  in the Software without restriction, including without limitation the rights
#  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#  copies of the Software, and to permit persons to whom the Software is
#  furnished to do so, subject to the following conditions:
#
#  The above copyright notice and this permission notice shall be included in
#  all copies or substantial portions of the Software.
#
#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#  THE SOFTWARE.


ENV["PASSENGER_LOCATION_CONFIGURATION_FILE"] = "/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini"
begin
  require 'rubygems'
rescue LoadError
end
require '/usr/lib/ruby/vendor_ruby/phusion_passenger'


PhusionPassenger.locate_directories
PhusionPassenger.require_passenger_lib 'config/main'
PhusionPassenger::Config.run!(ARGV)

zedthehead avatar Mar 05 '20 12:03 zedthehead

the ones in /etc/nginx/conf.d and /etc/nginx/sites-enabled are important

microstudi avatar Mar 05 '20 13:03 microstudi

Hi, Both those files are empty.

On Thu, Mar 5, 2020 at 1:42 PM Ivan Vergés [email protected] wrote:

the ones in /etc/nginx/conf.d and /etc/nginx/sites-enabled are important

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Platoniq/decidim-install/issues/45?email_source=notifications&email_token=AJ7P2APLSWSBFW67Z32UQQDRF6T27A5CNFSM4LBZPKPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN5JHKQ#issuecomment-595235754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ7P2AMUY54NKMRNJ3F5CBTRF6T27ANCNFSM4LBZPKPA .

zedthehead avatar Mar 05 '20 14:03 zedthehead

Then you've missed some step. These files should exist: /etc/nginx/conf.d/mod-http-passenger.conf /etc/nginx/sites-enabled/decidim.conf

microstudi avatar Mar 05 '20 17:03 microstudi

Sorry, my bad.

/etc/nginx/conf.d/mod-http-passenger.conf is the one I posted above:

### Begin automatically installed Phusion Passenger config snippet ###
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /home/decidim/.rbenv/shims/ruby;
### End automatically installed Phusion Passenger config snippet ###

and the file /etc/nginx/sites-enabled/decidim.conf contains:

server {
    listen 80;
    listen [::]:80 ipv6only=on;

    server_name ourdomain.com;
    client_max_body_size 32M;

    passenger_enabled on;
    passenger_ruby /home/decidim/.rbenv/shims/ruby;

    rails_env    production;
    root         /home/decidim/decidim-app/public;
}

Both were part of the installation guide

zedthehead avatar Mar 05 '20 18:03 zedthehead

Turns out the paths were wrong because we were using the default ubuntu user instead of the user decidim described in the installation guide.

Spot the linux newbie :|

Thanks for taking the time to take a look

zedthehead avatar Mar 05 '20 21:03 zedthehead

You're wellcome. Glad you solve it!

microstudi avatar Mar 06 '20 09:03 microstudi

Hello I've exactly the same problem, what do you mean zedthehead by "we were using the default ubuntu user instead of the user decidim described in the installation guide" ? What have you done exactly to manage this point ? Thanx.

legarg avatar Nov 14 '20 17:11 legarg