Project

General

Profile

Error "500 - Internal Server Error" after upgrading Redmine 2.4.2 to 3.4.3

Added by Gabe Logan over 6 years ago

Hi,

After upgrading Redmine 2.4.2 to 3.4.3, i have an error when i try to access to any page :

This is the errors logs :

2017-12-22 15:04:37: (mod_fastcgi.c.1159) the fastcgi-backend /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi failed to start: 
2017-12-22 15:04:37: (mod_fastcgi.c.1163) child exited with status 1 /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi 
2017-12-22 15:04:37: (mod_fastcgi.c.1166) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.\nIf this is PHP on Gentoo, add 'fastcgi' to the USE flags. 
2017-12-22 15:04:37: (mod_fastcgi.c.2676) ERROR: spawning fcgi failed. 
2017-12-22 15:04:39: (mod_fastcgi.c.1159) the fastcgi-backend /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi failed to start: 
2017-12-22 15:04:39: (mod_fastcgi.c.1163) child exited with status 1 /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi 
2017-12-22 15:04:39: (mod_fastcgi.c.1166) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.\nIf this is PHP on Gentoo, add 'fastcgi' to the USE flags. 
2017-12-22 15:04:39: (mod_fastcgi.c.2676) ERROR: spawning fcgi failed. 
2017-12-22 15:04:41: (mod_fastcgi.c.3574) child exited: 1 unix:/opt/redmine/tmp/sockets/redmine.socket-0 
2017-12-22 15:04:42: (mod_fastcgi.c.3574) child exited: 1 unix:/opt/redmine/tmp/sockets/redmine.socket-0 
2017-12-22 15:04:43: (mod_fastcgi.c.3574) child exited: 1 unix:/opt/redmine/tmp/sockets/redmine.socket-0 
2017-12-22 15:04:43: (mod_fastcgi.c.1159) the fastcgi-backend /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi failed to start: 
2017-12-22 15:04:43: (mod_fastcgi.c.1163) child exited with status 1 /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi 
2017-12-22 15:04:43: (mod_fastcgi.c.1166) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.\nIf this is PHP on Gentoo, add 'fastcgi' to the USE flags. 
2017-12-22 15:04:43: (mod_fastcgi.c.2676) ERROR: spawning fcgi failed. 
2017-12-22 15:04:45: (mod_fastcgi.c.3574) child exited: 1 unix:/opt/redmine/tmp/sockets/redmine.socket-0 
2017-12-22 15:04:46: (mod_fastcgi.c.3574) child exited: 1 unix:/opt/redmine/tmp/sockets/redmine.socket-0 
2017-12-22 15:04:47: (mod_fastcgi.c.3574) child exited: 1 unix:/opt/redmine/tmp/sockets/redmine.socket-0 
2017-12-22 15:04:47: (mod_fastcgi.c.1159) the fastcgi-backend /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi failed to start: 
2017-12-22 15:04:47: (mod_fastcgi.c.1163) child exited with status 1 /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi 
2017-12-22 15:04:47: (mod_fastcgi.c.1166) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.\nIf this is PHP on Gentoo, add 'fastcgi' to the USE flags. 
2017-12-22 15:04:47: (mod_fastcgi.c.2676) ERROR: spawning fcgi failed. 
2017-12-22 15:04:49: (mod_fastcgi.c.3574) child exited: 1 unix:/opt/redmine/tmp/sockets/redmine.socket-0 
2017-12-22 15:04:49: (mod_fastcgi.c.1159) the fastcgi-backend /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi failed to start: 
2017-12-22 15:04:49: (mod_fastcgi.c.1163) child exited with status 1 /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi 
2017-12-22 15:04:49: (mod_fastcgi.c.1166) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.\nIf this is PHP on Gentoo, add 'fastcgi' to the USE flags. 
2017-12-22 15:04:49: (mod_fastcgi.c.2676) ERROR: spawning fcgi failed.

You will find components versions :

- CentOS release 6.5 (Final)
- lighttpd/1.4.45
- Mysql 5.1.71
- Ruby 2.4.1p111
- Rails 4.2.8

I used the following link to update my redmine : http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

My configurations files :

Lighttpd vhost :

$HTTP["host"] =~ "xe-redmine-preprod\.mydomaine\.(eu|fr|net|com)$" {
        server.document-root = "/opt/redmine/public/" 
        server.use-ipv6 = "disable" 
        fastcgi.debug = 1
        #alias.url = ()
        server.indexfiles = ( "dispatch.fcgi" )
        server.error-handler-404 = "/dispatch.fcgi" 
        server.errorlog          = "/var/log/redmine/redmine-error.log" 
        accesslog.filename       = "/var/log/redmine/redmine-access.log" 
        server.follow-symlink    = "enable" 

        url.rewrite-once = (
                "^/(.*\..+(?!html))$" => "$0",
                "^/(.*)\.(.*)"        => "$0",
        )

        fastcgi.server = (
                ".fcgi" => ( "redmine" => (
                        "socket"                => "/opt/redmine/tmp/sockets/redmine.socket",
                        "bin-path"              => "/usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /opt/redmine/public/dispatch.fcgi",
                        "min-procs" => 1,
                        "max-procs" => 1,
                        "idle-timeout" => 120,
                        "check-local" => "disable",
                        "bin-environment" => ( "RAILS_ENV" => "production" ),
                ))
        )
}

$SERVER["socket"] == ":443" {
     ssl.engine                  = "enable" 
     ssl.use-sslv3               = "disable" 
     ssl.use-sslv2               = "disable" 
#     ssl.ca-file                 = "/etc/lighttpd/ssl/chain.ca.2015.crt" 
#     ssl.pemfile                 = "/etc/lighttpd/ssl/projects.systonic.fr.2015.pem" 
#     ssl.ca-file                 = "/etc/lighttpd/ssl/chain.ca.2016.crt" 
#     ssl.pemfile                 = "/etc/lighttpd/ssl/projects.systonic.fr.2016.pem" 

ssl.pemfile = "/etc/lighttpd/ssl/wildcard.mydomaine.fr.2017.pem" 
ssl.ca-file = "/etc/lighttpd/ssl/wildcard.mydomaine.fr.2017.chain.txt" 

#     ssl.ca-file                 = "/etc/lighttpd/ssl/chain.ca.2017.crt" 
#     ssl.pemfile                 = "/etc/lighttpd/ssl/projects.mydomaine.fr.2017.pem" 

 }

$SERVER["socket"] == ":80" {
  $HTTP["host"] =~ "(.*)" {

    url.redirect = ( "^/(.*)" => "https://%1/$1" )
  }

}

dispatch.fcgi file :

#!/usr/bin/env ruby

require 'rubygems'
require 'fcgi'

class Rack::PathInfoRewriter
  def initialize(app)
    @app = app
  end

  def call(env)
    env.delete('SCRIPT_NAME')
    parts = env['REQUEST_URI'].split('?')
    env['PATH_INFO'] = parts[0]
    env['QUERY_STRING'] = parts[1].to_s
    @app.call(env)
  end
end

Rack::Handler::FastCGI.run Rack::PathInfoRewriter.new(RedmineApp::Application)

Please ask me if you want others conf files.


Replies (5)

RE: Error "500 - Internal Server Error" after upgrading Redmine 2.4.2 to 3.4.3 - Added by Bernhard Rohloff over 6 years ago

What's Redmine's log telling you? You can find it in `REDMINE_ROOT/log/production.log`.
I'm sure you will find your answers in it, but my magic crystal bowl is telling me you have plugins installed, which are incompatible with your new Redmine version. To test this you can temporarily move your plugins to a save place outside of Redmine and restart your instance. If Redmine comes up, you have a plugin issue.

RE: Error "500 - Internal Server Error" after upgrading Redmine 2.4.2 to 3.4.3 - Added by Gabe Logan over 6 years ago

Hi!

Unfortunatelly my "plugins" folder is empty. Here is my production.log file :


Migrating to AddCustomFieldsFormatStore (20131124175346)
Migrating to AddCustomFieldsDescription (20131210180802)
Migrating to RemoveCustomFieldsMinMaxLengthDefaultValues (20131214094309)
Migrating to StoreRelationTypeInJournalDetails (20131215104612)
Migrating to DeleteOrphanTimeEntriesCustomValues (20131218183023)
Migrating to ChangeChangesetsCommentsLimit (20140228130325)
Migrating to AddPasswordChangedAtToUser (20140903143914)
Migrating to InsertBuiltinGroups (20140920094058)
Migrating to AddTrackersDefaultStatusId (20141029181752)
Migrating to RemoveIssueStatusesIsDefault (20141029181824)
Migrating to AddRolesUsersVisibility (20141109112308)
Migrating to AddWikiRedirectsRedirectsToWikiId (20141122124142)
Migrating to CreateEmailAddresses (20150113194759)
Migrating to PopulateEmailAddresses (20150113211532)
Migrating to RemoveUsersMail (20150113213922)
Migrating to AddEmailAddressesUserIdIndex (20150113213955)
Migrating to ReplaceMoveIssuesPermission (20150208105930)
Migrating to ChangeDocumentsTitleLimit (20150510083747)
Migrating to ClearEstimatedHoursOnParentIssues (20150525103953)
Migrating to AddRolesTimeEntriesVisibility (20150526183158)
Migrating to AddRolesAllRolesManaged (20150528084820)
Migrating to CreateRolesManagedRoles (20150528092912)
Migrating to AddUniqueIndexOnRolesManagedRoles (20150528093249)
Migrating to InsertAllowedStatusesForNewIssues (20150725112753)
Migrating to CreateImports (20150730122707)
Migrating to CreateImportItems (20150730122735)
Migrating to ChangeTimeEntriesCommentsLimitTo1024 (20150921204850)
Migrating to ChangeWikiContentsCommentsLimitTo1024 (20150921210243)
Migrating to ChangeAttachmentsFilesizeLimitTo8 (20151020182334)
Migrating to FixCommaInUserFormatSettingValue (20151020182731)
Migrating to ChangeIssueCategoriesNameLimitTo60 (20151021184614)
Migrating to ChangeAuthSourcesFilterToText (20151021185456)
Migrating to ChangeUserPreferencesHideMailDefaultToTrue (20151021190616)
Migrating to AddTokensUpdatedOn (20151024082034)
Migrating to CreateCustomFieldEnumerations (20151025072118)
Migrating to AddProjectsDefaultVersionId (20151031095005)
Migrating to ForcePasswordResetDuringSetup (20160404080304)
Migrating to RemovePositionDefaults (20160416072926)
Migrating to AddRolesSettings (20160529063352)
Migrating to AddTrackerIdIndexToWorkflows (20161001122012)
Migrating to AddIndexOnMemberRolesInheritedFrom (20161002133421)
Migrating to ChangeIssuesDescriptionLimit (20161010081301)
Migrating to ChangeJournalDetailsValueLimit (20161010081528)
Migrating to ChangeJournalsNotesLimit (20161010081600)
Migrating to AddIndexOnChangesetsIssuesIssueId (20161126094932)
Migrating to AddIndexOnIssuesParentId (20161220091118)
Migrating to AddIndexOnDiskFilenameToAttachments (20170207050700)
Migrating to ChangeAttachmentsDigestLimitTo64 (20170302015225)
Migrating to AddProjectDefaultAssignedToId (20170309214320)
Migrating to ChangeRepositoriesExtraInfoLimit (20170320051650)
Migrating to AddViewNewsToAllExistingRoles (20170418090031)
Migrating to AddViewMessagesToAllExistingRoles (20170419144536)

Thank you for your answer!

RE: Error "500 - Internal Server Error" after upgrading Redmine 2.4.2 to 3.4.3 - Added by Bernhard Rohloff about 6 years ago

Hm... it seems Redmine isn't starting at all. Can you check if Redmine is working with webrick?
`rails server webrick -e production`
If this works there has to be something wrong with your web server configuration. But this seems odd to me because of the update process.

RE: Error "500 - Internal Server Error" after upgrading Redmine 2.4.2 to 3.4.3 - Added by Gabe Logan about 6 years ago

Hi!

This is the result of your last command :

[root@myserver ~]# rails server webrick -e production
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]                                      # Path to the Ruby binary of your choice
                                                         # Default: /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby
  -m, [--template=TEMPLATE]                              # Path to some application template (can be a filesystem path or URL)
      [--skip-gemfile], [--no-skip-gemfile]              # Don't create a Gemfile
  -B, [--skip-bundle], [--no-skip-bundle]                # Don't run bundle install
  -G, [--skip-git], [--no-skip-git]                      # Skip .gitignore file
      [--skip-keeps], [--no-skip-keeps]                  # Skip source control .keep files
  -O, [--skip-active-record], [--no-skip-active-record]  # Skip Active Record files
  -S, [--skip-sprockets], [--no-skip-sprockets]          # Skip Sprockets files
      [--skip-spring], [--no-skip-spring]                # Don't install Spring application preloader
  -d, [--database=DATABASE]                              # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
                                                         # Default: sqlite3
  -j, [--javascript=JAVASCRIPT]                          # Preconfigure for selected JavaScript library
                                                         # Default: jquery
  -J, [--skip-javascript], [--no-skip-javascript]        # Skip JavaScript files
      [--dev], [--no-dev]                                # Setup the application with Gemfile pointing to your Rails checkout
      [--edge], [--no-edge]                              # Setup the application with Gemfile pointing to Rails repository
      [--skip-turbolinks], [--no-skip-turbolinks]        # Skip turbolinks gem
  -T, [--skip-test-unit], [--no-skip-test-unit]          # Skip Test::Unit files
      [--rc=RC]                                          # Path to file containing extra configuration options for rails command
      [--no-rc], [--no-no-rc]                            # Skip loading of extra configuration options from .railsrc file

Runtime options:
  -f, [--force]                    # Overwrite files that already exist
  -p, [--pretend], [--no-pretend]  # Run but do not make any changes
  -q, [--quiet], [--no-quiet]      # Suppress status output
  -s, [--skip], [--no-skip]        # Skip files that already exist

Rails options:
  -h, [--help], [--no-help]        # Show this help message and quit
  -v, [--version], [--no-version]  # Show Rails version number and quit

Description:
    The 'rails new' command creates a new Rails application with a default
    directory structure and configuration at the path you specify.

    You can specify extra command-line arguments to be used every time
    'rails new' runs in the .railsrc configuration file in your home directory.

    Note that the arguments specified in the .railsrc file don't affect the
    defaults values shown above in this help message.

Example:
    rails new ~/Code/Ruby/weblog

    This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
    See the README in the newly created application to get going.

RE: Error "500 - Internal Server Error" after upgrading Redmine 2.4.2 to 3.4.3 - Added by Gabe Logan about 6 years ago

Before that, i have launch again the redmine update process, but i have added the file "Gemfile.local" with "gem fcgi" inside.
I have no "500 - Internal Server Error" anymore, but there is no display at all, the page is just waiting...

I add errors.log after this operation in this topic.

Thanks anyway for your help!

    (1-5/5)