Bug 1049402 - Spree quickstart can't connect to mysql and ends with timeout
Summary: Spree quickstart can't connect to mysql and ends with timeout
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Templates
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-07 14:35 UTC by Jakub Hadvig
Modified: 2015-05-15 02:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:55:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jakub Hadvig 2014-01-07 14:35:38 UTC
Description of problem:
When creating Spree application I get timeout with message that rails could not connect to the MySQL server

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


How reproducible:
always

Steps to Reproduce:
1. rhc app create a ruby-1.9 mysql-5.1 --from-code https://github.com/sarupbanskota/OpenShift-Quickstart-for-Spree
2.
3.

Actual results:
Spree application is not created

Creating application 'spree' ... 
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 52cbd624e170dbfc6a00003e -c "exec /usr/bin/runcon
'unconfined_u:system_r:openshift_t:s0:c0,c1001' /bin/sh -c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' exceeded timeout of 228
...
Precompiling with 'bundle exec rake assets:precompile'
/opt/rh/ruby193/root/usr/bin/ruby /var/lib/openshift/52cbe9bae170dbfc6a000059/app-root/runtime/repo/vendor/bundle/ruby/1.9.1/bin/rake
assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

Expected results:
Spree application should be created

Additional info:

Comment 1 Jakub Hadvig 2014-01-13 10:01:40 UTC
Issue fixed by two PR, one at origin-server, one in quickstart repo.

OO PR: https://github.com/openshift/origin-server/pull/4439

Quickstart PR: https://github.com/sarupbanskota/OpenShift-Quickstart-for-Spree/pull/3

Comment 2 Wei Sun 2014-01-13 10:41:25 UTC
Verified on devenv_4215.Could create Spree quickstart successfully and could access the app's url.

Result:
[root@ip-10-91-155-83 ~]# rhc app create a ruby-1.9 mysql-5.1 --from-code https://github.com/sarupbanskota/OpenShift-Quickstart-for-Spree
Application Options
-------------------
Domain:      wsundev4215
Cartridges:  ruby-1.9, mysql-5.1
Source Code: https://github.com/sarupbanskota/OpenShift-Quickstart-for-Spree
Gear Size:   default
Scaling:     no

Creating application 'a' ... done

  MySQL 5.1 database added.  Please make note of these credentials:

       Root User: adminpSg3b9I
   Root Password: BzyMg8bCkEzY
   Database Name: a

Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/

You can manage your new MySQL database by also embedding phpmyadmin.
The phpmyadmin username and password will be the same as the MySQL credentials above.

Waiting for your DNS name to be available ... done

Cloning into 'a'...
The authenticity of host 'a-wsundev4215.dev.rhcloud.com (10.91.155.83)' can't be established.
RSA key fingerprint is d5:78:e9:18:a9:c1:8f:7d:3b:4c:d4:00:ae:da:8e:46.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'a-wsundev4215.dev.rhcloud.com,10.91.155.83' (RSA) to the list of known hosts.

Your application 'a' is now available.

  URL:        http://a-wsundev4215.dev.rhcloud.com/
  SSH to:     52d3c117d764e12cb4000007.rhcloud.com
  Git remote: ssh://52d3c117d764e12cb4000007.rhcloud.com/~/git/a.git/
  Cloned to:  /root/a

Run 'rhc show-app a' for more details about your app.


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