Bug 802747

Summary: Scalable jbossas app failed to connect to embedded mysql
Product: OKD Reporter: jizhao
Component: ContainersAssignee: Dan McPherson <dmcphers>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.xCC: szhou
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-13 14:03:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
connect to mysql, insert some data, and read them none

Description jizhao 2012-03-13 12:36:01 UTC
Description of problem:
Create a scalable jbossas app and embed mysql to it. Copy the app template to the git repo and git push.

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


How reproducible:
Always

Steps to Reproduce:
1.Create an scalable jbossas app using REST API
$ curl -k -H "Accept: application/xml" --user "<user>:<pass>"  https://<server_dns>/broker/rest/domains/<domain_name>/applications -X POST -d name=<appname> -d cartridge=jbossas-7 -d scale=true
2.Embed mysql to the app
$ rhc app cartridge add -a <app_name> -c mysql-5.1
3.Copy the attached app template to git repo, change the username, password to your own ones and git push.
  
Actual results:
<-------------web page------------->
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/MysqlDS
...........
javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null
.........
javax.resource.ResourceException: Could not create connection
......
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database '98a78c714b'
........
<-------------------------------->

Expected results:
The app should connect to mysql successfully.

Additional info:

Comment 1 jizhao 2012-03-13 12:37:26 UTC
Version-Release number of selected component (if applicable):
rhc-cartridge-haproxy-1.4-0.6.5-1.el6_2.noarch
rhc-cartridge-jbossas-7-0.88.4-1.el6_2.noarch
rubygem-stickshift-controller-0.6.6-1.el6_2.noarch
stickshift-abstract-0.6.6-1.el6_2.noarch
rubygem-stickshift-node-0.6.7-1.el6_2.noarch
rubygem-stickshift-common-0.6.4-1.el6_2.noarch

Comment 2 jizhao 2012-03-13 12:37:53 UTC
Created attachment 569660 [details]
connect to mysql, insert some data, and read them

Comment 3 Dan McPherson 2012-03-13 14:03:28 UTC
This use case doesn't make sense to me.  Embedded mysql shouldn't work with a scalable app.  It would only be embedded in the haproxy gear in this case right?  What should work is connecting to a standalone mysql from jboss based on US2009.