Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails when creating a scalable app #1

Open
davidcollen opened this issue Aug 13, 2013 · 8 comments
Open

Fails when creating a scalable app #1

davidcollen opened this issue Aug 13, 2013 · 8 comments

Comments

@davidcollen
Copy link

If creating an unscalable app, this quickstart works perfectly, but if creating an app with the -s (scalability) flag, this process fails when doing the git push command

remote: Extracting sample data
remote: Poulating database
remote: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '' (111)
remote: An error occurred executing 'gear postreceive' (exit code: 1)
remote: Error message: Failed to execute action hook 'deploy' for 520a44234382ec32af000155
@namduong
Copy link
Owner

Based on the error, looks like the incorrect mysql db host was entered. For the correct parameters, please ssh onto the gear (rhc ssh appName), and run 'env | grep MYSQL' and copy/paste the values for:
OPENSHIFT_MYSQL_DB_USERNAME
OPENSHIFT_MYSQL_DB_PASSWORD
OPENSHIFT_MYSQL_DB_HOST
OPENSHIFT_MYSQL_DB_PORT

When using the mysql db cartridge, a default db is created with (value of) $OPENSHIFT_APP_NAME

@davidcollen
Copy link
Author

Copy/Paste these values into the deploy script?

@namduong
Copy link
Owner

Sorry for the delay on response. Working on reproducing then, workaround

@davidcollen
Copy link
Author

I think it's something to do with the ${OPENSHIFT_MYSQL_DB_SOCKET}

This env is unset for me in my scalable app, but set if I create an app without the -s tag

On 13 Aug 2013, at 18:08, Nam Duong [email protected] wrote:

Sorry for the delay on response. Working on reproducing then, workaround


Reply to this email directly or view it on GitHub.

@namduong
Copy link
Owner

Yes, the deploy hook needs to be updated as it didn't take into account scaling. I changed 2 lines to get it to deploy:

mysql -u${OPENSHIFT_MYSQL_DB_USERNAME} -p${OPENSHIFT_MYSQL_DB_PASSWORD} -h${OPENSHIFT_MYSQL_DB_HOST} -P${OPENSHIFT_MYSQL_DB_PORT} ${OPENSHIFT_APP_NAME} < ${OPENSHIFT_TMP_DIR}magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql

--db_host "$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT" \

@namduong
Copy link
Owner

After some testing, looks like this quickstart wasn't designed for scalable applications. Once the app scales up, it triggers the deploy hook on the second gear and errors out. Can you enter a bug here?: https://bugzilla.redhat.com/enter_bug.cgi?product=OpenShift%20Online

@davidcollen
Copy link
Author

Done

https://bugzilla.redhat.com/show_bug.cgi?id=996616

On 13 Aug 2013, at 21:55, Nam Duong [email protected] wrote:

After some testing, looks like this quickstart wasn't designed for scalable applications. Once the app scales up, it triggers the deploy hook on the second gear and errors out. Can you enter a bug here?: https://bugzilla.redhat.com/enter_bug.cgi?product=OpenShift%20Online


Reply to this email directly or view it on GitHub.

@davidcollen
Copy link
Author

Thanks for your help. I'm not sure how I can fix this - the unset mysql socket in the scalable app seems to be the main problem.

On 13 Aug 2013, at 21:55, Nam Duong [email protected] wrote:

After some testing, looks like this quickstart wasn't designed for scalable applications. Once the app scales up, it triggers the deploy hook on the second gear and errors out. Can you enter a bug here?: https://bugzilla.redhat.com/enter_bug.cgi?product=OpenShift%20Online


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants