0

내가 uberspacifyuberspace.de을 테스트하고하는 capistrano 조리법에 수집. 으로 시작하기 전에 uberspacifydocumentation provided by uberspace에 설명 된대로 서버를 구성했습니다. 내 RubyOnRails 앱이 이제 막 시작되었습니다. 지금은 uberspacify 를 통해 배포 것으로, 다음과 같은 오류가 /var/www/virtual/john/logs/error_log로 작성 : 이 레일/Uberspacify : 503 서비스를 일시적으로 사용할 수 없습니다

[오류] (111) 연결이 거부

: 프록시 : 는 HTTP : (*) 127.0.0.1:44477에 연결 시도가 실패

배포 할 때마다 포트 44477이 다릅니다.
웹 사이트 자체가 상태 :

# config/deploy.rb 

# include uberspacify base recipes 
require "uberspacify/base" 

# comment this if you don"t use MySQL 
require "uberspacify/mysql" 

# the Uberspace server you are on 
server "phoenix.uberspace.de", :web, :app, :db, :primary => true 

# your Uberspace username 
set :user, "john" 

# a name for your app, [a-z0-9] should be safe, will be used for your gemset, 
# databases, directories, etc. 
set :application, "foobar" 

# the repo where your code is hosted 
set :scm, :git 
set :repository, "[email protected]:obama/#{application}.git" 
set :branch, "master" 

# optional stuff from here 

# By default, your app will be available in the root of your Uberspace. If you 
# have your own domain set up, you can configure it here 
# set :domain, "www.dummyapp.com" 

# By default, uberspacify will generate a random port number for Passenger to 
# listen on. This is fine, since only Apache will use it. Your app will always 
# be available on port 80 and 443 from the outside. However, if you"d like to 
# set this yourself, go ahead. 
# set :passenger_port, 55555 

# By default, Ruby Enterprise Edition 1.8.7 is used for Uberspace. If you 
# prefer Ruby 1.9 or any other version, please refer to the RVM documentation 
# at https://rvm.io/integration/capistrano/ and set this variable. 
set :rvm_ruby_string, "[email protected]#{application}" 

나는 다음과 같은 명령을 실행 : 여기

# Capfile 
load 'deploy' 
# Uncomment if you are using Rails' asset pipeline 
load 'deploy/assets' 
load 'config/deploy' # remove this line to skip loading any of the default tasks 

deploy.rb의 구성입니다 :

여기
503 Service Temporarily Unavailable 
The server is temporarily unable to service your request due to 
maintenance downtime or capacity problems. Please try again later. 
Apache/2.2.15 (CentOS) Server at foobar.phoenix.uberspace.de Port 443 

내가 준비한 Capfile입니다 :

$ bundle exec cap deploy:setup 
$ bundle exec cap deploy:migrations 

uberspacify이 모든 구성을 담당하는지 궁금합니다. uberspace tutorial for RubyOnRailsfcgi 및 다시 쓰기 규칙이 적용된 .htaccess과 함께 작동합니다. 또한 그들은 이 아니며을 사용합니다. rvm입니다. 나는 성공적으로 $ gem install gdal를 설치하기 전에 $ toast arm gdal :을 통해 관심의

source 'https://rubygems.org' 

ruby '1.9.3' 
gem 'rails', '~> 3.2.13' 
gem 'counter_culture', git: 'https://github.com/dorilla/counter_culture' 
gem 'jquery-rails', '~> 3.0.2' 
gem 'therubyracer', '~> 0.11.4', require: 'v8' 
gem 'attribute_normalizer', '~> 1.1.0' 
gem 'pry', '~> 0.9.12.2' 

# Parsing ShapeFiles 
gem 'rgeo', '~> 0.3.20' 
gem 'rgeo-shapefile', '~> 0.2.3' 
gem 'georuby', '~> 2.0.0' 
gem 'dbf', '~> 2.0.6' 
gem 'gdal', '~> 0.0.5' 

gem 'capistrano', '~> 2.15.5' 
gem 'uberspacify', '~> 0.9.3' 
gem 'mysql2', '~> 0.3.13' 

group :assets do 
    gem 'sass-rails', '~> 3.2.5' 
    gem 'coffee-rails', '~> 3.2.2' 
    gem 'uglifier', '~> 2.1.1' 
end 

group :development do 
    gem 'debugger', '~> 1.6.0' 
end 

group :development, :test do 
    gem 'sqlite3', '~> 1.3.7' 
    gem 'rspec-rails', '~> 2.14.0' 
    gem 'rspec-smart-formatter', '~> 0.0.4', require: false 
    gem 'factory_girl_rails', '4.2.1' 
    gem 'factory_girl_extensions', '2.1.0' 
end 

group :production do 
    gem 'mysql2', '~> 0.3.13' 
end 

가있을 수 있습니다 나는 토스트 패키지 관리자를 통해 GDAL 라이브러리를 설치하는 데 필요한 것을 : 여기

응용 프로그램의 Gemfile입니다 . 이 보석은 ShapeFile을 파싱하는 데 필요합니다.

나는 deploy:setupdeploy:migrations이 성공적으로 processsed 후 더 ~/.passenger 디렉토리가없는 것으로 나타났습니다.

+1

문제는 uberspacify 및 rails를 포함하도록 변경하고자 할 수 있습니다. 문제는 uberspace가 아닌 두 개의 문제 일 뿐이므로 문제가됩니다. – jan

답변

1

@patheticpat의 큰 도움으로 해결 된 문제!

다음은 서버의 문제를 분석하는 데 도움이되는 단계입니다.

  • 웹 서버가 전혀 실행되고 있지 않은지 확인하려면 $ curl http://localhost:{PORT}을 실행하십시오. 해당 포트는 ~/html/.htaccess 또는 ~/service/rails-{yourapp}/run에 있습니다.
  • 수동으로 서버를 시작하려면 $ ~/service/rails-{yourapp}/run을 실행하고 오류가 있는지 조심하십시오.
  • 현재 배포는 /var/www/virtual/$USER/rails/{yourapp}/current에서 찾을 수 있습니다.
  • 은 여객 수동으로 우리가 PATH 문제가 있음을 발견 $ svc -u ~/service/rails-{yourapp}
  • 시행 착오의 과정에서 여객 서비스 실행 $ svc -d ~/service/rails-{yourapp}

를 중지하려면 서비스 실행으로 여객를 시작하려면 $ bundle exec passenger start -p $PORT -e production

  • 을 실행 시작하려면 우리는 ~/service/rails-{yourapp}/run 소스가 $HOME/.bash_profile 인 것을 알았습니다. here입니다. 언급을 위해 zshoh-my-zsh사용자 정의 도트 파일과 함께 사용합니다. 우리는 이미 rvm~/.zshrc으로 구성했습니다. 이미 contains a source command이 파일 : 우리는이 사실은 이미 documented here 같이 ~/.bash_profile에 같은 문을 넣어 RVM 방해하는 것을 발견

    [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 
    

    .

    은 요약하면 : 당신은 웹 서버를 사용자 정의 dotfiles에서 uberspacify 것이다 완벽하게 설치를 RVM 구성을 제거하고 시작합니다.


    @uberspacify : 나는 경고가 here을 언급하고 적절한 반응에 대한 당신이 밖으로보기 위해 RVM 스크립트를 다시 작성하는 것이 좋습니다.

  • +0

    Uberspacify는 공개 된 소스입니다. 변경해야한다고 생각되면 자유롭게 포크를 요청하고 끌어 오기 요청을 제출하십시오. – jan

    1

    저는 Uberspacify의 저자입니다. Rails 응용 프로그램이있는 Passenger가 시작되지 않은 것 같습니다 (아직). 이것이 Apache가 포트 44477에서 "Connection refused"를보고하는 이유입니다.이 포트는 Passenger와 Apache 간의 내부 통신을 위해 임의로 선택되는 포트입니다.

    이 문제를 디버깅하려면 /var/www/virtual/< your username>/rails/<your app>/shared/log의 로그 파일을 확인하십시오.

    또한 Uberspace의 지침에 따라 변경 한 사항을 "실행 취소"하십시오. 이 지침은 FCGI 전용 배포를위한 것이며 Uberspacify를 사용하여 수행 할 수 없으며 호환되지 않을 가능성이 큽니다.Uberspacify를 사용하기위한 유일한 전제 조건은 일반 Rails 앱과 Uberspace 계정입니다.

    +0

    * uberspacify *를 통해 배포 한 후 내 프로젝트에 연결할 수있는 실제 주소 **는 무엇입니까? [uberspace * 문서와 유사한 규칙을 다시 작성] (https://uberspace.de/dokuwiki/cool%3arails)이 포함되어 있습니까? – JJD

    +0

    @patheticpat에 따르면 프로젝트는'http : // {user}. {host} .uberspace.de /'에 접근 할 수 있습니다.이 예제는 나의 예제에서'http : // john.phoenix.uberspace.de /'입니다. – JJD

    +0

    * Uberspace * 지침과 관련하여 수행 한 모든 구성 단계를 되돌 렸습니다. 또한 * uberspacify *를 통해 이전 배포를 되돌려 깨끗하게 복원했습니다. 그럼에도 불구하고 같은 오류가 발생합니다. '.../shared/log'에있는'production.log'는 자산 컴파일과 마이그레이션에 관한 정보를 담고 있습니다. 아무것도 더. – JJD

    관련 문제