amooma / GS5

Gemeinschaft 5. A FreeSWITCH and Ruby on Rails based PBX.
http://amooma.de/gemeinschaft/gs5
MIT License
42 stars 34 forks source link

Opening GS5 via http://localhost does not work #235

Open jpawlowski opened 11 years ago

jpawlowski commented 11 years ago

This is already existing for a while now and becomes actually relevant now that we have Pound as reverse proxy. This might also be the reason why voicemail notifications are not working (requests to the voicemail trigger also lead into an error 500), also see #236

Screen displays:

ActionView::MissingTemplate at /login

Missing template sessions/new, application/new with {:locale=>[:en], :formats=>[:htm, "image/*", :js, :rss, :atom, :xml, :yaml, :url_encoded_form, :json,
:pdf, :zip, :text, :css, :ics, :csv], :handlers=>[:erb, :builder, :coffee, :haml]}. Searched in: * "/opt/GS5/app/views" * "/var/lib/gs5/.rvm/gems/
ruby-1.9.3-p392/gems/sextant-0.2.3/app/views"

Log when using w3m http://localhost

  GsParameter Load (1.9ms)  SELECT `gs_parameters`.* FROM `gs_parameters` WHERE `gs_parameters`.`name` = 'SECRET_TOKEN' LIMIT 1
  GsParameter Load (0.1ms)  SELECT `gs_parameters`.* FROM `gs_parameters` WHERE `gs_parameters`.`name` = 'CALLTHROUGH_HAS_WHITELISTS' LIMIT 1
  GsParameter Load (0.1ms)  SELECT `gs_parameters`.* FROM `gs_parameters` WHERE `gs_parameters`.`name` = 'CALLTHROUGH_HAS_WHITELISTS' LIMIT 1
  GsParameter Load (0.1ms)  SELECT `gs_parameters`.* FROM `gs_parameters` WHERE `gs_parameters`.`name` = 'CALLTHROUGH_HAS_WHITELISTS' LIMIT 1

Started GET "/" for 127.0.0.1 at 2013-03-11 14:36:01 +0100
Processing by PageController#index as HTM
   (0.1ms)  SELECT COUNT(*) FROM `gemeinschaft_setups` 
  GsParameter Load (0.1ms)  SELECT `gs_parameters`.* FROM `gs_parameters` WHERE `gs_parameters`.`name` = 'SingleSignOnEnvUserNameKey' LIMIT 1
* Accept-Language: en;q=1.0
  Language Load (0.1ms)  SELECT `languages`.* FROM `languages` 
* Locale set to 'en'
  CACHE (0.0ms)  SELECT `gs_parameters`.* FROM `gs_parameters` WHERE `gs_parameters`.`name` = 'SingleSignOnEnvUserNameKey' LIMIT 1
Redirected to http://localhost/login
Completed 302 Found in 80ms (ActiveRecord: 4.5ms)

Started GET "/login" for 127.0.0.1 at 2013-03-11 14:36:03 +0100
Processing by SessionsController#new as HTM
   (0.1ms)  SELECT COUNT(*) FROM `gemeinschaft_setups` 
  GsParameter Load (0.1ms)  SELECT `gs_parameters`.* FROM `gs_parameters` WHERE `gs_parameters`.`name` = 'SingleSignOnEnvUserNameKey' LIMIT 1
* Accept-Language: en;q=1.0
  Language Load (0.1ms)  SELECT `languages`.* FROM `languages` 
* Locale set to 'en'
  GsParameter Load (0.1ms)  SELECT `gs_parameters`.* FROM `gs_parameters` WHERE `gs_parameters`.`name` = 'GUI_REDIRECT_HTTPS' LIMIT 1
Completed 500 Internal Server Error in 124ms

ActionView::MissingTemplate - Missing template sessions/new, application/new with {:locale=>[:en], :formats=>[:htm, "image/*", :js, :rss, :atom, :xml, :yaml, :url_encoded_form, :json, :pdf, :zip, :text, :css, :ics, :csv], :handlers=>[:erb, :builder, :coffee, :haml]}. Searched in:
  * "/opt/GS5/app/views"
  * "/var/lib/gs5/.rvm/gems/ruby-1.9.3-p392/gems/sextant-0.2.3/app/views"
:
  (gem) actionpack-3.2.12/lib/action_view/template/error.rb:46:in `initialize'
  (gem) actionpack-3.2.12/lib/action_view/path_set.rb:58:in `find'
  (gem) actionpack-3.2.12/lib/action_view/lookup_context.rb:109:in `find'
  (gem) actionpack-3.2.12/lib/action_view/renderer/abstract_renderer.rb:3:in `find_template'
  (gem) actionpack-3.2.12/lib/action_view/renderer/template_renderer.rb:34:in `determine_template'
  (gem) actionpack-3.2.12/lib/action_view/renderer/template_renderer.rb:10:in `render'
  (gem) actionpack-3.2.12/lib/action_view/renderer/renderer.rb:36:in `render_template'
  (gem) actionpack-3.2.12/lib/action_view/renderer/renderer.rb:17:in `render'
  (gem) actionpack-3.2.12/lib/abstract_controller/rendering.rb:110:in `_render_template'
  (gem) actionpack-3.2.12/lib/action_controller/metal/streaming.rb:225:in `_render_template'
  (gem) actionpack-3.2.12/lib/abstract_controller/rendering.rb:103:in `render_to_body'
  (gem) actionpack-3.2.12/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
  (gem) actionpack-3.2.12/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
  (gem) actionpack-3.2.12/lib/abstract_controller/rendering.rb:88:in `render'
  (gem) actionpack-3.2.12/lib/action_controller/metal/rendering.rb:16:in `render'
  (gem) actionpack-3.2.12/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
  (gem) activesupport-3.2.12/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
  /var/lib/gs5/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
  (gem) activesupport-3.2.12/lib/active_support/core_ext/bench
  (gem) actionpack-3.2.12/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
  (gem) actionpack-3.2.12/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
  (gem) activerecord-3.2.12/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
  (gem) actionpack-3.2.12/lib/action_controller/metal/instrumentation.rb:39:in `render'
  (gem) actionpack-3.2.12/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  (gem) actionpack-3.2.12/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  (gem) actionpack-3.2.12/lib/abstract_controller/base.rb:167:in `process_action'
  (gem) actionpack-3.2.12/lib/action_controller/metal/rendering.rb:10:in `process_action'
  (gem) actionpack-3.2.12/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  (gem) activesupport-3.2.12/lib/active_support/callbacks.rb:447:in `_run__866974882__process_action__115773593__callbacks'
  (gem) activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback'
  (gem) activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  (gem) activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks'
  (gem) actionpack-3.2.12/lib/abstract_controller/callbacks.rb:17:in `process_action'
  (gem) actionpack-3.2.12/lib/action_controller/metal/rescue.rb:29:in `process_action'
  (gem) actionpack-3.2.12/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  (gem) activesupport-3.2.12/lib/active_support/notifications.rb:123:in `block in instrument'
  (gem) activesupport-3.2.12/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  (gem) activesupport-3.2.12/lib/active_support/notifications.rb:123:in `instrument'
  (gem) actionpack-3.2.12/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  (gem) actionpack-3.2.12/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  (gem) activerecord-3.2.12/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  (gem) actionpack-3.2.12/lib/abstract_controller/base.rb:121:in `process'
  (gem) actionpack-3.2.12/lib/abstract_controller/rendering.rb:45:in `process'
  (gem) actionpack-3.2.12/lib/action_controller/metal.rb:203:in `dispatch'
  (gem) actionpack-3.2.12/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  (gem) actionpack-3.2.12/lib/action_controller/metal.rb:246:in `block in action'
  (gem) actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  (gem) actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:36:in `call'
  (gem) journey-1.0.4/lib/journey/router.rb:68:in `block in call'
  (gem) journey-1.0.4/lib/journey/router.rb:56:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:601:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  (gem) rack-1.4.5/lib/rack/etag.rb:23:in `call'
  (gem) rack-1.4.5/lib/rack/conditionalget.rb:25:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/head.rb:14:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/flash.rb:242:in `call'
  (gem) rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
  (gem) rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/cookies.rb:341:in `call'
  (gem) activerecord-3.2.12/lib/active_record/query_cache.rb:64:in `call'
  (gem) activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  (gem) activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `_run__502694246__call__513176566__callbacks'
  (gem) activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback'
  (gem) activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  (gem) activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/reloader.rb:65:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  (gem) better_errors-0.7.2/lib/better_errors/middleware.rb:84:in `protected_app_call'
  (gem) better_errors-0.7.2/lib/better_errors/middleware.rb:79:in `better_errors_call'
  (gem) better_errors-0.7.2/lib/better_errors/middleware.rb:56:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  (gem) railties-3.2.12/lib/rails/rack/logger.rb:32:in `call_app'
  (gem) railties-3.2.12/lib/rails/rack/logger.rb:16:in `block in call'
  (gem) activesupport-3.2.12/lib/active_support/tagged_logging.rb:22:in `tagged'
  (gem) railties-3.2.12/lib/rails/rack/logger.rb:16:in `call'
  (gem) quiet_assets-1.0.2/lib/quiet_assets.rb:18:in `call_with_quiet_assets'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/request_id.rb:22:in `call'
  (gem) rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
  (gem) rack-1.4.5/lib/rack/runtime.rb:17:in `call'
  (gem) activesupport-3.2.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  (gem) rack-1.4.5/lib/rack/lock.rb:15:in `call'
  (gem) actionpack-3.2.12/lib/action_dispatch/middleware/static.rb:62:in `call'
  (gem) railties-3.2.12/lib/rails/engine.rb:479:in `call'
  (gem) railties-3.2.12/lib/rails/application.rb:223:in `call'
  (gem) railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
  (gem) passenger-3.0.19/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  (gem) passenger-3.0.19/lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
  (gem) passenger-3.0.19/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  (gem) passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  (gem) passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `block in handle_spawn_application'
  (gem) passenger-3.0.19/lib/phusion_passenger/utils.rb:470:in `safe_fork'
  (gem) passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  (gem) passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  (gem) passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  (gem) passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:180:in `start'
  (gem) passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  (gem) passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:219:in `block (2 levels) in spawn_rails_application'
  (gem) passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  (gem) passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:214:in `block in spawn_rails_application'
  (gem) passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
  <internal:prelude>:10:in `synchronize'
  (gem) passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  (gem) passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  (gem) passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  (gem) passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  (gem) passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  (gem) passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  (gem) passenger-3.0.19/helper-scripts/passenger-spawn-server:99:in `<main>'
  (gem) passenger-3.0.19/helper-scripts/passenger-spawn-server:0:in `<main>'
wintermeyer commented 11 years ago

I can't replicate this problem.

jpawlowski commented 11 years ago

Open up a terminal on your GS5 and type in w3m localhost

jpawlowski commented 11 years ago

I found out it's working using lynx and allowing the cookie. Must be cookie related I guess, e.g. the application crashes if the cookie is refused or not sent with a request.