Я пытаюсь запустить rhoconnect в качестве отдельного приложения на heroku (возможно ли это на самом деле?) Вместе с бэкэнд-приложением rails (не addon, которое не поддержало бы мою разработку аутентификации для приложения бэкэнд-rails). Это нужно для того, чтобы включить синхронизацию с моим android-приложением Rhodes и бэкэндом Rails и обратно.
Я могу запустить rhoconnect локально с сервером redis, запущенным на localhost
Я добавил редистого аддона в приложение rhoconnect на heroku.
Проблема, с которой я сталкиваюсь, заключается в том, что при развертывании rhoconnect на heroku приложение не может подключиться к серверу redis (redistogo). Я использую следующие настройки для настройки rhoconnect в settings.yml:
</p>
<pre><code>#Sources
:sources:
Interest:
:poll_interval: 300
:development:
:licensefile: settings/license.key
:redis: 127.0.0.1:6379
:syncserver: http://localhost:9292/api/application/
:test:
:licensefile: settings/license.key
:redis: 127.0.0.1:6379
:syncserver: localhost:9292/api/application/
:production:
:licensefile: settings/license.key
:redis: redis://redistogo:XXXredistogopwdXXX@pike.redistogo.com:9393
:syncserver: http://localhost:9292/api/application/
После развертывания на heroku я не могу получить доступ к приложению rhoconnect из браузера.
<code>heroku logs --app myapp
Вижу сбой приложения:
</p>
<pre>2012-03-21T23:01:25+00:00 heroku[web.1]: Starting process with command `thin -p
26946 -e production -R /home/heroku_rack/heroku.ru start`
2012-03-21T23:01:27+00:00 app[web.1]: [04:01:27 PM 2012-03-21] Rhoconnect Server
v3.1.1 started...
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
esque-1.19.0/lib/resque/server.rb:12:in `<class:Server>'
2012-03-21T23:01:27+00:00 app[web.1]: :public is no longer used to avoid overloa
ding Module#public, use :public_folder instead
2012-03-21T23:01:27+00:00 app[web.1]: /app/.bundle/gems/ruby/1.9.1/gems/redis-2.
2.2/lib/redis/connection/ruby.rb:26:in `initialize': getaddrinfo: Name or servic
e not known (SocketError)
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/connection/ruby.rb:26:in `new'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/connection/ruby.rb:26:in `block in connect'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/timeo
ut.rb:57:in `timeout'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/connection/ruby.rb:128:in `with_timeout'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/connection/ruby.rb:25:in `connect'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/client.rb:227:in `establish_connection'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/client.rb:23:in `connect'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/client.rb:247:in `ensure_connected'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/client.rb:137:in `block in process'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/client.rb:136:in `process'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/client.rb:206:in `logging'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis/client.rb:46:in `call'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis.rb:157:in `block in get'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/monit
or.rb:201:in `mon_synchronize'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
edis-2.2.2/lib/redis.rb:156:in `get'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
hoconnect-3.1.1/lib/rhoconnect/model.rb:51:in `is_exist?'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
hoconnect-3.1.1/lib/rhoconnect.rb:94:in `start_app'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
hoconnect-3.1.1/lib/rhoconnect.rb:85:in `bootstrap'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
hoconnect-3.1.1/lib/rhoconnect.rb:308:in `initializer'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/application.rb:24:in `initiali
zer'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/application.rb:41:in `<top (re
quired)>'
2012-03-21T23:01:27+00:00 app[web.1]: from config.ru:37:in `require'
2012-03-21T23:01:27+00:00 app[web.1]: from config.ru:37:in `block (3 levels) i
n <main>'
2012-03-21T23:01:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `
eval'
2012-03-21T23:01:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `
block (3 levels) in <main>'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
ack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
ack-1.3.6/lib/rack/builder.rb:51:in `initialize'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
ack-1.3.6/lib/rack/builder.rb:120:in `new'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
ack-1.3.6/lib/rack/builder.rb:120:in `map'
2012-03-21T23:01:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:18:in `
block (2 levels) in <main>'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
ack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
ack-1.3.6/lib/rack/builder.rb:51:in `initialize'
2012-03-21T23:01:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `
new'
2012-03-21T23:01:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `
block in <main>'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
ack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
2012-03-21T23:01:27+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/r
ack-1.3.6/lib/rack/builder.rb:51:in `initialize'
2012-03-21T23:01:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `n
ew'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/
gems/thin-1.2.6/lib/rack/adapter/loader.rb:36:in `eval'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/
gems/thin-1.2.6/lib/rack/adapter/loader.rb:36:in `load'
2012-03-21T23:01:27+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `<
main>'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/
gems/thin-1.2.6/lib/thin/controllers/controller.rb:175:in `load_rackup_config'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/
gems/thin-1.2.6/lib/thin/controllers/controller.rb:65:in `start'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/
gems/thin-1.2.6/lib/thin/runner.rb:177:in `run_command'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/
gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `<mai
n>'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `load
'
2012-03-21T23:01:27+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/
gems/thin-1.2.6/bin/thin:6:in `<top (required)>'
2012-03-21T23:01:28+00:00 heroku[web.1]: Process exited with status 1
2012-03-21T23:01:28+00:00 heroku[web.1]: State changed from starting to crashed
Кто-нибудь проверял подобную настройку, знаете, как изменить URL-адрес экземпляра redis в settings.yml? Я перепробовал довольно много вариантов.