OPENSHIFT_MYSQL_DB_PROXY_PORT not defined on scalable apps

Solution Unverified - Updated -

Issue

Sometimes while creating a scalable app based on a "php-5.3+mysql-5.1", we obtain an empty OPENSHIFT_MYSQL_DB_PORT on php gear(s)

For example when i check mysql port directly via ssh :

>rhc ssh myapp --gears "env | grep MYSQL_DB_PORT"

=== 524ec484bf2db2e965000065 mysql-5.1
OPENSHIFT_MYSQL_DB_PORT=3306
=== 524ec484bf2db2e965000062 php-5.3+haproxy-1.4
OPENSHIFT_MYSQL_DB_PORT=

When I look into mysql gears via ssh I can see that $OPENSHIFT_MYSQL_DB_PROXY_PORT is not defined.

On the node where mysql's gear is hosted I see those logs in /var/log/openshift/node/platform.log :

CLIENT_RESULT: MySQL 5.1 database added.  Please make note of these credentials:
CLIENT_RESULT:        Root User: ...
CLIENT_RESULT:    Root Password: ...
CLIENT_RESULT:    Database Name: myapp
CLIENT_RESULT: Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/
CART_PROPERTIES: connection_url=mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/
CART_PROPERTIES: username=...
CART_PROPERTIES: password=...
CART_PROPERTIES: database_name=myapp
APP_INFO: Connection URL: mysql://127.0.254.1:3306

Environment

  • OpenShift Enterprise (OSE)
    • 1.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content