Project

General

Profile

Puma not starting redmine app

Added by Chris West almost 11 years ago

Hi,

I installed redmine 2.4 with nginx and puma.
But the app does not start.
I don't really know where to search.

Here's my puma.rb:

#!/usr/bin/env puma

  1. Start Puma with next command:
  2. RAILS_ENV=production bundle exec puma -C ./config/puma.rb
  1. uncomment and customize to run in non-root path
  2. ENV['RAILS_RELATIVE_URL_ROOT'] = "/redmine"

application_path = '/home/web/sites/site2/web27/redmine'

  1. The directory to operate out of. #
  2. The default is the current directory. #
    directory application_path
  1. Set the environment in which the rack's app will run. #
  2. The default is “development”. #
    environment 'production'
  1. Daemonize the server into the background. Highly suggest that
  2. this be combined with “pidfile” and “stdout_redirect”. #
  3. The default is “false”. #
    daemonize true
  1. Store the pid of the server in the file at “path”. #
    pidfile "#{application_path}/tmp/pids/puma.pid"
  1. Use “path” as the file to store the server info state. This is
  2. used by “pumactl” to query and control the server. #
    state_path "#{application_path}/tmp/pids/puma.state"
  1. Redirect STDOUT and STDERR to files specified. The 3rd parameter
  2. (“append”) specifies whether the output is appended, the default is
  3. “false”. #
    stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
  4. stdout_redirect '/u/apps/lolcat/log/stdout', '/u/apps/lolcat/log/stderr', true
  1. Disable request logging. #
  2. The default is “false”. #
  3. quiet
  1. Configure “min” to be the minimum number of threads to use to answer
  2. requests and “max” the maximum. #
  3. The default is “0, 16”. #
  4. threads 2, 16
  1. Bind the server to “url”. “tcp://”, “unix://” and “ssl://” are the only
  2. accepted protocols. #
  3. The default is “tcp://0.0.0.0:9292”. #
  4. bind 'tcp://0.0.0.0:9292'
    bind 'tcp://127.0.0.1:8091'
    #bind "unix://#{application_path}/tmp/sockets/redmine.socket"
  1. Instead of “bind 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert'” you
  2. can also use the “ssl_bind” option. #
  3. ssl_bind '127.0.0.1', '9292', { key: path_to_key, cert: path_to_cert }
  1. Code to run before doing a restart. This code should
  2. close log files, database connections, etc. #
  3. This can be called multiple times to add code each time. #
  4. on_restart do
  5. puts 'On restart...'
  6. end
  1. Command to use to restart puma. This should be just how to
  2. load puma itself (ie. 'ruby -Ilib bin/puma'), not the arguments
  3. to puma, as those are the same as the original process. #
  4. restart_command '/u/app/lolcat/bin/restart_puma'
  1. === Cluster mode ===
  1. How many worker processes to run. #
  2. The default is “0”. #
  3. workers 2
  1. Code to run when a worker boots to setup the process before booting
  2. the app. #
  3. This can be called multiple times to add hooks. #
  4. on_worker_boot do
  5. puts 'On worker boot...'
  6. end
  1. === Puma control rack application ===
  1. Start the puma control rack application on “url”. This application can
  2. be communicated with to control the main server. Additionally, you can
  3. provide an authentication token, so all requests to the control server
  4. will need to include that token as a query parameter. This allows for
  5. simple authentication. #
  6. Check out https://github.com/puma/puma/blob/master/lib/puma/app/status.rb
  7. to see what the app has available. #
  8. activate_control_app 'unix:///var/run/pumactl.sock'
  9. activate_control_app 'unix:///var/run/pumactl.sock', { auth_token: '12345' }
  10. activate_control_app 'unix:///var/run/pumactl.sock', { no_token: true }

I tried to search for logs, but they aren't written to filesystem.
I can see it start in the process manager running for 2 - 3 seconds but then it dies.
Please help