Thursday, January 3, 2008

FCGI is still not working at SERVAGE HOSTING

Jan 02 - 16:01 GMT
Customer

Hi Servage.
Meanwhile since a day we are waiting for a clear solution ho you will get your fcgi up and running. It is still not working. WE would like to change from cgi to fcgi as sid in you wiki, but we can't as you still haven't solved the fcgi problem since this morning.

i.e. http://www.t3log.info is running in cgi as fcgi will simply output textfiles instead of processing them You better check this.

Jan 02 - 17:31 GMT
Servage - Steven

Hello Andreas,

Thanks for submitting the ticket.

Can you please let us know the link for fcgi for the domain t3log.info? So, that we can check this for you. All I have checked that fcgi is enabled on the server you are on.

Hope this helps!

Kind regards,
Steven, Support
Servage Hosting
Jan 03 - 01:56 GMT
Customer



I have already written 2 times the link but after submitting we didn't got any answers back for days!!!.
Check your FAQ as it is written down there!
I guess you should know where your fcgi is placed and actually it should be enabled on ALL clusters you are offering as you advertise full fcgi support not only for several clusters.

It seems like your support again has no idea about what they are doing. That is so sad for Servage to have such a poor support.

Simply go to t3log.info

then you see that the domain points to 1_redmine
now check this folder 1_redmine
here you will find the rakefile like in all ruby installations and lots of subfolders like in all ruby installations. Here you ALWAYS need to check the PUBLIC folder (it is again the same in all ruby installations) and inside this public folder you will find the .htaccess and the dispatch.cgi and dispatch.fcgi and dispatch.rb files.

Usually you don't need to change these files and they are also the same in all ruby installations.

the code is like this (simply compare it with your FAQ):
===================================
.htaccess
-----------------------------------
# General Apache options
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

# If you don't want Rails to look in certain directories,
# use the following rewrite rules so that Apache won't rewrite certain requests
#
# Example:
# RewriteCond %{REQUEST_URI} ^/notrails.*
# RewriteRule .* - [L]

# Redirect all requests not available on the filesystem to Rails
# By default the cgi dispatcher is used which is very slow
#
# For better performance replace the dispatcher with the fastcgi one
#
# Example:
# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On

# If your Rails application is accessed via an Alias directive,
# then you MUST also set the RewriteBase in this htaccess file.
#
# Example:
# Alias /myrailsapp /path/to/myrailsapp/public
# RewriteBase /myrailsapp

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
#RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

# In case Rails experiences terminal errors
# Instead of displaying this message you can supply a file here which will be rendered instead
#
# Example:
# ErrorDocument 500 /500.html

ErrorDocument 500 "

Application error

Rails application failed to start properly"
=====================================
As you can see we had to DISABLE fcgi to get redmine working
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
#RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

if you change the # to the cgi rewrite the dispatch.fcgi won't get parsed at all and it will appear as textfile in your browser!
#RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

perhaps your fcgi isn't installed perfectly.

=====================================
dispatch.cgi
-------------------------------------
#!/usr/bin/ruby

require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)

# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
require "dispatcher"

ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
Dispatcher.dispatch
==================================

==================================
dispatch.fcgi
----------------------------------
#!/usr/bin/ruby

#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# and the GC period is nil (turned off). A reasonable number of requests
# could range from 10-100 depending on the memory footprint of your app.
#
# Example:
# # Default log path, normal GC behavior.
# RailsFCGIHandler.process!
#
# # Default log path, 50 requests between GC.
# RailsFCGIHandler.process! nil, 50
#
# # Custom log path, normal GC behavior.
# RailsFCGIHandler.process! '/var/log/redmine_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'

RailsFCGIHandler.process!
===================================

All those files have been posted already quite often ;-)

I hope to get a resonse very soon, as we need this trouble ticket solved before we can open another one. Thanks Andi!

Jan 03 - 02:01 GMT
Customer

you will find these files here:
Current path: /1_redmine/public
Jan 03 - 02:19 GMT
Customer

biblio.t3pack.info - also a basic RoR Application for testing isn't working with fcgi either. It also works at the moment only with cgi:
Here its files
Current path: /www/RoR_biblio/public

=====================================
.htaccess
-------------------------------------
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

ErrorDocument 500 "

Application error

Rails application failed to start properly"
======================================
It is actually the same like on t3log.info ;-) but here I enabled fcgi instead of cgi so you can see what happens if you enable fcgi. OUR t3log.info site is in PRODUCTION so I can't demonstrate it here!!!

======================================
dispatch.fcgi
--------------------------------------
#!/usr/bin/ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# and the GC period is nil (turned off). A reasonable number of requests
# could range from 10-100 depending on the memory footprint of your app.
#
# Example:
# # Default log path, normal GC behavior.
# RailsFCGIHandler.process!
#
# # Default log path, 50 requests between GC.
# RailsFCGIHandler.process! nil, 50
#
# # Custom log path, normal GC behavior.
# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'

RailsFCGIHandler.process!
-------------------------------------

You can also check: biblio.t3pack.info to read the fcgi as it gets displayed on the screen instead getting parsed ;-)

Jan 03 - 07:52 GMT
Customer

HI we are waiting since hours for a soultion of the FCGI Problem and an answer from you!!!

Jan 03 - 11:49 GMT
Customer

Waiting since over 12 Hours for a response so we need to close this ticket as unsatisfied in all cases. > will be published again like usual


No comments: