I am trying to run rhoconnect as a separate app on heroku (is this actually possible?), along with a rails backend application (not addon, that would not support my devise authentication for backend rails application). This is to enable sync from and to btw my rhodes android application and the rails backend.
I am able to start the rhoconnect locally with redis server started on localhost
I added a redistogo addon to the rhoconnect app on heroku. The problem I am having is when I deploy rhoconnect to heroku, the app fails to connect with the redis server (redistogo). I use the following settings to configure the rhoconnect in settings.yml:
#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:[email protected]:9393
:syncserver: http://localhost:9292/api/application/</code>
Once I deploy to heroku, I am unable to access the rhoconnect app from browser.
heroku logs --app myapp
I see the application crashing:
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
Has anyone tested similar setup, know how to change the redis instance URL in settings.yml? I have tried quite a few options.
I suppose to have just chosen the wrong option for hosting rhoconnect. The conclusion is the stack on heroku is not in line with what the rhoconnect app requires.
I moved my app to a micro instance on amazon EC2 and am running it there. The backend app is still on heroku, but was hoping to test the functionality out for free initially.
Installed rvm, ruby, rhoconnect, and redis on the micro instance, pulled the git repo and deployed. It would be great to have all apps under one cloud though.