Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1064769 - Met cookie issue when access redmine app with ruby-1.9.
Summary: Met cookie issue when access redmine app with ruby-1.9.
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Templates
Version: 2.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: libra bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2014-02-13 09:34 UTC by XiuJuan Wang
Modified: 2015-05-15 02:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-04-09 15:18:21 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description XiuJuan Wang 2014-02-13 09:34:26 UTC
Description of problem:
Met cookie issue when access redmine app with ruby-1.9.
Error detil please check from "Actual results".

From website, for nonscale redmine app will meet 503 error.for nonscale redmine app met "internal error".
This bug could not be reproduced for ruby-1.8 cartridge

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Create a redmine app with ruby-1.9
#rhc app create redmine195s ruby-1.9 mysql-5.5 --from-code= -s
2.Access app via url.

Actual results:
From website, for nonscale redmine app will meet 503 error.for nonscale redmine app met "internal error".

Error detils from app-root/runtime/repo/log/production.log
ArgumentError (A secret is required to generate an integrity hash for cookie session data. Use config.secret_token = "some secret phrase of at least 30 characters"in config/initializers/secret_token.rb):
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/cookies.rb:319:in `ensure_secret_secure'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/cookies.rb:284:in `initialize'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/cookies.rb:231:in `new'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/cookies.rb:231:in `signed'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/session/cookie_store.rb:50:in `block in unpacked_cookie_data'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/session/abstract_store.rb:57:in `stale_session_check!'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/session/cookie_store.rb:48:in `unpacked_cookie_data'
  vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/cookie.rb:107:in `extract_session_id'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/session/abstract_store.rb:53:in `block in extract_session_id'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/session/abstract_store.rb:57:in `stale_session_check!'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/session/abstract_store.rb:53:in `extract_session_id'
  vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:43:in `load_session_id!'
  vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:32:in `[]'
  vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:267:in `current_session_id'
  vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:273:in `session_exists?'
  vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:107:in `exists?'
  vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:127:in `load_for_read!'
  vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:64:in `has_key?'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/flash.rb:258:in `ensure in call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/flash.rb:259:in `call'
  vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
  vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/cookies.rb:341:in `call'
  vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.16/lib/active_record/query_cache.rb:64:in `call'
  vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.16/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
Expected results:
Should could be accessed.

Additional info:

Comment 1 Jakub Hadvig 2014-03-03 13:52:05 UTC
This issue was fixed by PR:

Tested on devenv_4449

Comment 2 XiuJuan Wang 2014-03-04 06:46:35 UTC
Test on devenv_4455

If use '--from-code' way to create redmine app, will meet:

An error occurred while communicating with the server. This problem may only be temporary. Check that you have correctly specified your OpenShift server

The app cannot create.Check the /var/log/openshift/broker/development.log, will find message

If use upstream Redmine quickstart repo to create redmine app, can create successfully.And the app url can access.
But check /var/log/openshift/broker/development.log, can see same error

So assigned this bug back.

Comment 3 Jakub Hadvig 2014-03-04 12:16:20 UTC
Tried it on clean devenv_4457 but again without success.
Tried following variants:

rhc app create redmine91s ruby-1.9 mysql-5.1 --from-code= -s

rhc app create redmine91 ruby-1.9 mysql-5.1 --from-code= 

Everything was running and didn't get any error messages. 
Problem might be that you get timeout while creating the app and therefor mcollective is forced to kill the app creation process.

Could you please try it on clean devenv.


Comment 4 XiuJuan Wang 2014-03-05 03:40:45 UTC
Test on devenv_4464.
Can create redmine--ruby-1.9/1.8 scalable/non-scalable apps use '--from-code',can access app url on clean instance.
Sorry for trouble you.

Mark this bug as VERIFIED.

Note You need to log in before you can comment on or make changes to this bug.